---
openapi: 3.1.0
components:
  schemas:
    AgeCategory:
      type: string
      enum:
      - YOUTH
      - JUNIOR
      - SENIOR
    Attribute:
      type: string
      enum:
      - CAPTAIN
    Broadcast:
      type: object
      properties:
        id:
          type: string
        extId:
          type: string
        extIds:
          type: array
          items:
            type: string
        siteId:
          type: string
        start:
          $ref: "#/components/schemas/Date"
        end:
          $ref: "#/components/schemas/Date"
        streamStart:
          $ref: "#/components/schemas/Date"
        streamEnd:
          $ref: "#/components/schemas/Date"
        venueId:
          type: string
        venueExtId:
          type: string
        name:
          type: string
        homeTeam:
          $ref: "#/components/schemas/Group"
        awayTeam:
          $ref: "#/components/schemas/Group"
        teams:
          type: array
          items:
            $ref: "#/components/schemas/Group"
        competition:
          $ref: "#/components/schemas/Competition"
        imageUrl:
          type: string
        image:
          $ref: "#/components/schemas/File"
        cancelled:
          type: boolean
        season:
          type: string
        filter:
          type: array
          items:
            $ref: "#/components/schemas/FilterType"
        products:
          type: array
          items:
            type: string
    BroadcastInfo:
      type: object
      properties:
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        siteId:
          type: string
        season:
          type: string
        awayClubName:
          type: string
        awayShortName:
          type: string
        awayTeamName:
          type: string
        awayTeamLogoUrl:
          type: string
        awayTeamHex:
          type: string
        homeClubName:
          type: string
        homeShortName:
          type: string
        homeTeamName:
          type: string
        homeTeamLogoUrl:
          type: string
        homeTeamHex:
          type: string
        arenaName:
          type: string
        teams:
          type: array
          items:
            $ref: "#/components/schemas/Team"
        sponsors:
          type: array
          items:
            type: string
        referees:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        competitionName:
          type: string
        sport:
          $ref: "#/components/schemas/Sport"
        locale:
          type: string
        timeZone:
          type: string
        startTime:
          $ref: "#/components/schemas/Date"
    BroadcastStanding:
      type: object
      properties:
        broadcast:
          $ref: "#/components/schemas/Broadcast"
        standing:
          $ref: "#/components/schemas/MatchStanding"
    ClockEventType:
      type: string
      enum:
      - START
      - STOP
      - END
      - RESET
      - UNMANAGED
    ClockEventType1:
      type: string
      enum:
      - START
      - STOP
      - RESET
      - END
      - UNMANAGED
    ClockInfo:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
          type: string
          examples:
          - Internal id
        siteId:
          type: string
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        eventType:
          $ref: "#/components/schemas/ClockEventType"
        minutes:
          type: integer
          format: int32
        seconds:
          type: integer
          format: int32
        timeInSecs:
          type: integer
          format: int32
        period:
          type: integer
          format: int32
        timeAscending:
          type: boolean
        description:
          type: string
        timeStamp:
          $ref: "#/components/schemas/Date"
        updatedTimeStamp:
          $ref: "#/components/schemas/Date"
        season:
          type: string
        startMinute:
          type: integer
          format: int32
    Competition:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
        name:
          type: string
        extId:
          type: string
        playerLevel:
          $ref: "#/components/schemas/PlayerLevel"
        type:
          type: string
        start:
          $ref: "#/components/schemas/Date"
        end:
          $ref: "#/components/schemas/Date"
        level1:
          type: string
        level2:
          type: string
        siteId:
          type: string
        competitionGroupId:
          type: string
        image:
          $ref: "#/components/schemas/File"
    Date:
      type: string
      format: date
      examples:
      - 2022-03-10
    Document:
      type: object
      additionalProperties: {}
    File:
      type: object
      required:
      - id
      - blobId
      - mimeType
      properties:
        id:
          type: string
        blobId:
          type: string
        mimeType:
          type: string
        width:
          type: integer
          format: int32
        height:
          type: integer
          format: int32
        size:
          type: integer
          format: int64
        fileName:
          type: string
        storageType:
          $ref: "#/components/schemas/StorageType"
        url:
          type: string
    FilterType:
      type: string
      enum:
      - PS
      - TA
      - LL
      - EX
      - BO
    Gender:
      type: string
      enum:
      - MALE
      - FEMALE
      - MIXED
    Group:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        parentId:
          type: string
        level1:
          type: string
        level2:
          type: string
        externalId:
          type: string
        primaryHex:
          type: string
        secondaryHex:
          type: string
        teamId:
          type: string
        teamExtId:
          type: string
        teamName:
          type: string
        logo:
          $ref: "#/components/schemas/File"
    Line:
      type: object
      properties:
        name:
          type: string
        players:
          type: array
          items:
            $ref: "#/components/schemas/Person"
    Lineup:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
          type: string
          examples:
          - Internal id
        siteId:
          type: string
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        competitionId:
          type: string
        broadcastStart:
          $ref: "#/components/schemas/Date"
        teamType:
          $ref: "#/components/schemas/TeamType"
        clubId:
          type: string
        clubExtId:
          type: string
        clubName:
          type: string
        shortName:
          type: string
        teamName:
          type: string
        teamId:
          type: string
        teamExtId:
          type: string
        coaches:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        goalies:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        substitutes:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        lines:
          type: array
          items:
            $ref: "#/components/schemas/Line"
        season:
          type: string
        playerLevel:
          $ref: "#/components/schemas/PlayerLevel"
        broadcastFilter:
          type: array
          uniqueItems: true
          items:
            $ref: "#/components/schemas/FilterType"
        overrideMissingIds:
          type: boolean
    LineupAttributes:
      type: object
      properties:
        num:
          type: integer
          format: int32
        position:
          $ref: "#/components/schemas/Position"
        role:
          $ref: "#/components/schemas/Role"
        clubId:
          type: string
        playerLevelName:
          type: string
        siteId:
          type: string
      required:
      - role
      - siteId
    LineupPerson:
      type: object
      properties:
        id:
          type: string
        extId:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        lineupAttributes:
          type: array
          items:
            $ref: "#/components/schemas/LineupAttributes"
    MatchEvent:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
          type: string
          examples:
          - Internal id
        extId:
          type: string
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        competitionId:
          type: string
        competitionName:
          type: string
        siteId:
          type: string
        season:
          type: string
        teamType:
          $ref: "#/components/schemas/TeamType"
        broadcastFilter:
          type: array
          items:
            $ref: "#/components/schemas/FilterType"
        timeStamp:
          $ref: "#/components/schemas/Date"
        updatedTimeStamp:
          $ref: "#/components/schemas/Date"
        level1:
          type: string
        level2:
          type: string
        homeTeam:
          $ref: "#/components/schemas/Group"
        awayTeam:
          $ref: "#/components/schemas/Group"
        playerLevel:
          $ref: "#/components/schemas/PlayerLevel"
        netSportStanding:
          $ref: "#/components/schemas/NetSportStanding"
        homeGoals:
          type: integer
          format: int32
        awayGoals:
          type: integer
          format: int32
        period:
          type: integer
          format: int32
        status:
          $ref: "#/components/schemas/MatchStatus"
        eventType:
          $ref: "#/components/schemas/MatchEventType"
        subType:
          $ref: "#/components/schemas/MatchEventSubType"
        outcome:
          $ref: "#/components/schemas/Outcome"
        minutes:
          type: integer
          format: int32
        seconds:
          type: integer
          format: int32
        timeInSecs:
          type: integer
          format: int32
        actionPlayer:
          $ref: "#/components/schemas/Person"
        opponent:
          $ref: "#/components/schemas/Person"
        assistingPlayers:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        playersFor:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        playersAgainst:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        resultChanged:
          type: boolean
        durationInSecs:
          type: integer
          format: int32
        name:
          type: string
        points:
          type: integer
          format: int32
        positionX:
          type: integer
          format: int32
        positionY:
          type: integer
          format: int32
        durationLeft:
          type: integer
          format: int32
        overrideMissingIds:
          type: boolean
      required:
      - eventType
    MatchEventSubType:
      type: string
      enum:
      - PENALTY_SHOT
      - NUM_DISADVANTAGE
      - NUM_DISADVANTAGE_2
      - NUM_ADVANTAGE
      - NUM_ADVANTAGE_2
      - SERVE_ACE
      - SERVE_DBL_FAULT
      - GAME_WIN
      - BALL_WIN
      - MINOR
      - MAJOR
      - OWN_GOAL
      - OFFENSIVE
      - DEFENSIVE
      - STEAL
      - TECHNICAL_FAULT
      - END
    MatchEventType:
      type: string
      enum:
      - GOAL
      - PENALTY
      - POINT
      - SUBSTITUTION
      - MATCH_STANDING
      - SHOT
      - POSSESSION
      - REBOUND
      - BLOCK
      - FACEOFF
      - SHOOTOUT
      - TURNOVER
    MatchStanding:
      type: object
      properties:
        id:
          type: string
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        competitionId:
          type: string
        siteId:
          type: string
        season:
          type: string
        netSportStanding:
          $ref: "#/components/schemas/NetSportStanding"
        homeGoals:
          type: integer
          format: int32
        awayGoals:
          type: integer
          format: int32
        period:
          type: integer
          format: int32
        status:
          $ref: "#/components/schemas/MatchStatus"
        timeStamp:
          $ref: "#/components/schemas/Date"
        updatedTimeStamp:
          $ref: "#/components/schemas/Date"
    MatchStatus:
      type: string
      enum:
      - NOT_STARTED
      - STARTED
      - RUNNING
      - PAUSED
      - OT
      - ENDED
    NetSportStanding:
      type: object
      properties:
        homeNetMatch:
          type: integer
          format: int32
        homeNetSets:
          type: array
          items:
            type: integer
            format: int32
        homeNetGame:
          type: string
        awayNetMatch:
          type: integer
          format: int32
        awayNetSets:
          type: array
          items:
            type: integer
            format: int32
        awayNetGame:
          type: string
        serve:
          $ref: "#/components/schemas/TeamType"
    ObjectId:
      type: string
      format: ObjectId
      description: MongoDB ObjectId represented as a string.
    Officials:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
          type: string
          examples:
          - Internal id
        broadcastId:
          type: string
        broadcastExtId:
          type: string
        persons:
          type: array
          items:
            $ref: "#/components/schemas/Person"
        siteId:
          type: string
        season:
          type: string
    Outcome:
      type: string
      enum:
      - BLOCK
      - MISS
      - SAVE
      - POST
      - GOAL
    Person:
      type: object
      properties:
        id:
          type: string
        extId:
          type: string
        role:
          $ref: "#/components/schemas/Role"
        firstName:
          type: string
        lastName:
          type: string
        num:
          type: integer
          format: int32
        position:
          $ref: "#/components/schemas/Position"
        attributes:
          type: array
          items:
            $ref: "#/components/schemas/Attribute"
    Person1:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/ObjectId"
          type: string
          examples:
          - Internal id
        siteId:
          type: string
        extId:
          type: string
        role:
          $ref: "#/components/schemas/Role"
        clubId:
          type: string
        playerLevelName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        num:
          type: integer
          format: int32
        position:
          $ref: "#/components/schemas/Position"
        image:
          $ref: "#/components/schemas/File"
        followerCount:
          type: integer
          format: int32
        userProfile:
          $ref: "#/components/schemas/UserProfile"
        created:
          $ref: "#/components/schemas/Date"
        updated:
          $ref: "#/components/schemas/Date"
    PersonStatsResponse:
      type: object
      properties:
        goals:
          type: integer
          format: int32
        assists:
          type: integer
          format: int32
    PlayerLevel:
      type: object
      required:
      - name
      - gender
      - category
      properties:
        name:
          type: string
        extId:
          type: string
        maxAge:
          type: integer
          format: int32
        gender:
          $ref: "#/components/schemas/Gender"
        category:
          $ref: "#/components/schemas/AgeCategory"
    Position:
      type: string
      enum:
      - GK
      - GK2
      - LD
      - RD
      - D
      - F
      - LW
      - CF
      - RW
      - M
      - MF
      - L
      - HEAD
      - ASSIST
      - LINE
      - STAFF
      - MISC
    Privacy:
      type: string
      enum:
      - PUBLIC
      - PRIVATE
    Role:
      type: string
      enum:
      - PLAYER
      - COACH
      - REFEREE
    Role1:
      type: string
      enum:
      - PLAYER
      - COACH
      - REFEREE
      - GOALIE
    SortOrder:
      type: string
      enum:
      - Ascending
      - Descending
    Sport:
      type: string
      enum:
      - ICE_HOCKEY
      - HANDBALL
      - BASKETBALL
      - FOOTBALL
      - FLOORBALL
      - VOLLEYBALL
      - TENNIS
      - RUGBY
      - FIELD_HOCKEY
      - RINKBALL
      - RINGETTE
      - BANDY
      - FIGURE_SKATING
      - TABLE_TENNIS
      - MARTIAL_ARTS
      - CHEER_LEADING
      - SHORT_TRACK
      - LONG_TRACK
      - CURLING
      - NETBALL
      - NETBALL_SUPER_SHOT
      - NETBALL_FAST_5
      - FUTSAL
      - TOUCH_RUGBY
    StorageType:
      type: string
      enum:
      - LAS_FILES
      - LPP
      - EXTERNAL
    Team:
      type: object
      properties:
        clubName:
          type: string
        shortName:
          type: string
        teamName:
          type: string
        teamLogoUrl:
          type: string
        teamHex:
          type: string
    TeamType:
      type: string
      enum:
      - HOME
      - AWAY
      - TEAM
      - ROSTER
    UserProfile:
      type: object
      properties:
        userId:
          type: string
        bio:
          type: string
        image:
          $ref: "#/components/schemas/File"
        verified:
          type: boolean
        privacy:
          $ref: "#/components/schemas/Privacy"
  securitySchemes:
    SecurityScheme:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authentication
