{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proside-io/json-schema/proside-io-live-leaderboard-detail-response-schema.json",
  "title": "LiveLeaderboardDetailResponse",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/proside-io-openapi.json#/components/schemas/LiveLeaderboardDetailResponse",
  "properties": {
    "leaderboard_id": {
      "type": "string",
      "title": "Leaderboard Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "open",
        "in_progress",
        "provisional",
        "locked",
        "reopened",
        "cancelled"
      ],
      "title": "Status"
    },
    "scope_kind": {
      "type": "string",
      "enum": [
        "personal",
        "organization"
      ],
      "title": "Scope Kind"
    },
    "organization_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Organization Id"
    },
    "owner_player_id": {
      "type": "string",
      "title": "Owner Player Id"
    },
    "actor_player_id": {
      "type": "string",
      "title": "Actor Player Id"
    },
    "actor_role": {
      "type": "string",
      "enum": [
        "host",
        "admin",
        "participant",
        "organization_viewer"
      ],
      "title": "Actor Role"
    },
    "discovery_policy": {
      "type": "string",
      "enum": [
        "listed",
        "link_only",
        "invite_only"
      ],
      "title": "Discovery Policy"
    },
    "join_policy": {
      "type": "string",
      "enum": [
        "open",
        "host_approval",
        "invite_only"
      ],
      "title": "Join Policy"
    },
    "spectator_policy": {
      "type": "string",
      "enum": [
        "off",
        "signed_in_link",
        "public_live",
        "public_after_final"
      ],
      "title": "Spectator Policy"
    },
    "allow_player_group_management": {
      "type": "boolean",
      "title": "Allow Player Group Management"
    },
    "require_score_verification": {
      "type": "boolean",
      "title": "Require Score Verification",
      "default": false
    },
    "display_timezone": {
      "type": "string",
      "title": "Display Timezone"
    },
    "starts_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Starts At"
    },
    "ends_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ends At"
    },
    "competition": {
      "$ref": "#/$defs/LeaderboardCompetitionResponse"
    },
    "rounds": {
      "items": {
        "$ref": "#/$defs/LeaderboardRoundResponse"
      },
      "type": "array",
      "title": "Rounds"
    },
    "participants": {
      "items": {
        "$ref": "#/$defs/LeaderboardParticipantResponse"
      },
      "type": "array",
      "title": "Participants"
    },
    "group_bindings": {
      "items": {
        "$ref": "#/$defs/LeaderboardGroupBindingResponse"
      },
      "type": "array",
      "title": "Group Bindings"
    },
    "group_assignments": {
      "items": {
        "$ref": "#/$defs/LeaderboardGroupAssignmentResponse"
      },
      "type": "array",
      "title": "Group Assignments"
    },
    "participant_count": {
      "type": "integer",
      "title": "Participant Count"
    },
    "source_group_count": {
      "type": "integer",
      "title": "Source Group Count"
    },
    "allowed_actions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Allowed Actions"
    },
    "access_workflows": {
      "additionalProperties": {
        "type": "boolean"
      },
      "type": "object",
      "title": "Access Workflows"
    },
    "organization_guest_limit": {
      "type": "integer",
      "title": "Organization Guest Limit"
    },
    "public_link": {
      "anyOf": [
        {
          "$ref": "#/$defs/LeaderboardPublicLinkSummaryResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "access_revision": {
      "type": "integer",
      "title": "Access Revision"
    },
    "realtime_revision": {
      "type": "integer",
      "title": "Realtime Revision"
    },
    "structural_frozen_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Structural Frozen At"
    },
    "version": {
      "type": "integer",
      "title": "Version"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "replayed": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Replayed"
    }
  },
  "type": "object",
  "required": [
    "leaderboard_id",
    "name",
    "status",
    "scope_kind",
    "organization_id",
    "owner_player_id",
    "actor_player_id",
    "actor_role",
    "discovery_policy",
    "join_policy",
    "spectator_policy",
    "allow_player_group_management",
    "display_timezone",
    "starts_at",
    "ends_at",
    "competition",
    "rounds",
    "participants",
    "group_bindings",
    "group_assignments",
    "participant_count",
    "source_group_count",
    "allowed_actions",
    "access_workflows",
    "organization_guest_limit",
    "public_link",
    "access_revision",
    "realtime_revision",
    "structural_frozen_at",
    "version",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "LeaderboardCompetitionResponse": {
      "properties": {
        "competition_code": {
          "type": "string",
          "enum": [
            "medal_play",
            "stableford",
            "quota",
            "skins",
            "match_play",
            "teams_cup"
          ],
          "title": "Competition Code"
        },
        "score_mode": {
          "type": "string",
          "enum": [
            "gross",
            "net",
            "both"
          ],
          "title": "Score Mode"
        },
        "team_format": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Team Format"
        },
        "config": {
          "additionalProperties": true,
          "type": "object",
          "title": "Config"
        }
      },
      "type": "object",
      "required": [
        "competition_code",
        "score_mode",
        "team_format",
        "config"
      ],
      "title": "LeaderboardCompetitionResponse"
    },
    "LeaderboardGroupAssignmentResponse": {
      "properties": {
        "group_assignment_id": {
          "type": "string",
          "title": "Group Assignment Id"
        },
        "leaderboard_round_id": {
          "type": "string",
          "title": "Leaderboard Round Id"
        },
        "captain_player_id": {
          "type": "string",
          "title": "Captain Player Id"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "accepted",
            "expired",
            "cancelled"
          ],
          "title": "Status"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        },
        "can_start": {
          "type": "boolean",
          "title": "Can Start"
        },
        "allowed_actions": {
          "items": {
            "type": "string",
            "enum": [
              "start",
              "update",
              "cancel"
            ]
          },
          "type": "array",
          "title": "Allowed Actions"
        }
      },
      "type": "object",
      "required": [
        "group_assignment_id",
        "leaderboard_round_id",
        "captain_player_id",
        "status",
        "expires_at",
        "version",
        "can_start",
        "allowed_actions"
      ],
      "title": "LeaderboardGroupAssignmentResponse"
    },
    "LeaderboardGroupBindingResponse": {
      "properties": {
        "group_binding_id": {
          "type": "string",
          "title": "Group Binding Id"
        },
        "leaderboard_round_id": {
          "type": "string",
          "title": "Leaderboard Round Id"
        },
        "play_now_group_id": {
          "type": "string",
          "title": "Play Now Group Id"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "detached",
            "withdrawn",
            "excluded"
          ],
          "title": "Status"
        },
        "course_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Course Name"
        },
        "num_holes": {
          "type": "integer",
          "title": "Num Holes"
        },
        "start_hole": {
          "type": "integer",
          "title": "Start Hole"
        },
        "player_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Player Ids"
        },
        "correction_consent": {
          "type": "boolean",
          "title": "Correction Consent"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        },
        "allowed_actions": {
          "items": {
            "type": "string",
            "enum": [
              "manage_binding",
              "manage_roster",
              "correct_scores",
              "record_group_card_score",
              "correct_group_card_score"
            ]
          },
          "type": "array",
          "title": "Allowed Actions"
        }
      },
      "type": "object",
      "required": [
        "group_binding_id",
        "leaderboard_round_id",
        "play_now_group_id",
        "status",
        "course_name",
        "num_holes",
        "start_hole",
        "player_ids",
        "correction_consent",
        "version",
        "allowed_actions"
      ],
      "title": "LeaderboardGroupBindingResponse"
    },
    "LeaderboardParticipantResponse": {
      "properties": {
        "participant_id": {
          "type": "string",
          "title": "Participant Id"
        },
        "player_id": {
          "type": "string",
          "title": "Player Id"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "role": {
          "type": "string",
          "enum": [
            "host",
            "admin",
            "participant"
          ],
          "title": "Role"
        },
        "admission_status": {
          "type": "string",
          "enum": [
            "invited",
            "pending",
            "active",
            "denied",
            "withdrawn",
            "removed"
          ],
          "title": "Admission Status"
        },
        "competitive_status": {
          "type": "string",
          "enum": [
            "active",
            "dnf",
            "nq",
            "dq",
            "wd"
          ],
          "title": "Competitive Status"
        },
        "organization_member_at_admission": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Organization Member At Admission"
        },
        "completed_card_late_entry": {
          "type": "boolean",
          "title": "Completed Card Late Entry"
        },
        "admission_source": {
          "type": "string",
          "title": "Admission Source"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        }
      },
      "type": "object",
      "required": [
        "participant_id",
        "player_id",
        "display_name",
        "role",
        "admission_status",
        "competitive_status",
        "organization_member_at_admission",
        "completed_card_late_entry",
        "admission_source",
        "version"
      ],
      "title": "LeaderboardParticipantResponse"
    },
    "LeaderboardPublicLinkSummaryResponse": {
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "active",
            "disabled"
          ],
          "title": "State"
        },
        "public_link_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Public Link Id"
        },
        "audience": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "signed_in",
                "public"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Audience"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        },
        "version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        }
      },
      "type": "object",
      "required": [
        "state",
        "public_link_id",
        "audience",
        "expires_at",
        "version"
      ],
      "title": "LeaderboardPublicLinkSummaryResponse"
    },
    "LeaderboardRoundResponse": {
      "properties": {
        "leaderboard_round_id": {
          "type": "string",
          "title": "Leaderboard Round Id"
        },
        "round_number": {
          "type": "integer",
          "title": "Round Number"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "starts_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Starts At"
        },
        "ends_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ends At"
        },
        "num_holes": {
          "type": "integer",
          "title": "Num Holes"
        },
        "allow_different_courses": {
          "type": "boolean",
          "title": "Allow Different Courses"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        }
      },
      "type": "object",
      "required": [
        "leaderboard_round_id",
        "round_number",
        "name",
        "starts_at",
        "ends_at",
        "num_holes",
        "allow_different_courses",
        "version"
      ],
      "title": "LeaderboardRoundResponse"
    }
  }
}