paths:
  /match-event:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MatchEvent"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchEvent"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Match Event
      tags:
      - Match Event Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
    get:
      parameters:
      - name: action-or-assisting-player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: action-or-assisting-player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: action-player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: action-player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: assisting-player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: assisting-player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: broadcast-ext-id
        in: query
        schema:
          type: string
      - name: broadcast-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: competition-id
        in: query
        schema:
          type: string
      - name: duration-in-secs
        in: query
        schema:
          type: integer
          format: int32
      - name: event-type
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/MatchEventType"
      - name: exclude-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: external-id
        in: query
        schema:
          type: string
      - name: filter
        in: query
        schema:
          $ref: "#/components/schemas/FilterType"
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: group-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: level1
        in: query
        schema:
          type: string
      - name: level2
        in: query
        schema:
          type: string
      - name: matchup-group-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: min-away-goals
        in: query
        schema:
          type: integer
          format: int32
      - name: min-home-goals
        in: query
        schema:
          type: integer
          format: int32
      - name: minute
        in: query
        schema:
          type: integer
          format: int32
      - name: name
        in: query
        schema:
          type: string
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
      - name: period
        in: query
        schema:
          type: array
          items:
            type: integer
            format: int32
      - name: player-against-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-against-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-for-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-for-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-level-name
        in: query
        schema:
          type: string
      - name: replacement-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: replacement-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: result-changed
        in: query
        schema:
          type: boolean
      - name: season
        in: query
        schema:
          type: string
      - name: second
        in: query
        schema:
          type: integer
          format: int32
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      - name: team-type
        in: query
        schema:
          $ref: "#/components/schemas/TeamType"
      - name: to
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchEvent"
      summary: Get Match Events
      tags:
      - Match Event Resource
  /match-event/broadcast-info:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BroadcastInfo"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BroadcastInfo"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Broadcast Info
      tags:
      - Broadcast Info Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/clock-info:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClockInfo"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClockInfo"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Match Event
      tags:
      - Clock Info Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
    get:
      parameters:
      - name: broadcast-ext-id
        in: query
        schema:
          type: string
      - name: broadcast-id
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
      - name: period
        in: query
        schema:
          type: integer
          format: int32
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      - name: to
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: type
        in: query
        schema:
          $ref: "#/components/schemas/ClockEventType1"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ClockInfo"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Clock Infos
      tags:
      - Clock Info Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
        - GraphicsProducer
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClockInfo"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClockInfo"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Match Event
      tags:
      - Clock Info Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/clock-info/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClockInfo"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Clock Info By Id
      tags:
      - Clock Info Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
    delete:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: boolean
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Delete Clock Info By Id
      tags:
      - Clock Info Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/lineup:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Lineup"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Lineup"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Lineup
      tags:
      - Lineup Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
    get:
      parameters:
      - name: broadcast-ext-id
        in: query
        schema:
          type: string
      - name: broadcast-filter
        in: query
        schema:
          $ref: "#/components/schemas/FilterType"
      - name: broadcast-id
        in: query
        schema:
          type: string
      - name: club-ext-id
        in: query
        schema:
          type: string
      - name: club-id
        in: query
        schema:
          type: string
      - name: club-name
        in: query
        schema:
          type: string
      - name: coach-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: coach-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: competition-id
        in: query
        schema:
          type: string
      - name: first-name
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: goalie-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: goalie-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: group-id
        in: query
        schema:
          type: string
      - name: id
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/ObjectId"
      - name: last-name
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: person-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: person-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: person-role
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/Role1"
      - name: player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-level
        in: query
        schema:
          type: string
      - name: season
        in: query
        schema:
          type: string
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      - name: substitute-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: substitute-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: team-ext-id
        in: query
        schema:
          type: string
      - name: team-id
        in: query
        schema:
          type: string
      - name: team-name
        in: query
        schema:
          type: string
      - name: team-type
        in: query
        schema:
          $ref: "#/components/schemas/TeamType"
      - name: to
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: site-id
        in: header
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Lineup"
      summary: Get Lineups
      tags:
      - Lineup Resource
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Lineup"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Lineup"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Lineup
      tags:
      - Lineup Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/lineup/group/{groupId}/player-level:
    get:
      parameters:
      - name: groupId
        in: path
        required: true
        schema:
          type: string
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Document"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Group Player Levels
      tags:
      - Lineup Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
  /match-event/lineup/person:
    get:
      parameters:
      - name: broadcast-ext-id
        in: query
        schema:
          type: string
      - name: broadcast-filter
        in: query
        schema:
          $ref: "#/components/schemas/FilterType"
      - name: broadcast-id
        in: query
        schema:
          type: string
      - name: club-ext-id
        in: query
        schema:
          type: string
      - name: club-id
        in: query
        schema:
          type: string
      - name: club-name
        in: query
        schema:
          type: string
      - name: coach-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: coach-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: competition-id
        in: query
        schema:
          type: string
      - name: first-name
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: goalie-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: goalie-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: group-id
        in: query
        schema:
          type: string
      - name: id
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/ObjectId"
      - name: last-name
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: person-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: person-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: person-role
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/Role1"
      - name: player-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: player-level
        in: query
        schema:
          type: string
      - name: season
        in: query
        schema:
          type: string
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      - name: substitute-ext-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: substitute-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: team-ext-id
        in: query
        schema:
          type: string
      - name: team-id
        in: query
        schema:
          type: string
      - name: team-name
        in: query
        schema:
          type: string
      - name: team-type
        in: query
        schema:
          $ref: "#/components/schemas/TeamType"
      - name: to
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: site-id
        in: header
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LineupPerson"
      summary: Get Persons From Lineups
      tags:
      - Lineup Resource
  /match-event/lineup/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Lineup"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Lineup By Id
      tags:
      - Lineup Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
    delete:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: boolean
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Delete Lineup By Id
      tags:
      - Lineup Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/officials:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Officials"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Officials"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Officials
      tags:
      - Officials Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
    get:
      parameters:
      - name: broadcast-ext-id
        in: query
        schema:
          type: string
      - name: broadcast-id
        in: query
        schema:
          type: string
      - name: first-name
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: id
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/ObjectId"
      - name: last-name
        in: query
        schema:
          type: string
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: person-ext-id
        in: query
        schema:
          type: string
      - name: person-id
        in: query
        schema:
          type: string
      - name: position
        in: query
        schema:
          $ref: "#/components/schemas/Position"
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      - name: to
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Officials"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Officials
      tags:
      - Officials Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
        - Viewer
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Officials"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Officials"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Officials
      tags:
      - Officials Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/officials/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Officials"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Officials By Id
      tags:
      - Officials Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
        - Viewer
    delete:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: boolean
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Delete Officials
      tags:
      - Officials Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/person:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Person1"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Person1"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Person
      tags:
      - Person Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
    get:
      parameters:
      - name: club-id
        in: query
        schema:
          type: array
          items:
            type: string
      - name: exclude-clubless-persons
        in: query
        schema:
          type: boolean
      - name: ext-id
        in: query
        schema:
          type: string
      - name: first-name
        in: query
        schema:
          type: string
      - name: id
        in: query
        schema:
          type: array
          items:
            $ref: "#/components/schemas/ObjectId"
      - name: last-name
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
      - name: number
        in: query
        schema:
          type: integer
          format: int32
      - name: page-index
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: page-size
        in: query
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: player-level
        in: query
        schema:
          type: array
          items:
            type: string
      - name: position
        in: query
        schema:
          $ref: "#/components/schemas/Position"
      - name: role
        in: query
        schema:
          $ref: "#/components/schemas/Role"
      - name: site-id
        in: query
        schema:
          type: string
      - name: sort-column
        in: query
        schema:
          type: string
      - name: sort-order
        in: query
        schema:
          $ref: "#/components/schemas/SortOrder"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Person1"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Persons
      tags:
      - Person Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
  /match-event/person/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Person1"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Person By Id
      tags:
      - Person Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
  /match-event/person/{personId}/stats:
    get:
      parameters:
      - name: personId
        in: path
        required: true
        schema:
          type: string
      - name: event-type
        in: query
        schema:
          $ref: "#/components/schemas/MatchEventType"
      - name: site-id
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonStatsResponse"
      summary: Get Person Stats
      tags:
      - Person Stats Resource
  /match-event/standing:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MatchStanding"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchStanding"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Patch Match Standing
      tags:
      - Match Standing Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MatchStanding"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchStanding"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Match Standing
      tags:
      - Match Standing Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/standings:
    get:
      parameters:
      - name: competition-id
        in: query
        schema:
          type: string
      - name: site-id
        in: query
        schema:
          type: string
      - name: start-date
        in: query
        schema:
          $ref: "#/components/schemas/Date"
      - name: site-id
        in: header
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BroadcastStanding"
      summary: Get Broadcast Standings
      tags:
      - Match Standing Resource
  /match-event/torneopal/webhook:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        "201":
          description: Created
      summary: On Message
      tags:
      - Torneopal Match Data Webhook Resource
  /match-event/v2:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MatchEvent"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchEvent"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      summary: Create Match Event
      tags:
      - Match Event Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
  /match-event/{broadcastId}/standing:
    get:
      parameters:
      - name: broadcastId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchStanding"
      summary: Get Match Standing For Broadcast Id
      tags:
      - Match Standing Resource
  /match-event/{id}:
    get:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MatchEvent"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Get Match Event
      tags:
      - Match Event Resource
      security:
      - SecurityScheme:
        - System
        - SuperAdmin
        - Admin
        - Member
        - Viewer
    delete:
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: boolean
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      summary: Delete Match Event By Id
      tags:
      - Match Event Resource
      security:
      - SecurityScheme:
        - Admin
        - SuperAdmin
        - System
        - Member
info:
  title: Match-Event Service API
  version: 1.0.0-SNAPSHOT
