openapi: 3.1.0 info: title: Api version: 0.1.0 description: SoccerWatch API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: auth description: Authentication - name: fields description: Soccer fields - name: recordings description: Field recordings - name: weeklyHighlights description: Weekly highlight stories - name: clips description: Highlight clips - name: savedClips description: User saved clips - name: likes description: Clip likes - name: account description: User account - name: ads description: Ad serving - name: banners description: Banner content from storage - name: admin description: Admin ad management - name: users description: User profiles and follows - name: academies description: Soccer academies - name: academyConsole description: Academy Console membership and dashboard - name: academyFinance description: Owner-only Academy Console finance operations - name: claimMatch description: Claim Your Match tracking and player identity - name: friends description: Friend and teammate identity requests - name: owner description: Field owner footage console - name: streaming description: Social stream controls paths: /admin/reviewer-sign-in-links: post: operationId: createAdminReviewerSignInLinks tags: [admin] summary: Create one-use reviewer sign-in links for a Replay user security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminReviewerSignInLinksInput" responses: "201": description: Reviewer sign-in URLs content: application/json: schema: $ref: "#/components/schemas/ReviewerSignInLinksResponse" "400": description: Invalid request or excluded target account "403": description: Admin access required "404": description: Replay user not found "502": description: Clerk could not create sign-in tokens /friends/player-identification-requests/sent: get: operationId: listSentPlayerIdentificationRequests tags: [friends] summary: List teammate identity suggestions sent by the current player security: - clerkSession: [] responses: "200": description: Sent teammate suggestions and their current statuses content: application/json: schema: type: array items: $ref: "#/components/schemas/SentPlayerIdentificationRequest" "401": description: Unauthenticated /friends/player-identification-requests/{id}: delete: operationId: withdrawPlayerIdentificationRequest tags: [friends] summary: Withdraw a pending teammate identity suggestion security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer minimum: 1 responses: "200": description: Suggestion withdrawn content: application/json: schema: $ref: "#/components/schemas/PlayerIdentificationRequestActionResponse" "400": description: Invalid request ID "401": description: Unauthenticated "404": description: Pending suggestion not found or not owned by the requester /live/rtmp/status/{cam}: get: operationId: getStreamingStatus tags: [streaming] summary: Get social streaming status for an authorized camera security: - clerkSession: [] parameters: - name: cam in: path required: true schema: type: string enum: [camera1, camera2] responses: "200": description: Sanitized streaming status content: application/json: schema: $ref: "#/components/schemas/LiveRtmpStatus" "401": description: Unauthenticated "403": description: Camera access denied "404": description: Camera or match not found "503": description: Control server is not configured "502": description: Control server unavailable /live/rtmp/start/{cam}: post: operationId: startStreaming tags: [streaming] summary: Start streaming to a social platform security: - clerkSession: [] parameters: - name: cam in: path required: true schema: type: string enum: [camera1, camera2] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/StreamingStartInput" responses: "200": description: Stream started content: application/json: schema: $ref: "#/components/schemas/LiveRtmpStatus" "400": description: Invalid streaming request "401": description: Unauthenticated "403": description: Camera access denied "404": description: Camera or match not found "409": description: Stream could not be started "503": description: Control server is not configured "502": description: Control server unavailable /live/rtmp/stop/{cam}: post: operationId: stopStreaming tags: [streaming] summary: Stop social streaming for an authorized camera security: - clerkSession: [] parameters: - name: cam in: path required: true schema: type: string enum: [camera1, camera2] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/StreamingStopInput" responses: "200": description: Stream stopped content: application/json: schema: $ref: "#/components/schemas/LiveRtmpStatus" "400": description: Invalid streaming request "401": description: Unauthenticated "403": description: Camera access denied "404": description: Camera or match not found "409": description: Stream could not be stopped "503": description: Control server is not configured "502": description: Control server unavailable /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /highlights/home: get: operationId: getHomeWeeklyHighlight tags: [weeklyHighlights] security: - clerkSession: [] responses: "200": description: Chosen personal or field highlight, or null content: application/json: schema: oneOf: - $ref: "#/components/schemas/WeeklyHighlight" - type: "null" "401": description: Authenticated account required /highlights/{id}: get: operationId: getWeeklyHighlight tags: [weeklyHighlights] security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Published highlight content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlight" "401": description: Authenticated account required "404": description: Highlight not found or not visible to this player /admin/weekly-highlights/candidates: get: operationId: getWeeklyHighlightCandidates tags: [weeklyHighlights] security: - clerkSession: [] parameters: - name: weekStart in: query required: true schema: type: string format: date responses: "200": description: Eligible clips and saved picks for a Saturday week content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightCandidates" "401": description: Authenticated account required "403": description: Admin access required /admin/weekly-highlights/save: post: operationId: saveWeeklyHighlightPicks tags: [weeklyHighlights] security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightPicksInput" responses: "200": description: Saved draft highlight IDs content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightSaveResult" "401": description: Authenticated account required "403": description: Admin access required "400": description: Invalid picks /admin/weekly-highlights/publish: post: operationId: publishWeeklyHighlights tags: [weeklyHighlights] security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightPicksInput" responses: "200": description: Published highlight IDs and generated notices content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightPublishResult" "401": description: Authenticated account required "403": description: Admin access required "400": description: Invalid picks /admin/weekly-highlights/notices: get: operationId: listWeeklyHighlightNotices tags: [weeklyHighlights] security: - clerkSession: [] responses: "200": description: Player notices with share links content: application/json: schema: type: array items: $ref: "#/components/schemas/WeeklyHighlightNotice" "401": description: Authenticated account required "403": description: Admin access required /admin/weekly-highlights/notices/{id}/copied: post: operationId: markWeeklyHighlightNoticeCopied tags: [weeklyHighlights] security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Notice marked as copied content: application/json: schema: $ref: "#/components/schemas/WeeklyHighlightCopiedResult" "401": description: Authenticated account required "403": description: Admin access required "404": description: Notice not found /auth/login: post: operationId: login tags: [auth] summary: Login with email and password requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LoginInput" responses: "200": description: Logged in content: application/json: schema: $ref: "#/components/schemas/AuthResponse" "401": description: Invalid credentials /auth/guest: post: operationId: loginAsGuest tags: [auth] summary: Browse as guest responses: "200": description: Guest session created content: application/json: schema: $ref: "#/components/schemas/AuthResponse" /auth/logout: post: operationId: logout tags: [auth] summary: Log out responses: "200": description: Logged out /auth/me: get: operationId: getMe tags: [auth] summary: Get current user responses: "200": description: Current user content: application/json: schema: $ref: "#/components/schemas/User" "401": description: Unauthenticated /owner/fields: get: operationId: listOwnerFields tags: [owner] summary: List fields owned by the current user security: - clerkSession: [] responses: "200": description: Owned fields content: application/json: schema: type: array items: $ref: "#/components/schemas/OwnerField" "401": description: Unauthenticated "403": description: Owner or admin access required /owner/fields/{fieldId}/availability/{date}: get: operationId: getOwnerFieldAvailability tags: [owner] summary: Get camera availability for an owned field and date security: - clerkSession: [] parameters: - name: fieldId in: path required: true schema: type: integer - name: date in: path required: true schema: type: string pattern: '^\d{4}-\d{2}-\d{2}$' responses: "200": description: Camera availability content: application/json: schema: $ref: "#/components/schemas/OwnerAvailability" "400": description: Invalid field or date "403": description: Owner or admin access required "404": description: Field or camera not found "503": description: Camera unreachable /owner/fields/{fieldId}/requests: get: operationId: listOwnerFieldRequests tags: [owner] summary: List footage requests for an owned field security: - clerkSession: [] parameters: - name: fieldId in: path required: true schema: type: integer responses: "200": description: Footage requests content: application/json: schema: type: array items: $ref: "#/components/schemas/OwnerRequest" "400": description: Invalid field id "403": description: Owner or admin access required "404": description: Field not found post: operationId: createOwnerFieldRequest tags: [owner] summary: Request footage from an owned field security: - clerkSession: [] parameters: - name: fieldId in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerRequestInput" responses: "201": description: Footage request created content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "400": description: Invalid request "403": description: Owner or admin access required "404": description: Field not found "503": description: Camera unavailable /owner/requests/{id}/revoke-link: post: operationId: revokeOwnerRequestLink tags: [owner] summary: Revoke a footage share link security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Link revoked content: application/json: schema: $ref: "#/components/schemas/OwnerLinkResult" "403": description: Owner or admin access required "404": description: Request not found /owner/requests/{id}/new-link: post: operationId: createOwnerRequestLink tags: [owner] summary: Create a new footage share link security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: New link content: application/json: schema: $ref: "#/components/schemas/OwnerLinkResult" "403": description: Owner or admin access required "404": description: Request not found /owner/requests/{id}/cancel: post: operationId: cancelOwnerRequest tags: [owner] summary: Cancel an active owner footage request before delivery security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Active request cancelled content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "403": description: Owner or admin access required "404": description: Request not found "409": description: Request cannot be cancelled "502": description: Camera pull cancellation failed /owner/requests/{id}/cancellation: post: operationId: createOwnerFootageCancellationRequest tags: [owner] summary: Ask for a delivered footage refund security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerCancellationInput" responses: "201": description: Cancellation request submitted content: application/json: schema: $ref: "#/components/schemas/OwnerCancellationRequest" "400": description: Invalid reason "403": description: Owner or admin access required "404": description: Request not found "409": description: Cancellation request unavailable /owner/requests/{id}/var-marks: get: operationId: listOwnerVarMarks tags: [owner] summary: List VAR marks for an owned footage request security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: VAR marks content: application/json: schema: type: array items: $ref: "#/components/schemas/VarMark" "403": description: Owner or admin access required "404": description: Request not found post: operationId: createOwnerVarMark tags: [owner] summary: Mark a moment in an owned VAR request security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/VarMarkInput" responses: "201": description: VAR mark created content: application/json: schema: $ref: "#/components/schemas/VarMark" "400": description: Invalid mark or marked time "403": description: Owner or admin access required "404": description: Request not found "409": description: VAR marking window is closed /owner/var-marks/{markId}: delete: operationId: deleteOwnerVarMark tags: [owner] summary: Delete a VAR mark created by the current user security: - clerkSession: [] parameters: - name: markId in: path required: true schema: type: integer responses: "204": description: VAR mark deleted "401": description: Unauthenticated "403": description: Only the creator or an admin can delete this mark "404": description: Mark not found /owner/fields/{fieldId}/ledger: get: operationId: getOwnerFieldLedger tags: [owner] summary: Get charges, payments, and balance for an owned field security: - clerkSession: [] parameters: - name: fieldId in: path required: true schema: type: integer responses: "200": description: Field ledger content: application/json: schema: $ref: "#/components/schemas/OwnerLedger" "403": description: Owner or admin access required "404": description: Field not found /admin/footage-owners: get: operationId: listAdminFootageOwners tags: [admin] summary: List field footage owner assignments security: - clerkSession: [] responses: "200": description: Owner assignments content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminFootageOwner" "403": description: Admin access required post: operationId: addAdminFootageOwner tags: [admin] summary: Assign a field footage owner by email security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminFootageOwnerInput" responses: "201": description: Owner assignment created content: application/json: schema: $ref: "#/components/schemas/AdminFootageOwner" "403": description: Admin access required "404": description: Field or user not found "409": description: Assignment already exists delete: operationId: removeAdminFootageOwner tags: [admin] summary: Remove a field footage owner by email security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminFootageOwnerInput" responses: "200": description: Owner assignment removed "403": description: Admin access required "404": description: Assignment not found /admin/footage-billing: get: operationId: getAdminFootageBilling tags: [admin] summary: Get footage charges, payments, balances, and recent payments security: - clerkSession: [] responses: "200": description: Footage billing overview content: application/json: schema: $ref: "#/components/schemas/AdminFootageBilling" "403": description: Admin access required /admin/footage-requests: get: operationId: listAdminFootageRequests tags: [admin] summary: List recent failed footage requests that can be recovered security: - clerkSession: [] responses: "200": description: Recent failed footage requests content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminFailedFootageRequest" "403": description: Admin access required /admin/footage-requests/{id}/recheck: post: operationId: recheckAdminFootageRequest tags: [admin] summary: Re-check a recent failed footage request security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Current footage request status after the re-check content: application/json: schema: $ref: "#/components/schemas/AdminFootageRecheckResult" "400": description: Invalid footage request id "403": description: Admin access required "404": description: Footage request not found "409": description: Request is not eligible for recovery /admin/footage-cancellation-requests: get: operationId: listAdminFootageCancellationRequests tags: [admin] summary: List owner delivered-footage cancellation requests security: - clerkSession: [] responses: "200": description: Cancellation requests content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminFootageCancellationRequest" "403": description: Admin access required /admin/footage-cancellation-requests/{id}: patch: operationId: reviewAdminFootageCancellationRequest tags: [admin] summary: Approve or decline an owner footage cancellation request security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminFootageCancellationReview" responses: "200": description: Cancellation request reviewed "400": description: Invalid review "403": description: Admin access required "404": description: Request not found "409": description: Request already reviewed /admin/fields/{fieldId}/payments: post: operationId: recordAdminFootagePayment tags: [admin] summary: Record a field footage payment in JOD security: - clerkSession: [] parameters: - name: fieldId in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminFootagePaymentInput" responses: "201": description: Payment recorded content: application/json: schema: $ref: "#/components/schemas/AdminFootagePayment" "400": description: Invalid amount or payment method "403": description: Admin access required "404": description: Field not found /account: delete: operationId: deleteAccount tags: [account] summary: Delete the authenticated player's account and associated personal data security: - clerkSession: [] responses: "200": description: Account deleted content: application/json: schema: $ref: "#/components/schemas/AccountDeletionResponse" "401": description: An authenticated non-guest account is required content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "403": description: Self-service deletion is not available for administrators content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "404": description: Account not found content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "409": description: Account has active footage requests or is a field owner content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "429": description: Self-service deletion attempt limit reached content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "500": description: Local account cleanup failed; the local account was disabled content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "502": description: Identity provider deletion failed; local account data was not changed content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" /account/consents: patch: operationId: updateConsents tags: [account] summary: Save recording and social media consent requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MediaConsentInput" responses: "200": description: Updated consent state content: application/json: schema: $ref: "#/components/schemas/User" "400": description: Recording consent is required "401": description: Unauthenticated /fields: get: operationId: listFields tags: [fields] summary: List all fields responses: "200": description: List of fields content: application/json: schema: type: array items: $ref: "#/components/schemas/Field" /fields/{id}: get: operationId: getField tags: [fields] summary: Get field by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Field content: application/json: schema: $ref: "#/components/schemas/Field" "404": description: Not found /bunny/collections: get: operationId: getBunnyCollections tags: [fields] summary: List all Bunny Stream collections (one per field) responses: "200": description: List of collections content: application/json: schema: type: array items: $ref: "#/components/schemas/BunnyCollection" /bunny/collections/{guid}/videos: get: operationId: getBunnyCollectionVideos tags: [fields] summary: Get videos in a Bunny Stream collection parameters: - name: guid in: path required: true schema: type: string responses: "200": description: List of videos in the collection content: application/json: schema: type: array items: $ref: "#/components/schemas/BunnyVideo" /fields/{id}/videos: get: operationId: getFieldVideos tags: [fields] summary: Get Bunny Stream videos for a field parameters: - name: id in: path required: true schema: type: integer responses: "200": description: List of Bunny Stream videos for this field content: application/json: schema: type: array items: $ref: "#/components/schemas/BunnyVideo" /fields/{id}/recordings: get: operationId: getFieldRecordings tags: [recordings] summary: Get recordings for a field parameters: - name: id in: path required: true schema: type: integer responses: "200": description: List of recordings content: application/json: schema: type: array items: $ref: "#/components/schemas/FieldRecording" /recording-views: post: operationId: recordRecordingView tags: [recordings] summary: Record a signed-in viewer starting a recording requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RecordingViewInput" responses: "204": description: View recorded, or ignored for an anonymous guest "400": description: Invalid input "404": description: Recording is not available /recording-views/watch-time: post: operationId: recordRecordingWatchTime tags: [recordings] summary: Add verified playback time to a recording view requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RecordingWatchTimeInput" responses: "204": description: Playback time recorded "400": description: Invalid input "404": description: Recording is not available /admin/recordings/{id}/viewers: get: operationId: getRecordingViewers tags: [recordings] summary: List viewers of a recording parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Signed-in viewers, most recently active first content: application/json: schema: type: array items: $ref: "#/components/schemas/RecordingViewer" "403": description: Admin access required "404": description: Recording not found /admin/owner-recordings: get: operationId: listAdminOwnerRecordings tags: [recordings] summary: List ready streamless owner recordings for admins responses: "200": description: Ready private owner footage backed by Storage content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminOwnerRecording" "403": description: Admin access required /recordings/{id}: get: operationId: getRecording tags: [recordings] summary: Get a recording by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Recording content: application/json: schema: $ref: "#/components/schemas/Recording" "404": description: Not found /recordings/{id}/claim-match: get: operationId: getClaimMatch tags: [claimMatch] summary: Get a recording tracking bundle security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Claim Your Match state content: application/json: schema: $ref: "#/components/schemas/ClaimMatchResponse" "401": description: Authenticated account required "404": description: Recording or tracking bundle not found /recordings/{id}/claim-match/roster: get: operationId: getClaimMatchRoster tags: [claimMatch] summary: Get the optional match-wide player roster security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Match roster with a few existing sprite crops per player content: application/json: schema: $ref: "#/components/schemas/ClaimMatchRosterResponse" "401": description: Authenticated account required "404": description: Recording or match roster not found /claim-match/clips: get: operationId: listClaimMatchClips tags: [claimMatch] summary: List the current player's earned match moments security: - clerkSession: [] responses: "200": description: Earned match moments grouped by recording content: application/json: schema: $ref: "#/components/schemas/ClaimMatchClipsResponse" "401": description: Authenticated account required /admin/claim-match/disputes: get: operationId: listClaimMatchDisputes tags: [admin] summary: List claim identity disputes awaiting admin review security: - clerkSession: [] responses: "200": description: Claim disputes content: application/json: schema: $ref: "#/components/schemas/ClaimMatchDisputesResponse" "403": description: Admin required /admin/analysis-jobs/quote: get: operationId: getAdminAnalysisJobQuote tags: [admin] summary: Estimate analysis completion time and GPU cost security: - clerkSession: [] parameters: - name: seconds in: query required: true schema: type: number exclusiveMinimum: 0 responses: "200": description: Current estimates for supported finish targets content: application/json: schema: $ref: "#/components/schemas/AnalysisJobQuote" "400": description: Invalid seconds value "401": description: Authenticated admin required "503": description: Control server is not configured "502": description: Control server unavailable default: description: Upstream quote service failure /admin/claim-match/disputes/{id}: patch: operationId: resolveClaimMatchDispute tags: [admin] summary: Transfer a disputed person to one claimant security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ResolveClaimMatchDisputeInput" responses: "200": description: Dispute resolved content: application/json: schema: $ref: "#/components/schemas/ClaimMatchDispute" "400": description: Invalid dispute decision "403": description: Admin required "404": description: Dispute not found /admin/claim-match/bindings/{id}/release: post: operationId: releaseClaimMatchBinding tags: [admin] summary: Release a human-vouched fragment so it can be regrouped security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Binding released content: application/json: schema: $ref: "#/components/schemas/ClaimIdentityBinding" "403": description: Admin required "404": description: Identity binding not found /admin/recordings/{id}/claim-match/bindings: get: operationId: listClaimMatchBindings tags: [admin] summary: List claim identity bindings and their human-vouched fragments security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Claim identity bindings content: application/json: schema: type: array items: $ref: "#/components/schemas/ClaimIdentityBinding" "403": description: Admin required "400": description: Invalid recording id /admin/recordings/{id}/claim-match/chain-for-user: post: operationId: setClaimChainForUser tags: [admin] summary: Set a player's claim chain on their behalf, through the real claim flow description: >- Stores the parts as the player's own claim chain (marked fully reviewed, so the player is not re-asked at every crossing), moves them off any board rows that held them, and syncs the binding, completion, earned clips and stats exactly as the player's own taps do. With dryRun it validates and returns the resulting state without writing. security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimChainForUserInput" responses: "200": description: The player's chain and claim state after the write (or as it would be, on a dry run) content: application/json: schema: $ref: "#/components/schemas/ClaimChainForUser" "400": description: Invalid body, unknown track, frames outside a track, reversed or overlapping parts "401": description: Authenticated account required "403": description: Admin required "404": description: User, recording or tracking bundle not found "409": description: The parts were built against a replaced bundle content: application/json: schema: $ref: "#/components/schemas/ClaimChainConflict" /recordings/{id}/claim-match/segments/{segmentIndex}: get: operationId: getClaimMatchSegment tags: [claimMatch] summary: Get one compressed tracking segment for the current player security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer - name: segmentIndex in: path required: true schema: type: integer minimum: 0 responses: "200": description: Tracking segment headers: Content-Encoding: schema: type: string enum: [gzip] Cache-Control: schema: type: string content: application/json: schema: $ref: "#/components/schemas/TrackingSegment" "401": description: Authenticated account required "404": description: Recording or tracking segment not found /recordings/{id}/claim-match/jersey/{segmentIndex}: get: operationId: getClaimMatchJersey tags: [claimMatch] summary: Get shirt-number readings for one tracking segment security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer - name: segmentIndex in: path required: true schema: type: integer minimum: 0 responses: "200": description: Normalized jersey readings without per-frame retuning data headers: Content-Encoding: schema: type: string enum: [gzip] Cache-Control: schema: type: string content: application/json: schema: $ref: "#/components/schemas/JerseySidecar" "401": description: Authenticated account required "404": description: Recording or jersey sidecar not found /recordings/{id}/claim-match/off-pitch: post: operationId: createClaimMatchOffPitchSpan tags: [claimMatch] summary: Declare a tracking-time period with no playable pitch action security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimOffPitchInput" responses: "201": description: Off-pitch period recorded content: application/json: schema: $ref: "#/components/schemas/ClaimOffPitchSpan" "200": description: Idempotent replay of an existing period content: application/json: schema: $ref: "#/components/schemas/ClaimOffPitchSpan" "400": description: Invalid tracking-time period "401": description: Authenticated account required "404": description: Recording or tracking bundle not found "409": description: The period overlaps vouched identity fragments and requires explicit confirmation /recordings/{id}/claim-match/off-pitch/{clientId}: delete: operationId: deleteClaimMatchOffPitchSpan tags: [claimMatch] summary: Delete an off-pitch period by client id security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer - name: clientId in: path required: true schema: type: string responses: "200": description: Off-pitch period deleted content: application/json: schema: $ref: "#/components/schemas/ClaimOffPitchDeleteResponse" "400": description: Invalid recording or client id "401": description: Authenticated account required "404": description: Off-pitch period not found /admin/recordings/{id}/tracking-bundle: patch: operationId: updateTrackingBundle tags: [admin] summary: Update tracking-bundle metadata and pitch calibration parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminTrackingBundlePatchBody" responses: "200": description: Tracking-bundle metadata stored content: application/json: schema: $ref: "#/components/schemas/AdminTrackingBundlePatchResponse" "400": description: Invalid tracking-bundle metadata or pitch model "403": description: Forbidden "404": description: Tracking bundle not found put: operationId: replaceTrackingBundle tags: [admin] summary: Upload or replace a recording tracking bundle parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TrackingBundle" multipart/form-data: schema: type: object required: [bundle] properties: bundle: type: string description: ZIP file containing manifest.json and the segment JSON files responses: "200": description: Tracking bundle stored content: application/json: schema: $ref: "#/components/schemas/TrackingBundleSummary" "400": description: Invalid tracking bundle "403": description: Forbidden "404": description: Recording not found /admin/recordings/{id}/match-window: patch: operationId: setRecordingMatchWindow tags: [admin] summary: Set or clear where the match is on a recording description: >- Stores manifest.provenance.matchWindow, in tracking-clock seconds (the clock of segments, events and claim parts). Everything a player's numbers, moments and claim picker come from is clipped to it: match and team stats, the report and Home tiles, the claim picker's booking windows, claim coverage (measured against the window's length), earned clips and personal moments. startSeconds null clears it. It does not change the bundle fingerprint, so no claim is invalidated. parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminMatchWindowBody" responses: "200": description: Match window stored (or cleared) content: application/json: schema: $ref: "#/components/schemas/AdminMatchWindowResponse" "400": description: Invalid window (needs 0 <= start < end <= duration) "403": description: Forbidden "404": description: Tracking bundle not found /admin/recordings/{id}/player-metrics: get: operationId: getAdminRecordingPlayerMetrics tags: [admin] summary: Get claim player metrics including unvalidated top speed parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Player metrics for claims on this recording content: application/json: schema: $ref: "#/components/schemas/AdminRecordingPlayerMetricsResponse" "403": description: Forbidden "404": description: Recording or tracking bundle not found /academies: get: operationId: listAcademies tags: [academies] summary: List all academies responses: "200": description: List of academies content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademySummary" /academies/{id}: get: operationId: getAcademy tags: [academies] summary: Get an academy by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Academy detail content: application/json: schema: $ref: "#/components/schemas/AcademySummary" "404": description: Not found /academies/{id}/recordings: get: operationId: getAcademyRecordings tags: [academies] summary: Get recordings linked to an academy parameters: - name: id in: path required: true schema: type: integer responses: "200": description: List of recordings for this academy content: application/json: schema: type: array items: $ref: "#/components/schemas/Recording" /join/{code}: get: operationId: getPublicAcademyJoin tags: [academyJoin] summary: Get public academy registration details parameters: - name: code in: path required: true schema: type: string pattern: "^[A-HJ-NP-Z2-9]{8}$" responses: "200": description: Academy details and available squads content: application/json: schema: $ref: "#/components/schemas/AcademyJoinPublicInfo" "404": description: Registration link not found post: operationId: submitPublicAcademyRegistration tags: [academyJoin] summary: Submit a public player registration parameters: - name: code in: path required: true schema: type: string pattern: "^[A-HJ-NP-Z2-9]{8}$" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyJoinRegistrationInput" responses: "200": description: Existing pending registration matched; no duplicate was inserted content: application/json: schema: $ref: "#/components/schemas/AcademyJoinSubmissionResult" "201": description: Registration submitted for academy review content: application/json: schema: $ref: "#/components/schemas/AcademyJoinSubmissionResult" "400": description: Invalid registration details or squad "404": description: Registration link not found "429": description: Too many registration attempts /academy/console/academies/{academyId}/join-link: get: operationId: getAcademyConsoleJoinLink tags: [academyConsole] summary: Get the public player-registration link security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Current registration link, if one exists content: application/json: schema: $ref: "#/components/schemas/AcademyJoinLink" "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found post: operationId: regenerateAcademyConsoleJoinLink tags: [academyConsole] summary: Create or regenerate the public player-registration link security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: New registration link content: application/json: schema: $ref: "#/components/schemas/AcademyJoinLink" "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found /academy/console/academies/{academyId}/registrations: get: operationId: listAcademyConsoleRegistrations tags: [academyConsole] summary: List academy registration submissions security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: status in: query required: false schema: type: string enum: [pending, approved, rejected] default: pending responses: "200": description: Registrations filtered by review status content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyRegistrationSummary" "400": description: Invalid academy ID or status "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found /academy/console/academies/{academyId}/registrations/{registrationId}/approve: post: operationId: approveAcademyConsoleRegistration tags: [academyConsole] summary: Approve a pending registration and create its player security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: registrationId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyRegistrationApproval" responses: "200": description: Created academy player summary content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerSummary" "400": description: Invalid approval details "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy, registration, or squad not found "409": description: Registration is no longer pending /academy/console/academies/{academyId}/registrations/{registrationId}/reject: post: operationId: rejectAcademyConsoleRegistration tags: [academyConsole] summary: Reject a pending registration security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: registrationId in: path required: true schema: type: integer minimum: 1 responses: "204": description: Registration rejected "400": description: Invalid academy or registration ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or registration not found "409": description: Registration is no longer pending /academy/console/memberships: get: operationId: getAcademyConsoleMemberships tags: [academyConsole] summary: List the signed-in user's academy memberships and roles security: - clerkSession: [] responses: "200": description: Academy memberships for the signed-in user content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyConsoleMembership" "401": description: Unauthenticated "403": description: The signed-in user has no academy memberships /academy/console/academies/{academyId}/dashboard: get: operationId: getAcademyConsoleDashboard tags: [academyConsole] summary: Get academy dashboard counts for the next seven days security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Academy identity, roles, and academy-scoped counts content: application/json: schema: $ref: "#/components/schemas/AcademyConsoleDashboard" "401": description: Unauthenticated "403": description: The signed-in user is not a member of this academy "404": description: Academy not found /academy/console/academies/{academyId}/squads: get: operationId: listAcademyConsoleSquads tags: [academyConsole] summary: List squads and active player counts for an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Squads in the academy with active player counts content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademySquadSummary" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found post: operationId: createAcademyConsoleSquad tags: [academyConsole] summary: Create a squad in an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademySquadInput" responses: "201": description: Created squad with its active player count content: application/json: schema: $ref: "#/components/schemas/AcademySquadSummary" "400": description: Invalid squad input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found /academy/console/academies/{academyId}/squads/{squadId}: patch: operationId: updateAcademyConsoleSquad tags: [academyConsole] summary: Update a squad in an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: squadId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademySquadUpdate" responses: "200": description: Updated squad with its active player count content: application/json: schema: $ref: "#/components/schemas/AcademySquadSummary" "400": description: Invalid squad input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or squad not found in this academy delete: operationId: deleteAcademyConsoleSquad tags: [academyConsole] summary: Delete a squad unless its players have outstanding balances security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: squadId in: path required: true schema: type: integer minimum: 1 responses: "204": description: Squad deleted; assigned players are retained and unassigned "400": description: Invalid academy or squad ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or squad not found in this academy "409": description: One or more players have an outstanding balance /academy/console/academies/{academyId}/players: get: operationId: listAcademyConsolePlayers tags: [academyConsole] summary: List all players in an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Players in the academy, including squad and linked account details content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyPlayerSummary" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found post: operationId: createAcademyConsolePlayer tags: [academyConsole] summary: Add a player to an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerInput" responses: "201": description: Created player content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerSummary" "400": description: Invalid player input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or squad not found in this academy /academy/console/academies/{academyId}/players/{playerId}: patch: operationId: updateAcademyConsolePlayer tags: [academyConsole] summary: Update a player's details, squad, status, or linked Replay account security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerUpdate" responses: "200": description: Updated player content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerSummary" "400": description: Invalid player input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy, player, squad, or Replay user not found /academy/family/claim: post: operationId: claimAcademyFamily tags: [academyFamily] summary: Link an active academy player to the signed-in guardian account security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFamilyClaimInput" responses: "200": description: The player linked to the guardian account headers: Cache-Control: schema: type: string example: no-store content: application/json: schema: $ref: "#/components/schemas/AcademyFamilyClaim" "400": description: Invalid invite token "401": description: Unauthenticated, guest, or disabled account "404": description: Active player invite not found "429": description: Too many claim attempts /academy/family/me: get: operationId: getAcademyFamilyMe tags: [academyFamily] summary: Read the family view for a player linked to the current account security: - clerkSession: [] parameters: - name: playerId in: query required: false schema: type: integer minimum: 1 - name: from in: query required: false schema: type: string pattern: '^\d{4}-\d{2}-\d{2}$' - name: to in: query required: false schema: type: string pattern: '^\d{4}-\d{2}-\d{2}$' responses: "200": description: Family view and player switcher for the linked active academy players headers: Cache-Control: schema: type: string example: no-store content: application/json: schema: $ref: "#/components/schemas/AcademyFamily" "400": description: Invalid date window "401": description: Unauthenticated "404": description: No accessible active player or selected player is not linked to the current account /academy/console/academies/{academyId}/players/{playerId}/family-link: get: operationId: getAcademyConsolePlayerFamilyLink tags: [academyConsole] summary: Get the family link for one player security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Existing family URL, or null when no link has been created content: application/json: schema: $ref: "#/components/schemas/AcademyConsoleFamilyLink" "400": description: Invalid academy or player ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or active player not found post: operationId: regenerateAcademyConsolePlayerFamilyLink tags: [academyConsole] summary: Create or rotate the family link for one active player security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 responses: "200": description: The new family URL; any previous URL is invalidated content: application/json: schema: $ref: "#/components/schemas/AcademyConsoleFamilyLink" "400": description: Invalid academy or player ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or active player not found /academy/console/academies/{academyId}/players/{playerId}/guardians: get: operationId: listAcademyConsolePlayerGuardians tags: [academyConsole] summary: List guardian accounts linked to an active player security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Guardian accounts for this player content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyPlayerGuardian" "400": description: Invalid academy or player ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or active player not found post: operationId: addAcademyConsolePlayerGuardian tags: [academyConsole] summary: Link an existing account as a player guardian security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerGuardianInput" responses: "200": description: The linked guardian account content: application/json: schema: $ref: "#/components/schemas/AcademyPlayerGuardian" "400": description: Invalid email address "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy, active player, or eligible Replay account not found /academy/console/academies/{academyId}/players/{playerId}/guardians/{userId}: delete: operationId: removeAcademyConsolePlayerGuardian tags: [academyConsole] summary: Remove a guardian account from a player security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 - name: userId in: path required: true schema: type: integer minimum: 1 responses: "204": description: Guardian association removed, if present "400": description: Invalid academy, player, or user ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or active player not found /academy/console/academies/{academyId}/sessions: get: operationId: listAcademyConsoleSessions tags: [academyConsole] summary: List sessions in an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Sessions in the academy, with squad names and UTC timestamps content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademySessionSummary" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found post: operationId: createAcademyConsoleSession tags: [academyConsole] summary: Create a training session or match security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademySessionInput" responses: "201": description: Created session content: application/json: schema: $ref: "#/components/schemas/AcademySessionSummary" "400": description: Invalid session input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or squad not found in this academy /academy/console/academies/{academyId}/sessions/{sessionId}/live/status: get: operationId: getAcademyConsoleSessionLiveStatus tags: [academyConsole] summary: Get HLS live status for a booked academy session security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Session live state and same-origin playlist route content: application/json: schema: $ref: "#/components/schemas/AcademyLiveSessionStatus" "401": description: Unauthenticated "404": description: Session not found or not accessible /academy/family/sessions/{sessionId}/live/status: get: operationId: getAcademyFamilySessionLiveStatus tags: [academyFamily] summary: Get HLS live status for an accessible family session security: - clerkSession: [] parameters: - name: sessionId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Session live state and same-origin playlist route content: application/json: schema: $ref: "#/components/schemas/AcademyLiveSessionStatus" "401": description: Unauthenticated "404": description: Session not found or not accessible /academy/console/academies/{academyId}/sessions/{sessionId}: patch: operationId: updateAcademyConsoleSession tags: [academyConsole] summary: Update a session or match result security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademySessionUpdate" responses: "200": description: Updated session content: application/json: schema: $ref: "#/components/schemas/AcademySessionSummary" "400": description: Invalid session input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy, session, or squad not found in this academy delete: operationId: deleteAcademyConsoleSession tags: [academyConsole] summary: Delete a session and its attendance records security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 responses: "204": description: Session and its attendance records deleted "400": description: Invalid academy or session ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or session not found in this academy /academy/console/academies/{academyId}/sessions/{sessionId}/footage/retry: post: operationId: retryAcademySessionFootage tags: [academyConsole] summary: Retry footage booking for an academy session security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Current session and footage status content: application/json: schema: $ref: "#/components/schemas/AcademySessionSummary" "400": description: Invalid academy or session ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or session not found in this academy /academy/console/academies/{academyId}/sessions/{sessionId}/attendance: get: operationId: getAcademyConsoleAttendance tags: [academyConsole] summary: Get the attendance sheet for a session security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Eligible players and their saved attendance statuses content: application/json: schema: $ref: "#/components/schemas/AcademyAttendanceSheet" "400": description: Invalid academy or session ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Session not found in this academy put: operationId: updateAcademyConsoleAttendance tags: [academyConsole] summary: Upsert attendance statuses for eligible session players security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: sessionId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyAttendanceInput" responses: "200": description: Updated attendance sheet content: application/json: schema: $ref: "#/components/schemas/AcademyAttendanceSheet" "400": description: Invalid or duplicate player attendance entries "401": description: Unauthenticated "403": description: Academy membership required "404": description: Session or player not found in this academy or session roster /academy/console/academies/{academyId}/recordings: get: operationId: listAcademyConsoleRecordings tags: [academyConsole] summary: List recordings linked to an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Academy-linked recordings, newest first content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyConsoleRecording" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found /academy/console/academies/{academyId}/recordings/{recordingId}/session: patch: operationId: updateAcademyConsoleRecordingSession tags: [academyConsole] summary: Attach an academy recording to a session or clear its session link security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: recordingId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyRecordingSessionUpdate" responses: "200": description: Updated academy recording and its session label content: application/json: schema: $ref: "#/components/schemas/AcademyConsoleRecording" "400": description: Invalid recording or session assignment "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy, recording, or session not found in this academy /academy/console/academies/{academyId}/announcements: get: operationId: listAcademyConsoleAnnouncements tags: [academyConsole] summary: List academy announcements security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Announcements, newest first content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyAnnouncementSummary" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy not found post: operationId: createAcademyConsoleAnnouncement tags: [academyConsole] summary: Create an academy announcement security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyAnnouncementInput" responses: "201": description: Created announcement content: application/json: schema: $ref: "#/components/schemas/AcademyAnnouncementSummary" "400": description: Invalid announcement input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Academy or squad not found in this academy /academy/console/academies/{academyId}/announcements/{announcementId}: patch: operationId: updateAcademyConsoleAnnouncement tags: [academyConsole] summary: Update an academy announcement security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: announcementId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyAnnouncementUpdate" responses: "200": description: Updated announcement content: application/json: schema: $ref: "#/components/schemas/AcademyAnnouncementSummary" "400": description: Invalid announcement input "401": description: Unauthenticated "403": description: Academy membership required "404": description: Announcement or squad not found in this academy delete: operationId: deleteAcademyConsoleAnnouncement tags: [academyConsole] summary: Delete an academy announcement security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: announcementId in: path required: true schema: type: integer minimum: 1 responses: "204": description: Announcement deleted "400": description: Invalid academy or announcement ID "401": description: Unauthenticated "403": description: Academy membership required "404": description: Announcement not found in this academy /academy/console/academies/{academyId}/finance/dashboard: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: getAcademyFinanceDashboard tags: [academyFinance] summary: Get current-month finance totals and items needing attention security: - clerkSession: [] responses: "200": description: Finance dashboard calculated for the current month in Amman time content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceDashboard" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found /academy/console/academies/{academyId}/finance/teams: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceTeams tags: [academyFinance] summary: List squads with payment status and outstanding totals security: - clerkSession: [] responses: "200": description: Squad finance summaries for this academy content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyFinanceTeam" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found post: operationId: createAcademyFinanceTeam tags: [academyFinance] summary: Create a squad with its monthly fee security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceTeamInput" responses: "201": description: Created squad finance summary content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceTeam" "400": description: Invalid team input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found /academy/console/academies/{academyId}/finance/unassigned-players: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceUnassignedPlayers tags: [academyFinance] summary: List active players without a squad and their unpaid one-off fees security: - clerkSession: [] responses: "200": description: Active squadless players with outstanding one-off fees content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyFinanceUnassignedPlayer" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found /academy/console/academies/{academyId}/finance/teams/{squadId}: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: squadId in: path required: true schema: type: integer minimum: 1 patch: operationId: updateAcademyFinanceTeam tags: [academyFinance] summary: Update a squad's monthly fee security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceTeamMonthlyFeeUpdate" responses: "200": description: Updated squad finance summary content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceTeam" "400": description: Invalid team input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or squad not found /academy/console/academies/{academyId}/finance/teams/{squadId}/players: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: squadId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceTeamPlayers tags: [academyFinance] summary: List players and their current balances for a squad security: - clerkSession: [] responses: "200": description: Players with calculated subscription and one-off fee balances content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyFinancePlayer" "400": description: Invalid academy or squad ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Squad not found in this academy post: operationId: createAcademyFinanceTeamPlayer tags: [academyFinance] summary: Add a roster player with billing information security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinancePlayerInput" responses: "201": description: Created roster player with calculated billing status content: application/json: schema: $ref: "#/components/schemas/AcademyFinancePlayer" "400": description: Invalid player input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Squad not found in this academy /academy/console/academies/{academyId}/finance/players/{playerId}/billing: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 patch: operationId: updateAcademyFinancePlayerBilling tags: [academyFinance] summary: Update a player's monthly discount and subscription expiry security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinancePlayerBillingUpdate" responses: "200": description: Updated player billing summary content: application/json: schema: $ref: "#/components/schemas/AcademyFinancePlayer" "400": description: Invalid billing input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Player not found in this academy /academy/console/academies/{academyId}/finance/players/{playerId}/renewals: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 post: operationId: createAcademyFinancePlayerRenewal tags: [academyFinance] summary: Record a subscription renewal and extend the existing expiry date security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceRenewalInput" responses: "201": description: Recorded renewal payment and updated subscription expiry content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceRenewal" "400": description: Invalid renewal input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Player not found in this academy /academy/console/academies/{academyId}/finance/players/{playerId}/renewals/{renewalId}: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 - name: renewalId in: path required: true schema: type: integer minimum: 1 delete: operationId: deleteAcademyFinancePlayerRenewal tags: [academyFinance] summary: Undo the player's most recent renewal security: - clerkSession: [] responses: "204": description: Renewal undone and subscription expiry restored "400": description: Invalid academy, player, or renewal ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Renewal not found in this academy "409": description: Only the latest renewal can be undone /academy/console/academies/{academyId}/finance/players/{playerId}/fees: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: playerId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinancePlayerFees tags: [academyFinance] summary: List a player's existing one-off fees security: - clerkSession: [] responses: "200": description: One-off fee rows stored in academy_fees content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyFinanceFee" "400": description: Invalid academy or player ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Player not found in this academy post: operationId: createAcademyFinancePlayerFee tags: [academyFinance] summary: Add a one-off fee to an existing player security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceFeeInput" responses: "201": description: Created one-off fee content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceFee" "400": description: Invalid fee input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Player not found in this academy /academy/console/academies/{academyId}/finance/fees/{feeId}: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: feeId in: path required: true schema: type: integer minimum: 1 patch: operationId: markAcademyFinanceFeePaid tags: [academyFinance] summary: Mark an existing one-off fee as paid security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceFeePaymentInput" responses: "200": description: Updated one-off fee content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceFee" "400": description: Invalid fee update "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Fee not found in this academy "409": description: A waived fee cannot be marked as paid delete: operationId: deleteAcademyFinanceFee tags: [academyFinance] summary: Delete a fee record security: - clerkSession: [] responses: "204": description: Fee deleted "400": description: Invalid academy or fee ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Fee not found in this academy /academy/console/academies/{academyId}/finance/staff: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceStaff tags: [academyFinance] summary: List academy finance staff security: - clerkSession: [] responses: "200": description: Staff in the academy content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyFinanceStaff" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found "409": description: Category already exists post: operationId: createAcademyFinanceStaff tags: [academyFinance] summary: Add an academy finance staff member security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceStaffInput" responses: "201": description: Created staff member content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceStaff" "400": description: Invalid staff input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found /academy/console/academies/{academyId}/finance/staff/{staffId}: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: staffId in: path required: true schema: type: integer minimum: 1 patch: operationId: updateAcademyFinanceStaff tags: [academyFinance] summary: Update an academy finance staff member security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceStaffUpdate" responses: "200": description: Updated staff member content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceStaff" "400": description: Invalid staff update "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Staff member not found in this academy /academy/console/academies/{academyId}/finance/staff/{staffId}/salary-payment: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: staffId in: path required: true schema: type: integer minimum: 1 post: operationId: recordAcademyFinanceSalaryPayment tags: [academyFinance] summary: Record a paid salary expense and advance the next salary date security: - clerkSession: [] responses: "201": description: Recorded salary payment and updated staff member content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceSalaryPayment" "400": description: Invalid academy or staff ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Staff member not found in this academy /academy/console/academies/{academyId}/finance/other-payments: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceOtherPayments tags: [academyFinance] summary: List current-month payments and unpaid payments carried over from earlier months security: - clerkSession: [] responses: "200": description: Current-month payment rows and paid/unpaid totals content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPaymentList" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found post: operationId: createAcademyFinanceOtherPayment tags: [academyFinance] summary: Record an other payment as paid or unpaid security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPaymentInput" responses: "201": description: Created other payment content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPayment" "400": description: Invalid payment input "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy or payment category not found /academy/console/academies/{academyId}/finance/other-payments/{paymentId}: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: paymentId in: path required: true schema: type: integer minimum: 1 patch: operationId: markAcademyFinanceOtherPaymentPaid tags: [academyFinance] summary: Mark an unpaid other payment as paid security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPaymentStatusUpdate" responses: "200": description: Updated other payment content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPayment" "400": description: Invalid payment update "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Payment not found in this academy delete: operationId: deleteAcademyFinanceOtherPayment tags: [academyFinance] summary: Delete an other-payment record security: - clerkSession: [] responses: "204": description: Payment deleted "400": description: Invalid academy or payment ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Payment not found in this academy /academy/console/academies/{academyId}/finance/other-payments/{paymentId}/repeat: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: paymentId in: path required: true schema: type: integer minimum: 1 post: operationId: repeatAcademyFinanceOtherPayment tags: [academyFinance] summary: Repeat a payment today as unpaid security: - clerkSession: [] responses: "201": description: Created repeated payment with unpaid status content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceOtherPayment" "400": description: Invalid academy or payment ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Payment not found in this academy /academy/console/academies/{academyId}/finance/categories: parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 get: operationId: listAcademyFinanceCategories tags: [academyFinance] summary: List built-in and academy-specific other-payment categories security: - clerkSession: [] responses: "200": description: Built-in and custom categories content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceCategoryList" "400": description: Invalid academy ID "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found post: operationId: createAcademyFinanceCategory tags: [academyFinance] summary: Save a custom other-payment category for this academy security: - clerkSession: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceCategoryInput" responses: "201": description: Created custom category content: application/json: schema: $ref: "#/components/schemas/AcademyFinanceCategory" "400": description: Invalid or duplicate category "401": description: Unauthenticated "403": description: Academy owner role required "404": description: Academy not found "409": description: Category already exists /admin/academies/{academyId}/members: get: operationId: listAcademyMembers tags: [admin] summary: List role assignments for an academy security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 responses: "200": description: Academy members and assigned roles content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademyMemberListItem" "401": description: Unauthenticated "403": description: Admin access required "404": description: Academy not found post: operationId: addAcademyMember tags: [admin] summary: Assign an academy role to an existing Replay user by email security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AcademyMemberAssignment" responses: "200": description: The user's current academy roles, including the requested role content: application/json: schema: $ref: "#/components/schemas/AcademyMemberSummary" "400": description: Invalid assignment "401": description: Unauthenticated "403": description: Admin access required "404": description: Academy or existing Replay user not found /admin/academies/{academyId}/members/{userId}/{role}: delete: operationId: removeAcademyMemberRole tags: [admin] summary: Remove one academy role assignment without removing other roles security: - clerkSession: [] parameters: - name: academyId in: path required: true schema: type: integer minimum: 1 - name: userId in: path required: true schema: type: integer minimum: 1 - name: role in: path required: true schema: type: string enum: [owner, manager, coach] responses: "204": description: Role assignment removed "401": description: Unauthenticated "403": description: Admin access required "404": description: Academy member role not found /admin/academies: get: operationId: listAdminAcademies tags: [admin] summary: List all academies (admin) responses: "200": description: List of academies content: application/json: schema: type: array items: $ref: "#/components/schemas/AcademySummary" post: operationId: createAcademy tags: [admin] summary: Create a new academy requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateAcademyInput" responses: "201": description: Academy created content: application/json: schema: $ref: "#/components/schemas/AcademySummary" "403": description: Forbidden /admin/academies/{id}: patch: operationId: updateAcademy tags: [admin] summary: Update an academy parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateAcademyInput" responses: "200": description: Academy updated content: application/json: schema: $ref: "#/components/schemas/AcademySummary" "403": description: Forbidden "404": description: Not found delete: operationId: deleteAcademy tags: [admin] summary: Delete an academy parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted "403": description: Forbidden /admin/academies/{id}/recordings: post: operationId: addAcademyRecording tags: [admin] summary: Link a recording to an academy parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AddAcademyRecordingInput" responses: "204": description: Added "403": description: Forbidden /admin/academies/{id}/recordings/{recordingId}: delete: operationId: removeAcademyRecording tags: [admin] summary: Unlink a recording from an academy parameters: - name: id in: path required: true schema: type: integer - name: recordingId in: path required: true schema: type: integer responses: "204": description: Removed "403": description: Forbidden /matches/{code}/live/status: get: operationId: getMatchLiveStatus tags: [matches] summary: Get public live playback availability for a match code parameters: - name: code in: path required: true schema: type: string responses: "200": description: Live playback and ball-follow availability; contains no upstream media URLs content: application/json: schema: $ref: "#/components/schemas/MatchLiveStatusResponse" "404": description: Match not found "429": description: Rate limited /matches/{code}/live/{variant}/playlist.m3u8: get: operationId: getMatchLivePlaylist tags: [matches] summary: Proxy a match-scoped HLS playlist parameters: - name: code in: path required: true schema: type: string - name: variant in: path required: true schema: type: string enum: [hls, hevc, pan] responses: "200": description: Rewritten HLS playlist content: application/vnd.apple.mpegurl: schema: type: string "404": description: Match or playback window unavailable "429": description: Rate limited /matches/{code}/live/{variant}/seg/{name}: get: operationId: getMatchLiveSegment tags: [matches] summary: Proxy a segment from a match-scoped live playlist parameters: - name: code in: path required: true schema: type: string - name: variant in: path required: true schema: type: string enum: [hls, hevc, pan] - name: name in: path required: true schema: type: string responses: "200": description: Proxied media segment content: video/mp2t: schema: type: string format: binary video/mp4: schema: type: string format: binary "404": description: Match or playback window unavailable "429": description: Rate limited /matches/{code}/live-clips: post: operationId: createMatchLiveClip tags: [matches, clips] summary: Capture a live DVR window into a user clip parameters: - name: code in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MatchLiveClipInput" responses: "201": description: Live clip capture queued or failed during setup content: application/json: schema: $ref: "#/components/schemas/MatchLiveClipResponse" "400": description: Invalid time window "401": description: Sign in required "409": description: Ball-follow path unavailable "429": description: Rate limited /matches/{code}/live-clips/{id}/status: get: operationId: getMatchLiveClipStatus tags: [matches, clips] summary: Get the current user's live clip processing state parameters: - name: code in: path required: true schema: type: string - name: id in: path required: true schema: type: integer responses: "200": description: Current clip processing and export state content: application/json: schema: $ref: "#/components/schemas/MatchLiveClipStatusResponse" "401": description: Sign in required "404": description: Clip not found "429": description: Rate limited /user-clips: post: operationId: createUserClip tags: [clips] summary: Create a user clip from a full match video requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateUserClipInput" responses: "201": description: Clip created content: application/json: schema: $ref: "#/components/schemas/UserClip" "401": description: Unauthenticated get: operationId: listUserClips tags: [clips] summary: List clips created by the current user responses: "200": description: User's created clips content: application/json: schema: type: array items: $ref: "#/components/schemas/UserClip" "401": description: Unauthenticated /user-clips/{id}: delete: operationId: deleteUserClip tags: [clips] summary: Delete a user-created clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Clip deleted "401": description: Unauthenticated "403": description: Not your clip "404": description: Not found patch: operationId: updateUserClip tags: [clips] summary: Update a user-created clip (visibility or title) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateUserClipInput" responses: "200": description: Clip updated content: application/json: schema: $ref: "#/components/schemas/UserClip" "401": description: Unauthenticated "403": description: Not your clip "404": description: Not found /user-clips/{id}/like: post: operationId: toggleUserClipLike tags: [likes] summary: Toggle like on a user clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Like toggled content: application/json: schema: $ref: "#/components/schemas/LikeResult" "401": description: Unauthenticated "404": description: Not found /user-clips/{id}/view: post: operationId: recordView tags: [clips] summary: Record a view for a user clip (engagement tracking) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ViewInput" responses: "200": description: View recorded content: application/json: schema: $ref: "#/components/schemas/EngagementResult" "404": description: Not found /user-clips/{id}/share: post: operationId: recordShare tags: [clips] summary: Record a share for a user clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Share recorded content: application/json: schema: $ref: "#/components/schemas/EngagementResult" "404": description: Not found /user-clips/{id}/share-link: get: operationId: getUserClipShareLink tags: [clips] summary: Get the public share and poster URLs for a clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Public share URLs content: application/json: schema: $ref: "#/components/schemas/ShareLinkResult" "401": description: Unauthenticated "404": description: Not found /feed: get: operationId: getFeed tags: [clips] summary: Get the shared user clip feed, visibility-filtered, ordered by engagement score responses: "200": description: Feed of user clips with creator info content: application/json: schema: type: array items: $ref: "#/components/schemas/FeedClip" /clips: get: operationId: listClips tags: [clips] summary: Get ranked highlights feed for current week responses: "200": description: Ranked clips feed content: application/json: schema: type: array items: $ref: "#/components/schemas/Clip" /clips/{id}: get: operationId: getClip tags: [clips] summary: Get a single clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Clip content: application/json: schema: $ref: "#/components/schemas/Clip" "404": description: Not found /clips/{id}/like: post: operationId: toggleLike tags: [likes] summary: Toggle like on a clip parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Like toggled content: application/json: schema: $ref: "#/components/schemas/LikeResult" /saved-clips: get: operationId: listSavedClips tags: [savedClips] summary: Get user's saved clips responses: "200": description: Saved clips content: application/json: schema: type: array items: $ref: "#/components/schemas/Clip" /saved-clips/{clipId}: put: operationId: saveClip tags: [savedClips] summary: Save a clip parameters: - name: clipId in: path required: true schema: type: integer responses: "200": description: Clip saved delete: operationId: unsaveClip tags: [savedClips] summary: Unsave a clip parameters: - name: clipId in: path required: true schema: type: integer responses: "200": description: Clip unsaved /account/stats: get: operationId: getAccountStats tags: [account] summary: Get current user stats (saved clips count, likes given, fields visited) responses: "200": description: Account stats content: application/json: schema: $ref: "#/components/schemas/AccountStats" /account/claimed-matches: get: operationId: getAccountClaimedMatches tags: [account] summary: List the current player's claimed match history security: - clerkSession: [] responses: "200": description: Claimed match history content: application/json: schema: $ref: "#/components/schemas/ClaimedMatchHistoryResponse" "401": description: Unauthenticated /account/locale: patch: operationId: updateLocale tags: [account] summary: Persist the user's preferred locale requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LocaleInput" responses: "200": description: Locale updated content: application/json: schema: $ref: "#/components/schemas/User" "401": description: Unauthenticated /account/profile: patch: operationId: updateProfile tags: [account] summary: Update user profile (onboarding) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProfileInput" responses: "200": description: Profile updated content: application/json: schema: $ref: "#/components/schemas/User" "401": description: Unauthenticated /ads/next: get: operationId: getNextAd tags: [ads] summary: Get next ad for current user (frequency-capped) responses: "200": description: Next ad to show content: application/json: schema: $ref: "#/components/schemas/Ad" "204": description: No ad available /ads/{id}/impression: post: operationId: recordImpression tags: [ads] summary: Record an ad impression parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ImpressionInput" responses: "200": description: Impression recorded /ads/{id}/click: post: operationId: recordClick tags: [ads] summary: Record an ad click parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Click recorded /users/{id}: get: operationId: getUserProfile tags: [users] summary: Get a public player profile parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Public player profile content: application/json: schema: $ref: "#/components/schemas/PublicProfile" "404": description: Not found /users/{id}/portfolio: get: operationId: getUserPortfolio tags: [users] summary: Get a player's public portfolio parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Public portfolio content: application/json: schema: $ref: "#/components/schemas/PortfolioView" "404": description: Player not found patch: operationId: updateUserPortfolio tags: [users] summary: Update the signed-in player's portfolio parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdatePortfolioInput" responses: "200": description: Portfolio updated content: application/json: schema: $ref: "#/components/schemas/PortfolioView" "401": description: Unauthenticated "403": description: Only the portfolio owner can update it "404": description: Player not found "413": description: Profile photo is too large /portfolio-clips/{id}/{token}/clip.mp4: get: operationId: getPortfolioClipMedia tags: [users] summary: Stream a rendered clip shared to a player portfolio parameters: - name: id in: path required: true schema: type: integer - name: token in: path required: true schema: type: string responses: "200": description: Rendered portfolio clip content: video/mp4: schema: type: string format: binary "206": description: Byte range from the rendered portfolio clip content: video/mp4: schema: type: string format: binary "404": description: Clip is not public, not shared, hidden, or the token is invalid "410": description: Clip source has expired "503": description: Source availability could not be checked /users/{id}/stats: get: operationId: getPublicPlayerStats tags: [users] summary: Get confirmed cross-match player stats parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Confirmed public player stats content: application/json: schema: $ref: "#/components/schemas/PublicPlayerStats" "404": description: Player not found /users/{id}/follow: post: operationId: followUser tags: [users] summary: Follow a user parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Followed content: application/json: schema: $ref: "#/components/schemas/FollowResult" "401": description: Unauthenticated "404": description: Not found delete: operationId: unfollowUser tags: [users] summary: Unfollow a user parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Unfollowed content: application/json: schema: $ref: "#/components/schemas/FollowResult" "401": description: Unauthenticated "404": description: Not found /banners: get: operationId: listBanners tags: [banners] summary: List all banners from Bunny storage responses: "200": description: Available banners content: application/json: schema: type: array items: $ref: "#/components/schemas/Banner" /admin/users/{id}: delete: operationId: deleteAdminUser tags: [admin] summary: Delete a user account as an administrator security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Account deleted content: application/json: schema: $ref: "#/components/schemas/AccountDeletionResponse" "400": description: Invalid user ID content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "403": description: Admin access required content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "404": description: User not found content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "409": description: Active footage, last administrator, or administrator self-delete content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "500": description: Local account cleanup failed; the local account was disabled content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" "502": description: Identity provider deletion failed; local account data was not changed content: application/json: schema: $ref: "#/components/schemas/AccountDeletionError" /admin/ads: get: operationId: listAdminAds tags: [admin] summary: List all ad campaigns (admin) responses: "200": description: All campaigns content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminAdEntry" post: operationId: createAd tags: [admin] summary: Create a new ad campaign (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateAdInput" responses: "201": description: Campaign created content: application/json: schema: $ref: "#/components/schemas/AdminAdEntry" /admin/ads/{id}: patch: operationId: updateAd tags: [admin] summary: Update ad status (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PatchAdInput" responses: "200": description: Campaign updated content: application/json: schema: $ref: "#/components/schemas/AdminAdEntry" /admin/ads/{id}/stats: get: operationId: getAdStats tags: [admin] summary: Get stats for an ad campaign (admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Campaign stats content: application/json: schema: $ref: "#/components/schemas/AdStats" /admin/clips/source-check: post: operationId: checkAdminClipsSources tags: [admin] summary: Check whether selected clip sources are playable in Bunny Stream requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminClipIdsInput" responses: "200": description: Source availability for each selected clip content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminClipSourceCheckResult" /admin/clips/export-repair: post: operationId: repairAdminClipExports tags: [admin] summary: Preview or repair expired and failed clip exports requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminClipExportRepairInput" responses: "200": description: Probe results and any applied repairs content: application/json: schema: $ref: "#/components/schemas/AdminClipExportRepairResponse" "400": description: Invalid filters or missing apply confirmation "403": description: Admin access required /admin/clips/{id}/playback: get: operationId: getAdminClipPlayback tags: [admin] summary: Stream a clip's completed export to an admin with byte-range support security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Completed MP4 export content: video/mp4: schema: type: string format: binary "206": description: Partial MP4 export for a byte-range request content: video/mp4: schema: type: string format: binary "400": description: Invalid clip id "403": description: Admin access required "404": description: Export is not ready content: application/json: schema: $ref: "#/components/schemas/AdminClipPlaybackNotReady" /admin/clips/reclip: post: operationId: reclipAdminClips tags: [admin] summary: Check and re-render selected clips using the existing clip rows requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminClipIdsInput" responses: "200": description: Per-clip re-clip queue results content: application/json: schema: type: array items: $ref: "#/components/schemas/AdminClipReclipResult" /admin/clips/{id}/source-check: post: operationId: checkAdminClipSource tags: [admin] summary: Check whether one clip source is playable in Bunny Stream parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Source availability content: application/json: schema: $ref: "#/components/schemas/AdminClipSourceCheckResult" /admin/clips/{id}/reclip: post: operationId: reclipAdminClip tags: [admin] summary: Check and re-render one clip using its existing row parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Re-clip queue result content: application/json: schema: $ref: "#/components/schemas/AdminClipReclipResult" /recordings/{id}/claim-match/chain: get: operationId: getClaimChain tags: [claimMatch] summary: The caller's claim chain for this recording, and where playback should next stop security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: The chain, empty if the caller has not started one content: application/json: schema: $ref: "#/components/schemas/ClaimChain" "401": description: Authenticated account required "403": description: Recording is not visible to players yet "404": description: Recording or tracking bundle not found /recordings/{id}/claim-match/chain/tap: post: operationId: tapClaimChain tags: [claimMatch] summary: "\"That is me, here.\" The only way a chain grows" security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimChainTapInput" responses: "200": description: The chain after the tap content: application/json: schema: $ref: "#/components/schemas/ClaimChain" "400": description: Unknown track, or a piece the identity board has struck off "401": description: Authenticated account required "403": description: Recording is not visible to players yet "404": description: Recording or tracking bundle not found "409": description: Another player has vouched for that stretch, or the bundle has been replaced content: application/json: schema: $ref: "#/components/schemas/ClaimChainConflict" /recordings/{id}/claim-match/chain/not-me: post: operationId: rejectClaimChainFrom tags: [claimMatch] summary: "\"That is not me, and has not been since here.\" Always available" security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimChainFrameInput" responses: "200": description: The chain, truncated at the given frame content: application/json: schema: $ref: "#/components/schemas/ClaimChain" "400": description: Invalid body "401": description: Authenticated account required "403": description: Recording is not visible to players yet "404": description: Recording or tracking bundle not found "409": description: The tracking bundle has been replaced content: application/json: schema: $ref: "#/components/schemas/ClaimChainConflict" /recordings/{id}/claim-match/chain/confirm: post: operationId: confirmClaimChainAt tags: [claimMatch] summary: "\"Yes, still me.\" Recorded because silence is not a label" security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ClaimChainFrameInput" responses: "200": description: The unchanged chain, with the label outcome content: application/json: schema: $ref: "#/components/schemas/ClaimChain" "400": description: Invalid body "401": description: Authenticated account required "403": description: Recording is not visible to players yet "404": description: Recording or tracking bundle not found /recordings/{id}/claim-match/chain/last: delete: operationId: undoClaimChainLast tags: [claimMatch] summary: Undo the last link. Writes no label -- a mis-tap is not evidence security: - clerkSession: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: The chain with its last link removed content: application/json: schema: $ref: "#/components/schemas/ClaimChain" "401": description: Authenticated account required "403": description: Recording is not visible to players yet "404": description: Recording or tracking bundle not found components: schemas: WeeklyHighlightClip: type: object required: [position, clipId, eventType, title, startTime, endTime, videoUrl, previewUrl, previewStart, previewEnd, downloadAvailable] properties: position: { type: integer } clipId: { type: integer } eventType: { type: string, enum: [goal, assist, save, tackle] } minute: { type: ["integer", "null"] } youX: { type: ["number", "null"] } youY: { type: ["number", "null"] } title: { type: string } startTime: { type: string } endTime: { type: string } matchCode: { type: ["string", "null"] } matchDate: { type: ["string", "null"] } availableUntil: { type: ["string", "null"], format: date-time } videoUrl: { type: string } previewUrl: { type: string } previewStart: { type: number, description: Normalized source-window start, from 0 to 1 } previewEnd: { type: number, description: Normalized source-window end, from 0 to 1 } downloadAvailable: { type: boolean, description: Whether an MP4 export is available to download } WeeklyHighlight: type: object required: [id, userId, fieldId, weekStart, weekEnd, title, clipCount, durationSec, status, publishedAt, fieldName, kind, clips] properties: id: { type: integer } userId: { type: ["integer", "null"] } fieldId: { type: integer } weekStart: { type: string, format: date } weekEnd: { type: string, format: date } title: { type: string } clipCount: { type: integer } durationSec: { type: integer } status: { type: string, enum: [draft, published] } publishedAt: { type: ["string", "null"], format: date-time } fieldName: { type: string } kind: { type: string, enum: [personal, field] } clips: type: array items: $ref: "#/components/schemas/WeeklyHighlightClip" WeeklyHighlightPick: type: object required: [clipId, eventType] properties: clipId: { type: integer } eventType: { type: string, enum: [goal, assist, save, tackle] } minute: { type: ["integer", "null"] } youX: { type: ["number", "null"] } youY: { type: ["number", "null"] } WeeklyHighlightGroupInput: type: object required: [fieldId, clips] properties: userId: { type: integer } fieldId: { type: integer } clips: type: array items: $ref: "#/components/schemas/WeeklyHighlightPick" WeeklyHighlightPicksInput: type: object required: [weekStart, personal, fields] properties: weekStart: { type: string, format: date } personal: type: array items: $ref: "#/components/schemas/WeeklyHighlightGroupInput" fields: type: array items: $ref: "#/components/schemas/WeeklyHighlightGroupInput" WeeklyHighlightCandidateClip: type: object required: [id, title, durationSec, exportedUrl, fieldId] properties: id: { type: integer } title: { type: string } durationSec: { type: integer } exportedUrl: { type: string } fieldId: { type: integer } WeeklyHighlightCandidatePlayer: type: object required: [userId, name, clips] properties: userId: { type: integer } name: { type: string } clips: type: array items: $ref: "#/components/schemas/WeeklyHighlightCandidateClip" WeeklyHighlightCandidateField: type: object required: [id, name, clips] properties: id: { type: integer } name: { type: string } clips: type: array items: $ref: "#/components/schemas/WeeklyHighlightCandidateClip" WeeklyHighlightSavedGroup: type: object required: [userId, fieldId, clips] properties: userId: { type: ["integer", "null"] } fieldId: { type: integer } clips: type: array items: $ref: "#/components/schemas/WeeklyHighlightPick" WeeklyHighlightCandidates: type: object required: [weekStart, weekEnd, players, fields, saved] properties: weekStart: { type: string, format: date } weekEnd: { type: string, format: date } players: type: array items: $ref: "#/components/schemas/WeeklyHighlightCandidatePlayer" fields: type: array items: $ref: "#/components/schemas/WeeklyHighlightCandidateField" saved: type: array items: $ref: "#/components/schemas/WeeklyHighlightSavedGroup" WeeklyHighlightNotice: type: object required: [id, userId, userName, highlightId, message, status, url] properties: id: { type: integer } userId: { type: integer } userName: { type: string } highlightId: { type: integer } message: { type: string } status: { type: string, enum: [queued, copied] } url: { type: string } WeeklyHighlightSaveResult: type: object required: [saved] properties: saved: type: array items: { type: integer } WeeklyHighlightPublishResult: type: object required: [published, notices] properties: published: type: array items: { type: integer } notices: type: array items: $ref: "#/components/schemas/WeeklyHighlightNotice" WeeklyHighlightCopiedResult: type: object required: [ok] properties: ok: { type: boolean } AnalysisJobQuote: type: object required: [chunks, options, note] properties: chunks: type: integer options: type: array items: $ref: "#/components/schemas/AnalysisJobQuoteOption" note: type: string AnalysisJobQuoteOption: type: object required: [targetMin, label, cards, etaMin, usd, blind, gpus] properties: targetMin: type: integer enum: [60, 120, 240, 480] label: type: string cards: type: integer etaMin: type: number usd: type: number blind: type: integer gpus: type: array items: type: string LiveRtmpStatus: type: object required: [cam, state] properties: cam: type: string enum: [camera1, camera2] state: type: string enum: [off, running, starting, failed] variant: type: ["string", "null"] enum: [pan, hevc, null] rtmp_url: type: ["string", "null"] description: RTMP ingest base URL without a stream key. startedAt: type: ["number", "null"] StreamingStartInput: type: object required: [platform, rtmpUrl, streamKey] properties: fieldId: type: integer minimum: 1 matchCode: type: string minLength: 1 platform: type: string enum: [youtube, facebook, tiktok, twitch] rtmpUrl: type: string minLength: 1 maxLength: 512 pattern: '^rtmps?://' streamKey: type: string minLength: 1 maxLength: 1024 description: Secret sent only to the VPS start endpoint as a query parameter; never stored, logged, or returned. StreamingStopInput: type: object properties: fieldId: type: integer minimum: 1 matchCode: type: string minLength: 1 HealthStatus: type: object properties: status: type: string required: - status LoginInput: type: object required: [email, password] properties: email: type: string password: type: string User: type: object required: [id, name, email, isGuest, profileComplete, recordingConsent, socialMediaConsent, consentRequired] properties: id: type: integer name: type: string email: type: string isGuest: type: boolean isAdmin: type: boolean phone: type: ["string", "null"] position: type: ["string", "null"] age: type: ["integer", "null"] gender: type: ["string", "null"] nation: type: ["string", "null"] profilePhoto: type: ["string", "null"] profileComplete: type: boolean isGuardianOnly: type: boolean preferredLocale: type: ["string", "null"] recordingConsent: type: boolean recordingConsentAt: type: ["string", "null"] format: date-time socialMediaConsent: type: boolean socialMediaConsentAt: type: ["string", "null"] format: date-time consentRequired: type: boolean ownedFieldIds: type: array items: type: integer MediaConsentInput: type: object required: [recordingConsent, socialMediaConsent] properties: recordingConsent: type: boolean socialMediaConsent: type: boolean AuthResponse: type: object required: [user] properties: user: $ref: "#/components/schemas/User" OwnerField: type: object required: [id, name, cameraId, balanceFils] properties: id: type: integer name: type: string cameraId: type: string balanceFils: type: integer AdminOwnerRecording: type: object required: [id, fieldId, fieldName, startLocal, endLocal, requestedSeconds, deliveredSeconds, readyAt, videoId, thumbnailUrl, playbackUrl] properties: id: type: integer fieldId: type: integer fieldName: type: string startLocal: type: string endLocal: type: string requestedSeconds: type: integer deliveredSeconds: type: ["integer", "null"] readyAt: type: ["string", "null"] format: date-time videoId: type: string thumbnailUrl: type: ["string", "null"] playbackUrl: type: ["string", "null"] OwnerAvailability: type: object additionalProperties: true OwnerRequestInput: type: object required: [startLocal, endLocal] properties: startLocal: type: string pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$' endLocal: type: string pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$' OwnerCancellationInput: type: object required: [reason] properties: reason: type: string minLength: 1 maxLength: 1000 OwnerCancellationRequest: type: object required: [id, footageRequestId, reason, status, adminNote, reviewedAt, createdAt] properties: id: type: integer footageRequestId: type: integer reason: type: string status: type: string enum: [pending, approved, declined] adminNote: type: ["string", "null"] reviewedAt: type: ["string", "null"] format: date-time createdAt: type: string format: date-time OwnerRequest: type: object required: [id, startLocal, endLocal, requestedSeconds, status, progress, billableHours, amountFils, readyAt, shareUrl, shareExpiresAt, playbackManifestUrl, streamless, storageVideoId, thumbnailUrl, varOpensAt, varClosesAt, varState, varActive, cancellationStatus, marks, academyName] properties: id: type: integer startLocal: type: string endLocal: type: string requestedSeconds: type: integer status: type: string progress: type: integer message: type: ["string", "null"] billableHours: type: integer amountFils: type: integer readyAt: type: ["string", "null"] format: date-time shareUrl: type: ["string", "null"] format: uri shareExpiresAt: type: ["string", "null"] format: date-time playbackManifestUrl: type: ["string", "null"] format: uri streamless: type: boolean storageVideoId: type: ["string", "null"] thumbnailUrl: type: ["string", "null"] varOpensAt: type: ["string", "null"] format: date-time varClosesAt: type: ["string", "null"] format: date-time varState: type: ["string", "null"] varActive: type: boolean cancellationStatus: type: ["string", "null"] enum: [pending, approved, declined, null] academyName: type: ["string", "null"] marks: type: array items: $ref: "#/components/schemas/VarMark" match: description: The players' match room for this booking. type: ["object", "null"] required: [code, url, captainUrl] properties: code: type: string url: type: string captainUrl: type: string VarMarkInput: type: object required: [atUtc, kind] properties: atUtc: type: string format: date-time kind: type: string enum: [goal, foul, offside, other] note: type: ["string", "null"] maxLength: 500 VarMark: type: object required: [id, atUtc, kind, note, createdBy, offsetSeconds] properties: id: type: integer atUtc: type: string format: date-time kind: type: string enum: [goal, foul, offside, other] note: type: ["string", "null"] createdBy: type: integer offsetSeconds: type: number OwnerLinkResult: type: object required: [shareUrl, shareExpiresAt, revoked] properties: shareUrl: type: ["string", "null"] format: uri shareExpiresAt: type: ["string", "null"] format: date-time revoked: type: boolean OwnerLedger: type: object required: [charges, payments, totalChargedFils, paidFils, balanceFils] properties: charges: type: array items: type: object required: [id, startLocal, endLocal, billableHours, amountFils, status] properties: id: type: integer startLocal: type: string endLocal: type: string billableHours: type: integer amountFils: type: integer status: type: string payments: type: array items: type: object required: [id, amountFils, method, createdAt] properties: id: type: integer amountFils: type: integer method: type: string note: type: ["string", "null"] createdAt: type: string format: date-time totalChargedFils: type: integer paidFils: type: integer balanceFils: type: integer AdminFootageCancellationRequest: type: object required: [id, footageRequestId, fieldId, fieldName, ownerName, ownerEmail, startLocal, endLocal, amountFils, reason, status, adminNote, createdAt, reviewedAt] properties: id: type: integer footageRequestId: type: integer fieldId: type: integer fieldName: type: string ownerName: type: string ownerEmail: type: string format: email startLocal: type: string endLocal: type: string amountFils: type: integer reason: type: string status: type: string enum: [pending, approved, declined] adminNote: type: ["string", "null"] createdAt: type: string format: date-time reviewedAt: type: ["string", "null"] format: date-time AdminFootageCancellationReview: type: object required: [status] properties: status: type: string enum: [approved, declined] note: type: ["string", "null"] maxLength: 1000 AdminFootageOwnerInput: type: object required: [fieldId, email] properties: fieldId: type: integer email: type: string format: email AdminFootageOwner: type: object required: [id, fieldId, fieldName, userId, name, email, createdAt] properties: id: type: integer fieldId: type: integer fieldName: type: string userId: type: integer name: type: string email: type: string format: email createdAt: type: string format: date-time AdminFootagePaymentInput: type: object required: [amountJod, method] properties: amountJod: type: number exclusiveMinimum: 0 method: type: string enum: [CliQ, Cash, Other] note: type: ["string", "null"] AdminFootagePayment: type: object required: [id, fieldId, amountFils, amountJod, method, note, createdAt] properties: id: type: integer fieldId: type: integer amountFils: type: integer amountJod: type: number method: type: string enum: [CliQ, Cash, Other] note: type: ["string", "null"] createdAt: type: string format: date-time AdminFootageBillingField: type: object required: [fieldId, fieldName, owner, chargedFils, paidFils, balanceFils] properties: fieldId: type: integer fieldName: type: string owner: oneOf: - $ref: "#/components/schemas/AdminFootageOwnerSummary" - type: "null" chargedFils: type: integer paidFils: type: integer balanceFils: type: integer AdminFootageOwnerSummary: type: object required: [fieldId, userId, name, email] properties: fieldId: type: integer userId: type: integer name: type: string email: type: string format: email AdminFootageBilling: type: object required: [fields, payments, totalChargedFils, totalPaidFils, totalBalanceFils] properties: fields: type: array items: $ref: "#/components/schemas/AdminFootageBillingField" payments: type: array items: $ref: "#/components/schemas/AdminFootagePayment" totalChargedFils: type: integer totalPaidFils: type: integer totalBalanceFils: type: integer AdminFailedFootageRequest: type: object required: [id, fieldId, fieldName, ownerName, ownerEmail, academyName, cameraId, startLocal, endLocal, message, updatedAt] properties: id: type: integer fieldId: type: integer fieldName: type: string ownerName: type: ["string", "null"] ownerEmail: type: ["string", "null"] format: email academyName: type: ["string", "null"] cameraId: type: string startLocal: type: string endLocal: type: string message: type: ["string", "null"] updatedAt: type: string format: date-time AdminFootageRecheckResult: type: object required: [id, status, changed] properties: id: type: integer status: type: string changed: type: boolean Field: type: object required: [id, name, location, courts, clipCount, weight] properties: id: type: integer name: type: string location: type: string courts: type: integer clipCount: type: integer weight: type: number description: Admin-controlled recommendation weight (higher = more prominent) thumbnailUrl: type: ["string", "null"] latitude: type: ["number", "null"] longitude: type: ["number", "null"] lastRecordedAt: type: ["string", "null"] BunnyCollection: type: object required: [guid, name, videoCount] properties: guid: type: string name: type: string videoCount: type: integer previewImageUrl: type: ["string", "null"] id: type: ["integer", "null"] description: >- The corresponding fields table row id, if this collection has been synced via /admin/fields/sync. Null for collections Bunny has that haven't been synced into a field yet. BunnyVideo: type: object required: [guid, title, thumbnailUrl, playbackUrl, embedUrl] properties: guid: type: string title: type: string thumbnailUrl: type: string playbackUrl: type: string embedUrl: type: string views: type: integer duration: type: number Recording: type: object required: [id, fieldId, court, date, timeSlot, duration] properties: id: type: integer fieldId: type: integer court: type: string date: type: string timeSlot: type: string duration: type: string score: type: ["string", "null"] videoUrl: type: string uhdPlaybackUrl: type: ["string", "null"] description: Optional authorized route for the original 4K Storage HLS playlist. highlightMoment: type: ["string", "null"] fieldName: type: ["string", "null"] FieldRecording: type: object required: [id, fieldId, court, date, timeSlot, duration, hasTracking, viewerHasClaim, viewerClaimState, matchCode, viewerInMatch] properties: id: type: integer fieldId: type: integer court: type: string date: type: string timeSlot: type: string duration: type: string score: type: ["string", "null"] videoUrl: type: string highlightMoment: type: ["string", "null"] fieldName: type: ["string", "null"] hasTracking: type: boolean description: Whether this recording has an uploaded tracking bundle. viewerHasClaim: type: boolean description: Whether the signed-in viewer has an identity claim for this recording. viewerClaimState: type: ["string", "null"] enum: [in_progress, pending, confirmed, disputed, needs_resolution, released, rejected, null] description: The signed-in viewer's progress or claim state, or null when they have not started or are not signed in. matchCode: type: ["string", "null"] description: Existing match room code linked to this recording, if any. viewerInMatch: type: boolean description: Whether the signed-in viewer has already joined the linked match room. RecordingViewInput: type: object required: [fieldId, videoId] properties: fieldId: type: integer minimum: 1 videoId: type: string minLength: 1 maxLength: 128 RecordingWatchTimeInput: type: object required: [fieldId, videoId, seconds] properties: fieldId: type: integer minimum: 1 videoId: type: string minLength: 1 maxLength: 128 seconds: type: integer minimum: 1 maximum: 30 RecordingViewer: type: object required: [userId, name, email, isGuest, viewCount, watchedSeconds, clipCount, firstViewedAt, lastViewedAt] properties: userId: type: integer name: type: string email: type: ["string", "null"] format: email isGuest: type: boolean viewCount: type: integer watchedSeconds: type: integer clipCount: type: integer firstViewedAt: type: string format: date-time lastViewedAt: type: string format: date-time PublicProfile: type: object required: [id, name, followerCount, followingCount, clipCount, isFollowing] properties: id: type: integer name: type: string position: type: ["string", "null"] age: type: ["integer", "null"] followerCount: type: integer followingCount: type: integer clipCount: type: integer isFollowing: type: boolean PublicPlayerStats: type: object required: [matches, totals, excludedClaimCount] properties: matches: type: array items: $ref: "#/components/schemas/PublicPlayerMatchStats" totals: $ref: "#/components/schemas/PublicPlayerStatsTotals" excludedClaimCount: type: integer minimum: 0 description: Claims awaiting review because they are disputed or need resolution. measured: description: >- What Replay measured for the player in each match, read from the match stats cache the match report and Home use (no tracking is parsed per view). Null when the cache could not be read. oneOf: - $ref: "#/components/schemas/PublicPlayerMeasured" - type: "null" PublicPlayerMeasured: type: object required: [matches, totals] properties: matches: type: array description: Newest first; only matches on recordings the public can see. items: $ref: "#/components/schemas/PublicPlayerMeasuredMatch" totals: $ref: "#/components/schemas/PublicPlayerMeasuredTotals" PublicPlayerMeasuredMatch: type: object description: One match's figures, exactly as the match report shows them. A null figure was not measured for that match. required: [matchId, recordingIds, date, startLocal, fieldName, minutes, distanceKm, topSpeedKmh, touches, passesTried, passesCompleted, shots, goals, dribbles, dribblesWon, dribblesLost] properties: matchId: type: integer recordingIds: type: array description: The public recordings this match was measured on, so a profile can show the figures beside its claimed recording. items: type: integer date: type: string description: YYYY-MM-DD, Amman. startLocal: type: string description: "YYYY-MM-DD HH:MM, Amman." fieldName: type: ["string", "null"] minutes: type: ["number", "null"] description: Minutes on camera. distanceKm: type: ["number", "null"] topSpeedKmh: type: ["number", "null"] touches: type: ["integer", "null"] passesTried: type: ["integer", "null"] passesCompleted: type: ["integer", "null"] shots: type: ["integer", "null"] goals: type: ["integer", "null"] dribbles: type: ["integer", "null"] dribblesWon: type: ["integer", "null"] dribblesLost: type: ["integer", "null"] PublicPlayerMeasuredTotals: type: object description: Sums over the matches that measured each figure (top speed is the best); null when no match measured it. required: [matches, minutes, distanceKm, topSpeedKmh, touches, passesTried, passesCompleted, shots, goals, dribbles, dribblesWon, dribblesLost] properties: matches: type: integer minimum: 0 minutes: type: ["number", "null"] distanceKm: type: ["number", "null"] topSpeedKmh: type: ["number", "null"] touches: type: ["integer", "null"] passesTried: type: ["integer", "null"] description: Passes tried in the matches that measured completed passes; null when any of them did not measure tries. passesCompleted: type: ["integer", "null"] shots: type: ["integer", "null"] goals: type: ["integer", "null"] dribbles: type: ["integer", "null"] dribblesWon: type: ["integer", "null"] dribblesLost: type: ["integer", "null"] PublicPlayerStatsTotals: type: object required: [totalMatchesClaimed, totalMinutesPlayed, totalDistanceMetres, totalHumanVouchedSeconds, totalInferredSeconds, totalOffPitchSeconds] properties: totalMatchesClaimed: type: integer minimum: 0 totalMinutesPlayed: type: number minimum: 0 totalDistanceMetres: type: ["number", "null"] minimum: 0 description: Sum of calibrated distances, or null when any claimed recording has no pitch model. totalHumanVouchedSeconds: type: number minimum: 0 totalInferredSeconds: type: number minimum: 0 totalOffPitchSeconds: type: number minimum: 0 dribbles: description: Dribbles summed over the matches that have ball tracking, or null when none do. oneOf: - $ref: "#/components/schemas/PlayerDribbleStats" - type: "null" PlayerDribbleStats: type: object description: Runs with the ball past at least one opponent. Successful when his side still had it after; failed when the other side got it. Dribbles nobody touched after are counted in total only. required: [total, succeeded, failed] properties: total: type: integer minimum: 0 succeeded: type: integer minimum: 0 failed: type: integer minimum: 0 PublicPlayerMatchStats: type: object required: [recordingId, title, date, minutesPlayed, distanceMetres, humanVouchedSeconds, inferredSeconds, offPitchSeconds, heatmap] properties: recordingId: type: integer title: type: string date: type: string minutesPlayed: type: number minimum: 0 distanceMetres: type: ["number", "null"] minimum: 0 description: Calibrated distance, or null when this recording has no pitch model. humanVouchedSeconds: type: number minimum: 0 inferredSeconds: type: number minimum: 0 offPitchSeconds: type: number minimum: 0 heatmap: $ref: "#/components/schemas/PublicPlayerHeatmap" dribbles: description: This match's dribbles, or null when the recording has no ball tracking. oneOf: - $ref: "#/components/schemas/PlayerDribbleStats" - type: "null" PublicPlayerHeatmap: type: object required: [coordinateSpace, cells] properties: coordinateSpace: type: string enum: [pitch, camera] cells: type: array items: type: object required: [x, y, weight] properties: x: type: number minimum: 0 maximum: 1 y: type: number minimum: 0 maximum: 1 weight: type: number minimum: 0 FollowResult: type: object required: [following, followerCount] properties: following: type: boolean followerCount: type: integer Clip: type: object required: [id, recordingId, rank, momentLabel, likeCount, startTime, endTime, cropPath] properties: id: type: integer recordingId: type: integer rank: type: integer momentLabel: type: string playerTags: type: array items: type: string likeCount: type: integer startTime: type: number endTime: type: number cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" isLiked: type: boolean isSaved: type: boolean videoUrl: type: string bunnyPlaybackUrl: type: ["string", "null"] bunnyVideoId: type: ["string", "null"] fieldName: type: ["string", "null"] court: type: ["string", "null"] date: type: ["string", "null"] creatorId: type: ["integer", "null"] creatorName: type: ["string", "null"] creatorPosition: type: ["string", "null"] academyId: type: ["integer", "null"] description: >- Academy whose field this recording belongs to, if any (matched by fieldId — best-effort, not stored on the clip itself). introVideoUrl: type: ["string", "null"] description: Branding intro to play before this clip, if its academy has one set. CropKeyframe: type: object required: [t, x, y, w, h] properties: t: type: number description: Time position as fraction (0-1) of clip duration x: type: number description: Crop left edge as fraction of total video width y: type: number w: type: number description: Crop width as fraction of total video width h: type: number UserClip: type: object required: [id, userId, videoId, title, startTime, endTime, cropPath, visibility, showInPortfolio, isHidden, hiddenReason, likeCount, createdAt, aspectRatio, liveClipPartial] properties: id: type: integer userId: type: integer videoId: type: string title: type: string startTime: type: number endTime: type: number cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" visibility: type: string enum: ["public", "followers", "private", "match"] showInPortfolio: type: boolean isHidden: type: boolean hiddenReason: type: ["string", "null"] likeCount: type: integer aspectRatio: type: string thumbnailTime: type: ["number", "null"] thumbnailUrl: type: ["string", "null"] playbackUrl: type: ["string", "null"] exportStatus: type: ["string", "null"] exportedUrl: type: ["string", "null"] createdAt: type: string academyId: type: ["integer", "null"] footageRequestId: type: ["integer", "null"] introVideoUrl: type: ["string", "null"] description: Branding intro to play before this clip, if its academy has one set. matchCode: type: ["string", "null"] liveClipStatus: type: ["string", "null"] liveClipError: type: ["string", "null"] liveClipPartial: type: boolean isMatchMoment: type: boolean description: True for clips Replay cut automatically after the player found himself in a match; they belong under My Clips → Moments, not Created. MatchLiveStatusResponse: type: object required: [matchCode, live, varActive, panAvailable, startUtc, endUtc] properties: matchCode: type: string live: type: boolean varActive: type: boolean panAvailable: type: boolean startUtc: type: ["string", "null"] format: date-time endUtc: type: ["string", "null"] format: date-time error: type: ["string", "null"] MatchLiveClipInput: type: object required: [start, end, title, cropPath, aspectRatio, useBallPan] properties: start: type: number description: Start time as UTC epoch seconds end: type: number description: End time as UTC epoch seconds title: type: string minLength: 1 maxLength: 120 cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" aspectRatio: type: string enum: ["16:9", "9:16"] useBallPan: type: boolean MatchLiveClipResponse: type: object required: [id, matchCode, liveClipStatus, liveClipError, liveClipPartial, exportStatus] properties: id: type: integer matchCode: type: string liveClipStatus: type: ["string", "null"] liveClipError: type: ["string", "null"] liveClipPartial: type: boolean exportStatus: type: ["string", "null"] MatchLiveClipStatusResponse: type: object required: [id, matchCode, liveClipStatus, liveClipError, liveClipPartial, exportStatus] properties: id: type: integer matchCode: type: string liveClipStatus: type: ["string", "null"] liveClipError: type: ["string", "null"] liveClipPartial: type: boolean exportStatus: type: ["string", "null"] SocialLikeUser: type: object required: [userId, name] properties: userId: type: integer name: type: string FeedClip: type: object required: [id, userId, videoId, title, startTime, endTime, cropPath, likeCount, viewCount, shareCount, score, isLiked, visibility, createdAt, creatorId, creatorName, socialLikes, aspectRatio] properties: id: type: integer userId: type: integer videoId: type: string title: type: string startTime: type: number endTime: type: number cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" likeCount: type: integer viewCount: type: integer shareCount: type: integer score: type: number isLiked: type: boolean visibility: type: string enum: ["public", "followers", "private", "match"] aspectRatio: type: string thumbnailUrl: type: ["string", "null"] playbackUrl: type: ["string", "null"] createdAt: type: string creatorId: type: integer creatorName: type: string creatorPosition: type: ["string", "null"] socialLikes: type: array items: $ref: "#/components/schemas/SocialLikeUser" CreateUserClipInput: type: object required: [title, startTime, endTime, cropPath] properties: videoId: type: string recordingId: type: integer description: Exact source recording when the clip is saved from a recording page. title: type: string startTime: type: number endTime: type: number cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" visibility: type: string enum: ["public", "followers", "private", "match"] aspectRatio: type: string enum: ["16:9", "9:16"] academyId: type: ["integer", "null"] description: Academy context this clip was created under (from the page the user was viewing), if any. ownerShareToken: type: string description: Active owner footage share token; when present, the server resolves the video source. UpdateUserClipInput: type: object properties: title: type: string visibility: type: string enum: ["public", "followers", "private", "match"] showInPortfolio: type: boolean thumbnailTime: type: ["number", "null"] PortfolioHistoryItem: type: object required: [id, teamName, roleLabel, startYear, endYear, isCurrent, displayOrder] properties: id: type: integer teamName: type: string roleLabel: type: string startYear: type: integer endYear: type: ["integer", "null"] isCurrent: type: boolean displayOrder: type: integer PortfolioClip: type: object required: [id, userId, title, startTime, endTime, cropPath, visibility, likeCount, aspectRatio, playbackStatus, createdAt] properties: id: type: integer userId: type: integer title: type: string startTime: type: number endTime: type: number cropPath: type: array items: $ref: "#/components/schemas/CropKeyframe" visibility: type: string enum: ["public"] likeCount: type: integer aspectRatio: type: string thumbnailTime: type: ["number", "null"] thumbnailUrl: type: ["string", "null"] playbackUrl: type: ["string", "null"] playbackStatus: type: string enum: ["ready", "processing", "expired", "unavailable"] createdAt: type: string academyId: type: ["integer", "null"] introVideoUrl: type: ["string", "null"] PortfolioView: type: object required: [id, name, age, position, nation, profilePhoto, followerCount, followingCount, clipCount, history, clips, canEdit] properties: id: type: integer name: type: string age: type: ["integer", "null"] position: type: ["string", "null"] nation: type: ["string", "null"] profilePhoto: type: ["string", "null"] followerCount: type: integer followingCount: type: integer clipCount: type: integer history: type: array items: $ref: "#/components/schemas/PortfolioHistoryItem" clips: type: array items: $ref: "#/components/schemas/PortfolioClip" canEdit: type: boolean UpdatePortfolioHistoryItem: type: object required: [teamName, roleLabel, startYear, endYear, isCurrent, displayOrder] properties: teamName: type: string roleLabel: type: string startYear: type: integer endYear: type: ["integer", "null"] isCurrent: type: boolean displayOrder: type: integer UpdatePortfolioInput: type: object required: [name, age, position, nation, profilePhoto, history] properties: name: type: string age: type: ["integer", "null"] position: type: ["string", "null"] nation: type: ["string", "null"] profilePhoto: type: ["string", "null"] history: type: array maxItems: 20 items: $ref: "#/components/schemas/UpdatePortfolioHistoryItem" LikeResult: type: object required: [liked, likeCount] properties: liked: type: boolean likeCount: type: integer ViewInput: type: object required: [secondsWatched] properties: secondsWatched: type: number minimum: 0 EngagementResult: type: object required: [ok, viewCount, shareCount, likeCount, score] properties: ok: type: boolean viewCount: type: integer shareCount: type: integer likeCount: type: integer score: type: number ShareLinkResult: type: object required: [shareUrl, posterUrl] properties: shareUrl: type: string format: uri posterUrl: type: string format: uri ProfileInput: oneOf: - $ref: "#/components/schemas/PlayerProfileInput" - $ref: "#/components/schemas/GuardianProfileInput" PlayerProfileInput: type: object required: [name, phone, position, age, gender] properties: name: type: string phone: type: string position: type: string enum: [goalkeeper, defender, midfielder, forward] age: type: integer minimum: 10 maximum: 99 gender: type: string enum: [male, female, prefer_not_to_say] GuardianProfileInput: type: object required: [profileType, name, phone] properties: profileType: type: string enum: [guardian] name: type: string phone: type: string AccountStats: type: object required: [savedClips, likesGiven, fieldsVisited] properties: savedClips: type: integer likesGiven: type: integer fieldsVisited: type: integer LocaleInput: type: object required: [locale] properties: locale: type: string Ad: type: object required: [id, title, creativeUrl, clickUrl, durationSeconds, targetType] properties: id: type: integer title: type: string creativeUrl: type: string clickUrl: type: string durationSeconds: type: integer targetType: type: string AcademySummary: type: object required: [id, name, fieldId, fieldName, fieldLocation, daysOfWeek, recordingCount, contactPhone] properties: id: type: integer name: type: string fieldId: type: integer fieldName: type: string fieldLocation: type: string daysOfWeek: type: array items: type: string description: type: ["string", "null"] logoUrl: type: ["string", "null"] contactPhone: type: ["string", "null"] maxLength: 80 introVideoUrl: type: ["string", "null"] description: Branding intro clip prepended to this academy's clip exports and playback. recordingCount: type: integer AcademyMemberRole: type: string enum: [owner, manager, coach] AcademyConsoleMembership: type: object required: [academyId, academyName, roles] properties: academyId: type: integer academyName: type: string roles: type: array minItems: 1 items: $ref: "#/components/schemas/AcademyMemberRole" AcademyConsoleDashboard: type: object required: [academyId, academyName, roles, squadCount, activePlayerCount, upcomingSessionCount, pendingRegistrationCount] properties: academyId: type: integer academyName: type: string roles: type: array minItems: 1 items: $ref: "#/components/schemas/AcademyMemberRole" squadCount: type: integer minimum: 0 activePlayerCount: type: integer minimum: 0 upcomingSessionCount: type: integer minimum: 0 pendingRegistrationCount: type: integer minimum: 0 collectThisWeek: oneOf: - $ref: "#/components/schemas/AcademyCollectThisWeek" - type: "null" AcademyJoinLink: type: object required: [joinCode, joinUrl] properties: joinCode: type: ["string", "null"] pattern: "^[A-HJ-NP-Z2-9]{8}$" joinUrl: type: ["string", "null"] AcademyJoinPublicSquad: type: object required: [id, name, ageGroup] properties: id: type: integer minimum: 1 name: type: string ageGroup: type: ["string", "null"] AcademyJoinPublicInfo: type: object required: [academyName, logoUrl, squads] properties: academyName: type: string logoUrl: type: ["string", "null"] squads: type: array items: $ref: "#/components/schemas/AcademyJoinPublicSquad" AcademyJoinRegistrationInput: type: object required: [playerName, guardianPhone] properties: playerName: type: string minLength: 1 maxLength: 120 dateOfBirth: type: ["string", "null"] pattern: "^\\d{4}-\\d{2}-\\d{2}$" guardianName: type: ["string", "null"] maxLength: 120 guardianPhone: type: string minLength: 7 maxLength: 20 pattern: "^[0-9+ ()-]{7,20}$" preferredSquadId: type: ["integer", "null"] minimum: 1 notes: type: ["string", "null"] maxLength: 500 locale: type: string enum: [ar, en] default: ar website: type: string maxLength: 0 AcademyJoinSubmissionResult: type: object required: [ok] properties: ok: type: boolean enum: [true] duplicate: type: boolean AcademyRegistrationStatus: type: string enum: [pending, approved, rejected] AcademyRegistrationSummary: type: object required: [id, playerName, dateOfBirth, guardianName, guardianPhone, preferredSquadId, preferredSquadName, notes, locale, status, createdAt, createdPlayerId] properties: id: type: integer minimum: 1 playerName: type: string dateOfBirth: type: ["string", "null"] guardianName: type: ["string", "null"] guardianPhone: type: string preferredSquadId: type: ["integer", "null"] preferredSquadName: type: ["string", "null"] notes: type: ["string", "null"] locale: type: string enum: [ar, en] status: $ref: "#/components/schemas/AcademyRegistrationStatus" createdAt: type: string format: date-time createdPlayerId: type: ["integer", "null"] AcademyRegistrationApproval: type: object required: [squadId, jerseyNumber, position] properties: squadId: type: ["integer", "null"] minimum: 1 jerseyNumber: type: ["integer", "null"] minimum: 0 position: type: ["string", "null"] maxLength: 80 AcademySquadSummary: type: object required: [id, academyId, name, ageGroup, description, activePlayerCount] properties: id: type: integer minimum: 1 academyId: type: integer minimum: 1 name: type: string ageGroup: type: ["string", "null"] description: type: ["string", "null"] activePlayerCount: type: integer minimum: 0 AcademySquadInput: type: object required: [name] properties: name: type: string minLength: 1 maxLength: 120 ageGroup: type: ["string", "null"] maxLength: 80 description: type: ["string", "null"] maxLength: 1000 AcademySquadUpdate: type: object properties: name: type: string minLength: 1 maxLength: 120 ageGroup: type: ["string", "null"] maxLength: 80 description: type: ["string", "null"] maxLength: 1000 AcademyPlayerSummary: type: object required: - id - academyId - squadId - squadName - name - jerseyNumber - position - dateOfBirth - guardianPhone - userId - linkedUserEmail - isActive properties: id: type: integer minimum: 1 academyId: type: integer minimum: 1 squadId: type: ["integer", "null"] minimum: 1 squadName: type: ["string", "null"] name: type: string jerseyNumber: type: ["integer", "null"] minimum: 0 position: type: ["string", "null"] dateOfBirth: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' guardianPhone: type: ["string", "null"] userId: type: ["integer", "null"] minimum: 1 linkedUserEmail: type: ["string", "null"] format: email isActive: type: boolean AcademyPlayerInput: type: object required: [name] properties: name: type: string minLength: 1 maxLength: 120 squadId: type: ["integer", "null"] minimum: 1 jerseyNumber: type: ["integer", "null"] minimum: 0 position: type: ["string", "null"] maxLength: 80 dateOfBirth: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' guardianPhone: type: ["string", "null"] maxLength: 80 AcademyPlayerUpdate: type: object properties: name: type: string minLength: 1 maxLength: 120 squadId: type: ["integer", "null"] minimum: 1 jerseyNumber: type: ["integer", "null"] minimum: 0 position: type: ["string", "null"] maxLength: 80 dateOfBirth: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' guardianPhone: type: ["string", "null"] maxLength: 80 isActive: type: boolean linkedUserEmail: description: Link an existing Replay account by email; null removes the link; omission leaves it unchanged. type: ["string", "null"] format: email AcademySessionFootage: type: object required: [status, note, recordingCount] properties: status: type: string enum: [none, no_camera, scheduled, recording, processing, ready, failed, unavailable] note: type: ["string", "null"] recordingCount: type: integer minimum: 0 AcademyLiveSessionStatus: type: object required: [status, windowStartsAt, windowEndsAt, camera, variant, sessionType, playlistPath, panPlaylistPath, message, panAvailable] properties: status: type: string enum: [upcoming, live, not_live, ended, no_booking] sessionType: type: string enum: [training, match] windowStartsAt: type: ["string", "null"] format: date-time windowEndsAt: type: ["string", "null"] format: date-time camera: type: ["string", "null"] variant: type: string enum: [hls] playlistPath: type: ["string", "null"] description: Bunny playlist of the session's live feed (full pitch). panPlaylistPath: type: ["string", "null"] description: Bunny playlist of the ball-follow view. Matches only, while vps1 produces it. message: type: string panAvailable: type: boolean AcademySessionSummary: type: object required: - id - academyId - fieldId - squadId - squadName - type - id - startsAt - endsAt - location - opponent - ownScore - opponentScore - notes - createdAt - attendanceCounts - footage - recordings properties: id: type: integer minimum: 1 academyId: type: integer minimum: 1 fieldId: type: integer minimum: 1 squadId: type: ["integer", "null"] minimum: 1 squadName: type: ["string", "null"] type: type: string enum: [training, match] startsAt: type: string format: date-time endsAt: type: ["string", "null"] format: date-time location: type: string opponent: type: ["string", "null"] ownScore: type: ["integer", "null"] minimum: 0 maximum: 2147483647 opponentScore: type: ["integer", "null"] minimum: 0 maximum: 2147483647 notes: type: ["string", "null"] createdAt: type: string format: date-time attendanceCounts: $ref: "#/components/schemas/AcademyAttendanceCounts" footage: $ref: "#/components/schemas/AcademySessionFootage" recordings: type: array items: $ref: "#/components/schemas/AcademySessionRecording" AcademyAttendanceCounts: type: object required: [present, absent, late, excused] properties: present: type: integer minimum: 0 absent: type: integer minimum: 0 late: type: integer minimum: 0 excused: type: integer minimum: 0 AcademyAttendancePlayer: type: object required: [playerId, playerName, jerseyNumber, status] properties: playerId: type: integer minimum: 1 playerName: type: string jerseyNumber: type: ["integer", "null"] minimum: 0 status: type: ["string", "null"] enum: [present, absent, late, excused, null] AcademyAttendanceSheet: type: object required: [sessionId, players] properties: sessionId: type: integer minimum: 1 players: type: array items: $ref: "#/components/schemas/AcademyAttendancePlayer" AcademyAttendanceStatusAssignment: type: object required: [playerId, status] properties: playerId: type: integer minimum: 1 status: type: ["string", "null"] enum: [present, absent, late, excused, null] AcademyAttendanceInput: type: object required: [entries] properties: entries: type: array items: $ref: "#/components/schemas/AcademyAttendanceStatusAssignment" AcademyConsoleRecording: type: object required: [id, fieldId, court, date, timeSlot, duration, score, videoUrl, highlightMoment, fieldName, sessionId, sessionLabel] properties: id: type: integer minimum: 1 fieldId: type: integer minimum: 1 court: type: string date: type: string pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" timeSlot: type: string duration: type: string score: type: ["string", "null"] videoUrl: type: string highlightMoment: type: ["string", "null"] fieldName: type: ["string", "null"] sessionId: type: ["integer", "null"] minimum: 1 sessionLabel: type: ["string", "null"] AcademySessionRecording: type: object required: [id, fieldId, court, date, timeSlot, duration, score, videoUrl] properties: id: type: integer minimum: 1 fieldId: type: integer minimum: 1 court: type: string date: type: string pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" timeSlot: type: string duration: type: string score: type: ["string", "null"] videoUrl: type: string AcademyRecordingSessionUpdate: type: object required: [sessionId] properties: sessionId: type: ["integer", "null"] minimum: 1 AcademyAnnouncementSummary: type: object required: [id, academyId, squadId, squadName, title, body, createdBy, authorName, createdAt] properties: id: type: integer minimum: 1 academyId: type: integer minimum: 1 squadId: type: ["integer", "null"] minimum: 1 squadName: type: ["string", "null"] title: type: string body: type: string createdBy: type: integer minimum: 1 authorName: type: string createdAt: type: string format: date-time AcademyAnnouncementInput: type: object required: [title, body] properties: title: type: string minLength: 1 maxLength: 200 body: type: string minLength: 1 maxLength: 10000 squadId: type: ["integer", "null"] minimum: 1 AcademyAnnouncementUpdate: type: object properties: title: type: string minLength: 1 maxLength: 200 body: type: string minLength: 1 maxLength: 10000 squadId: type: ["integer", "null"] minimum: 1 AcademyFinanceDashboard: type: object required: [month, collectedFils, spentFils, netFils, unpaidBillsCount, expiredPlayers, expiringPlayers, unpaidPayments] properties: month: type: string pattern: '^\d{4}-\d{2}$' description: Current calendar month in Asia/Amman. collectedFils: type: integer minimum: 0 spentFils: type: integer minimum: 0 netFils: type: integer unpaidBillsCount: type: integer minimum: 0 expiredPlayers: type: array items: $ref: "#/components/schemas/AcademyFinanceAttentionPlayer" expiringPlayers: type: array items: $ref: "#/components/schemas/AcademyFinanceAttentionPlayer" unpaidPayments: type: array items: $ref: "#/components/schemas/AcademyFinanceAttentionPayment" notStartedPlayers: type: array items: $ref: "#/components/schemas/AcademyFinanceNotStartedPlayer" collectThisWeek: $ref: "#/components/schemas/AcademyCollectThisWeek" AcademyFinanceAttentionPlayer: type: object required: [id, name, squadId, squadName, expiresOn, monthsOwed, outstandingFils] properties: id: type: integer minimum: 1 name: type: string squadId: type: integer minimum: 1 squadName: type: string expiresOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' monthsOwed: type: integer minimum: 0 outstandingFils: type: integer minimum: 0 daysUntilExpiry: type: integer description: Calendar-day difference between expiresOn and today's date in Asia/Amman. guardianPhone: type: ["string", "null"] AcademyFinanceNotStartedPlayer: type: object required: [id, name, squadId, squadName, guardianPhone] properties: id: type: integer minimum: 1 name: type: string squadId: type: ["integer", "null"] minimum: 1 squadName: type: ["string", "null"] guardianPhone: type: ["string", "null"] AcademyCollectThisWeek: type: object required: [playerCount, totalFils] properties: playerCount: type: integer minimum: 0 totalFils: type: integer minimum: 0 AcademyFinanceAttentionPayment: type: object required: [id, category, label, amountFils, occurredOn] properties: id: type: integer minimum: 1 category: type: string label: type: string amountFils: type: integer minimum: 1 occurredOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinanceTeam: type: object required: [id, name, monthlyFeeFils, playerCount, behindCount, outstandingFils] properties: id: type: integer minimum: 1 name: type: string monthlyFeeFils: type: integer minimum: 0 playerCount: type: integer minimum: 0 behindCount: type: integer minimum: 0 outstandingFils: type: integer minimum: 0 AcademyFinanceTeamInput: type: object required: [name, monthlyFeeFils] properties: name: type: string minLength: 1 maxLength: 120 monthlyFeeFils: type: integer minimum: 0 ageGroup: type: ["string", "null"] maxLength: 80 description: type: ["string", "null"] maxLength: 1000 AcademyFinanceTeamMonthlyFeeUpdate: type: object required: [monthlyFeeFils] properties: monthlyFeeFils: type: integer minimum: 0 AcademyFamilyClaimInput: type: object required: [token] properties: token: type: string pattern: '^[0-9a-f]{32}$' AcademyFamilyClaim: type: object required: [playerId, playerName, academyName] properties: playerId: type: integer minimum: 1 playerName: type: string academyName: type: string AcademyPlayerGuardianInput: type: object required: [email] properties: email: type: string format: email minLength: 3 maxLength: 254 AcademyPlayerGuardian: type: object required: [userId, name, email, addedBy, createdAt] properties: userId: type: integer minimum: 1 name: type: string email: type: string format: email addedBy: type: string enum: [owner, link] createdAt: type: string format: date-time AcademyFamily: type: object required: [academy, player, finance, sessions, attendance, attendanceSummary, payments, announcements, players] properties: academy: type: object required: [name, logoUrl, contactPhone] properties: name: type: string logoUrl: type: ["string", "null"] contactPhone: type: ["string", "null"] player: type: object required: [id, name, squadName, jerseyNumber, position] properties: id: type: integer minimum: 1 name: type: string squadName: type: ["string", "null"] jerseyNumber: type: ["integer", "null"] minimum: 0 position: type: ["string", "null"] finance: type: ["object", "null"] required: [effectiveMonthlyFeeFils, subscriptionExpiresOn, subscriptionStatus, monthsOwed, outstandingFils] properties: effectiveMonthlyFeeFils: type: integer minimum: 0 subscriptionExpiresOn: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' subscriptionStatus: type: string enum: [no_subscription, paid, expiring, expired] monthsOwed: type: integer minimum: 0 outstandingFils: type: integer minimum: 0 sessions: type: array items: $ref: "#/components/schemas/AcademyFamilySession" attendance: type: array items: $ref: "#/components/schemas/AcademyFamilyAttendance" attendanceSummary: $ref: "#/components/schemas/AcademyFamilyAttendanceSummary" payments: type: array items: $ref: "#/components/schemas/AcademyFamilyPayment" announcements: type: array items: $ref: "#/components/schemas/AcademyFamilyAnnouncement" players: type: array items: $ref: "#/components/schemas/AcademyFamilyLinkedPlayer" otherLinkedPlayers: type: array items: $ref: "#/components/schemas/AcademyFamilyLinkedPlayer" AcademyFamilyAttendanceSummary: type: object required: [present, late, absent, excused, markedTotal, percentPresent] properties: present: type: integer minimum: 0 late: type: integer minimum: 0 absent: type: integer minimum: 0 excused: type: integer minimum: 0 markedTotal: type: integer minimum: 0 percentPresent: type: ["integer", "null"] minimum: 0 maximum: 100 AcademyFamilyPayment: type: object required: [id, kind, date, amountFils, label, monthsPurchased, newExpiresOn, dueDate, status] properties: id: type: string kind: type: string enum: [renewal, fee] date: type: string format: date-time amountFils: type: integer minimum: 0 label: type: ["string", "null"] monthsPurchased: type: ["integer", "null"] minimum: 1 maximum: 12 newExpiresOn: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' dueDate: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' status: type: ["string", "null"] enum: [due, paid, waived, null] AcademyFamilyLinkedPlayer: type: object required: [id, name, academyName] properties: id: type: integer minimum: 1 name: type: string academyName: type: string AcademyFamilySession: type: object required: [id, type, startsAt, endsAt, location, opponent, ownScore, opponentScore, footage, recordings] properties: id: type: integer minimum: 1 type: type: string enum: [training, match] startsAt: type: string format: date-time endsAt: type: ["string", "null"] format: date-time location: type: string opponent: type: ["string", "null"] ownScore: type: ["integer", "null"] minimum: 0 opponentScore: type: ["integer", "null"] minimum: 0 footage: $ref: "#/components/schemas/AcademySessionFootage" recordings: type: array items: $ref: "#/components/schemas/AcademySessionRecording" AcademyFamilyAttendance: type: object required: [status, startsAt, type, location] properties: status: type: string enum: [present, absent, late, excused] startsAt: type: string format: date-time type: type: string enum: [training, match] location: type: string AcademyFamilyAnnouncement: type: object required: [title, body, createdAt] properties: title: type: string body: type: string createdAt: type: string format: date-time AcademyConsoleFamilyLink: type: object required: [familyUrl] properties: familyUrl: type: ["string", "null"] AcademyFinancePlayer: type: object required: [id, squadId, name, isActive, monthlyFeeFils, monthlyDiscountFils, effectiveMonthlyFeeFils, subscriptionExpiresOn, subscriptionStatus, monthsOwed, subscriptionDebtFils, unpaidFeesFils, outstandingFils, latestRenewalId, latestRenewalAmountFils, latestRenewalPaidAt] properties: id: type: integer minimum: 1 squadId: type: integer minimum: 1 name: type: string isActive: type: boolean monthlyFeeFils: type: integer minimum: 0 monthlyDiscountFils: type: integer minimum: 0 effectiveMonthlyFeeFils: type: integer minimum: 0 subscriptionExpiresOn: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' subscriptionStatus: type: string enum: [no_subscription, paid, expiring, expired] monthsOwed: type: integer minimum: 0 subscriptionDebtFils: type: integer minimum: 0 unpaidFeesFils: type: integer minimum: 0 outstandingFils: type: integer minimum: 0 latestRenewalId: type: ["integer", "null"] minimum: 1 latestRenewalAmountFils: type: ["integer", "null"] minimum: 0 latestRenewalPaidAt: type: ["string", "null"] format: date-time AcademyFinanceUnassignedPlayer: type: object required: [id, name, unpaidFeesFils, outstandingFils] properties: id: type: integer minimum: 1 name: type: string unpaidFeesFils: type: integer minimum: 0 outstandingFils: type: integer minimum: 0 AcademyFinancePlayerInput: type: object required: [name, subscriptionExpiresOn] properties: name: type: string minLength: 1 maxLength: 120 monthlyDiscountFils: type: integer minimum: 0 default: 0 subscriptionExpiresOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinancePlayerBillingUpdate: type: object properties: monthlyDiscountFils: type: integer minimum: 0 subscriptionExpiresOn: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinanceRenewalInput: type: object required: [months] properties: months: type: integer minimum: 1 maximum: 12 AcademyFinanceRenewal: type: object required: [id, playerId, months, amountFils, effectiveMonthlyFeeFils, previousExpiresOn, newExpiresOn, paidAt] properties: id: type: integer minimum: 1 playerId: type: integer minimum: 1 months: type: integer minimum: 1 maximum: 12 amountFils: type: integer minimum: 0 effectiveMonthlyFeeFils: type: integer minimum: 0 previousExpiresOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' newExpiresOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' paidAt: type: string format: date-time AcademyFinanceFee: type: object required: [id, playerId, label, amountFils, dueDate, status, paidAt, note] properties: id: type: integer minimum: 1 playerId: type: integer minimum: 1 label: type: string amountFils: type: integer minimum: 0 dueDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' status: type: string enum: [due, paid, waived] paidAt: type: ["string", "null"] format: date-time note: type: ["string", "null"] AcademyFinanceFeeInput: type: object required: [label, amountFils] properties: label: type: string minLength: 1 maxLength: 200 amountFils: type: integer minimum: 1 dueDate: type: ["string", "null"] pattern: '^\d{4}-\d{2}-\d{2}$' description: Defaults to the current date in Asia/Amman when omitted. note: type: ["string", "null"] maxLength: 1000 AcademyFinanceFeePaymentInput: type: object required: [status] properties: status: type: string enum: [paid] AcademyFinanceStaff: type: object required: [id, name, role, monthlySalaryFils, nextSalaryDate, contractEndDate] properties: id: type: integer minimum: 1 name: type: string role: type: string monthlySalaryFils: type: integer minimum: 0 nextSalaryDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' contractEndDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinanceStaffInput: type: object required: [name, role, monthlySalaryFils, nextSalaryDate, contractEndDate] properties: name: type: string minLength: 1 maxLength: 120 role: type: string minLength: 1 maxLength: 120 monthlySalaryFils: type: integer minimum: 1 nextSalaryDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' contractEndDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinanceStaffUpdate: type: object properties: name: type: string minLength: 1 maxLength: 120 role: type: string minLength: 1 maxLength: 120 monthlySalaryFils: type: integer minimum: 1 nextSalaryDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' contractEndDate: type: string pattern: '^\d{4}-\d{2}-\d{2}$' AcademyFinanceSalaryPayment: type: object required: [staff, payment] properties: staff: $ref: "#/components/schemas/AcademyFinanceStaff" payment: $ref: "#/components/schemas/AcademyFinanceOtherPayment" AcademyFinanceOtherPayment: type: object required: [id, staffId, category, label, amountFils, occurredOn, status, paidAt] properties: id: type: integer minimum: 1 staffId: type: ["integer", "null"] minimum: 1 category: type: string label: type: string amountFils: type: integer minimum: 1 occurredOn: type: string pattern: '^\d{4}-\d{2}-\d{2}$' status: type: string enum: [paid, unpaid] paidAt: type: ["string", "null"] format: date-time AcademyFinanceOtherPaymentList: type: object required: [month, paidTotalFils, unpaidTotalFils, payments] properties: month: type: string pattern: '^\d{4}-\d{2}$' paidTotalFils: type: integer minimum: 0 unpaidTotalFils: type: integer minimum: 0 payments: type: array items: $ref: "#/components/schemas/AcademyFinanceOtherPayment" AcademyFinanceOtherPaymentInput: type: object required: [category, label, amountFils, status] properties: category: type: string minLength: 1 maxLength: 120 label: type: string minLength: 1 maxLength: 240 amountFils: type: integer minimum: 1 status: type: string enum: [paid, unpaid] AcademyFinanceOtherPaymentStatusUpdate: type: object required: [status] properties: status: type: string enum: [paid] AcademyFinanceCategory: type: object required: [id, name] properties: id: type: integer minimum: 1 name: type: string AcademyFinanceCategoryList: type: object required: [builtIn, custom] properties: builtIn: type: array items: type: string custom: type: array items: $ref: "#/components/schemas/AcademyFinanceCategory" AcademyFinanceCategoryInput: type: object required: [name] properties: name: type: string minLength: 1 maxLength: 120 AcademySessionInput: type: object required: [type, startsAt, location] properties: type: type: string enum: [training, match] startsAt: type: string format: date-time endsAt: type: ["string", "null"] format: date-time squadId: type: ["integer", "null"] minimum: 1 location: type: string minLength: 1 maxLength: 200 opponent: description: Only accepted for match sessions. type: ["string", "null"] maxLength: 160 notes: type: ["string", "null"] maxLength: 2000 AcademySessionUpdate: type: object properties: type: type: string enum: [training, match] startsAt: type: string format: date-time endsAt: type: ["string", "null"] format: date-time squadId: type: ["integer", "null"] minimum: 1 location: type: string minLength: 1 maxLength: 200 opponent: description: Only accepted for match sessions; null clears the opponent. type: ["string", "null"] maxLength: 160 ownScore: description: Set both scores for a match, or set both to null to clear the result. type: ["integer", "null"] minimum: 0 maximum: 2147483647 opponentScore: type: ["integer", "null"] minimum: 0 maximum: 2147483647 notes: type: ["string", "null"] maxLength: 2000 AcademyMemberListItem: type: object required: [userId, name, email, roles] properties: userId: type: integer name: type: string email: type: string format: email roles: type: array minItems: 1 items: $ref: "#/components/schemas/AcademyMemberRole" AcademyMemberSummary: type: object required: [userId, name, email, roles] properties: userId: type: integer name: type: string email: type: string format: email roles: type: array minItems: 1 items: $ref: "#/components/schemas/AcademyMemberRole" AcademyMemberAssignment: type: object required: [email, role] properties: email: type: string format: email role: $ref: "#/components/schemas/AcademyMemberRole" CreateAcademyInput: type: object required: [name, fieldId, daysOfWeek] properties: name: type: string fieldId: type: integer daysOfWeek: type: array items: type: string description: type: ["string", "null"] logoUrl: type: ["string", "null"] contactPhone: type: ["string", "null"] maxLength: 80 UpdateAcademyInput: type: object properties: name: type: string fieldId: type: integer daysOfWeek: type: array items: type: string description: type: ["string", "null"] logoUrl: type: ["string", "null"] contactPhone: type: ["string", "null"] maxLength: 80 AddAcademyRecordingInput: type: object required: [recordingId] properties: recordingId: type: integer Banner: type: object required: [id, title, imageUrl] properties: id: type: string upperSubtext: type: string title: type: string lowerSubtext: type: string imageUrl: type: string hyperlink: type: ["string", "null"] ImpressionInput: type: object required: [clipId, completed] properties: clipId: type: integer completed: type: boolean skippedAtSecond: type: ["integer", "null"] AdminAdEntry: type: object required: [id, title, creativeUrl, clickUrl, durationSeconds, targetType, status, createdAt] properties: id: type: integer title: type: string creativeUrl: type: string clickUrl: type: string durationSeconds: type: integer targetType: type: string targetFieldId: type: ["integer", "null"] startsAt: type: ["string", "null"] endsAt: type: ["string", "null"] status: type: string createdAt: type: string AdminClipIdsInput: type: object required: [clipIds] properties: clipIds: type: array minItems: 1 maxItems: 200 items: type: integer AdminClipExportRepairInput: type: object properties: action: type: string enum: [dry_run, apply] default: dry_run confirmed: type: boolean userId: type: integer minimum: 1 clipIdMin: type: integer minimum: 1 clipIdMax: type: integer minimum: 1 AdminClipExportRepairResult: type: object required: [clipId, userId, userName, userEmail, title, currentStatus, exportedUrl, probe, bytes, changed, newStatus, newUrl] properties: clipId: { type: integer } userId: { type: integer } userName: { type: string } userEmail: { type: string } title: { type: string } currentStatus: { type: string } exportedUrl: { type: string } probe: type: string enum: [exists, missing, unverified] bytes: { type: ["integer", "null"] } changed: { type: boolean } newStatus: { type: string } newUrl: { type: string } AdminClipExportRepairResponse: type: object required: [action, results, totals] properties: action: type: string enum: [dry_run, apply] results: type: array items: $ref: "#/components/schemas/AdminClipExportRepairResult" totals: type: object required: [exists, missing, unverified, changed] properties: exists: { type: integer } missing: { type: integer } unverified: { type: integer } changed: { type: integer } AdminClipPlaybackNotReady: type: object required: [error, exportStatus] properties: error: type: string const: Export not ready exportStatus: type: string description: The current export status, or missing when the clip does not exist. AdminClipSourceCheckResult: type: object required: [clipId, sourceStatus, sourceStatusCode, reason] properties: clipId: type: integer sourceStatus: type: string enum: [ready, expired, live, unavailable] sourceStatusCode: type: ["integer", "null"] reason: type: ["string", "null"] AdminClipReclipResult: type: object required: [clipId, sourceStatus, state, queuePosition, reason] properties: clipId: type: integer sourceStatus: type: string enum: [ready, expired, live, unavailable] state: type: string enum: [queued, already_running, skipped] queuePosition: type: ["integer", "null"] reason: type: ["string", "null"] CreateAdInput: type: object required: [title, creativeUrl, clickUrl, durationSeconds] properties: title: type: string creativeUrl: type: string clickUrl: type: string durationSeconds: type: integer targetType: type: string targetFieldId: type: ["integer", "null"] startsAt: type: ["string", "null"] endsAt: type: ["string", "null"] status: type: string PatchAdInput: type: object properties: status: type: string title: type: string creativeUrl: type: string clickUrl: type: string durationSeconds: type: integer AdStats: type: object required: [impressions, clicks, completions, skipRate, completionRate] properties: impressions: type: integer clicks: type: integer completions: type: integer skipRate: type: number completionRate: type: number TrackingBox: type: object required: [frame, x, y, w, h] properties: frame: type: integer minimum: 0 x: type: number y: type: number w: type: number minimum: 0 h: type: number minimum: 0 TrackingTrack: type: object required: [id, startFrame, endFrame, boxes] properties: id: type: string label: type: ["string", "null"] startFrame: type: integer minimum: 0 endFrame: type: integer minimum: 0 boxes: type: array items: $ref: "#/components/schemas/TrackingBox" TrackingCrossing: type: object required: [frame, trackId, otherTrackId] properties: frame: type: integer minimum: 0 trackId: type: string otherTrackId: type: string confidence: type: number minimum: 0 maximum: 1 InPlaySpan: type: object required: [start, end] properties: start: type: number minimum: 0 end: type: number minimum: 0 TrackingEvent: type: object required: [type, time] properties: type: type: string time: type: number minimum: 0 label: type: ["string", "null"] clipId: type: ["string", "null"] TrackingSegment: type: object required: [version, segmentIndex, name, startFrame, endFrame, startSeconds, endSeconds, tracks, crossings, inPlaySpans, events] properties: version: type: integer minimum: 1 segmentIndex: type: integer minimum: 0 name: type: string startFrame: type: integer minimum: 0 endFrame: type: integer minimum: 0 startSeconds: type: number minimum: 0 endSeconds: type: number minimum: 0 tracks: type: array items: $ref: "#/components/schemas/TrackingTrack" crossings: type: array items: $ref: "#/components/schemas/TrackingCrossing" inPlaySpans: type: array items: $ref: "#/components/schemas/InPlaySpan" events: type: array items: $ref: "#/components/schemas/TrackingEvent" TrackingSegmentManifest: type: object required: [index, name, startFrame, endFrame, startSeconds, endSeconds, objectPath] properties: index: type: integer minimum: 0 name: type: string startFrame: type: integer minimum: 0 endFrame: type: integer minimum: 0 startSeconds: type: number minimum: 0 endSeconds: type: number minimum: 0 objectPath: type: string spritesPath: type: string description: Object path of the crop strips for the identity board, when the bundle carried them. jerseyPath: type: string description: Object path of normalized shirt-number readings for this segment, when present. JerseyTrackReading: type: object required: [number, seenFrames, confidence] properties: number: type: string description: Shirt number, kept as text so leading-zero artefacts can be rejected without numeric coercion. seenFrames: type: integer minimum: 0 confidence: type: number frames: type: array description: Absolute recording-frame numbers contributing to this reading, when supplied by the pipeline. items: type: integer minimum: 0 JerseySidecar: type: object required: [v, tracks, numbers] properties: v: type: integer enum: [1] tracks: type: object additionalProperties: $ref: "#/components/schemas/JerseyTrackReading" numbers: type: object description: Rebuilt map from shirt number to namespaced track ids. additionalProperties: type: array items: type: string TrackingIdentityPart: type: object required: [trackId, fromFrame, toFrame] properties: trackId: type: string fromFrame: type: integer minimum: 0 toFrame: type: integer minimum: 0 tapFrame: type: integer minimum: 0 description: >- The frame of the claim-page decision that added this part, so an undo can reverse a whole decision. Absent on parts the identity board wrote. Declared here so the response validator stops stripping it on the way to the board. reviewedThrough: type: integer minimum: 0 description: >- Frames of this part below this one have been answered on the claim page. Per part, because a chain with a filled gap has no single answered frontier. Not the board's to change; declared so it survives a round trip through the board. TrackingIdentity: type: object required: [id, parts] properties: id: type: string name: type: string nullable: true parts: type: array items: $ref: "#/components/schemas/TrackingIdentityPart" reviewedThroughFrame: type: integer minimum: 0 description: >- Everything before this frame has been answered by the claimant on the claim page. Not the board's to change; declared so it survives a round trip through the board. TrackingIdentityDecision: type: object required: [trackId, fromFrame, toFrame, action] properties: trackId: type: string fromFrame: type: integer minimum: 0 toFrame: type: integer minimum: 0 action: type: string enum: [parked, deleted] TrackingPitchModelGridPoint: type: object required: [x, y] properties: x: type: number description: Pitch position in metres on the horizontal axis. y: type: number description: Pitch position in metres on the vertical axis. TrackingPitchModel: type: object required: [calibrationId, fittedAt, calibratedAspectRatio, pitchWidthMetres, pitchHeightMetres, grid] properties: calibrationId: type: string minLength: 1 description: Immutable identifier for the calibration fit that produced this model. fittedAt: type: string format: date-time description: Date and time at which this calibration was fitted. calibratedAspectRatio: type: number exclusiveMinimum: 0 description: Image width divided by image height used when fitting this model. pitchWidthMetres: type: number exclusiveMinimum: 0 description: Real pitch width represented by the model, in metres. pitchHeightMetres: type: number exclusiveMinimum: 0 description: Real pitch height represented by the model, in metres. grid: type: array minItems: 2 description: > Rectangular row-major calibration grid. Rows map from image top to bottom and columns map from image left to right. Values are pitch coordinates in metres and are bilinearly interpolated. items: type: array minItems: 2 items: $ref: "#/components/schemas/TrackingPitchModelGridPoint" TrackingPitchModelSummary: type: object required: [calibrationId, fittedAt, calibratedAspectRatio, gridRows, gridColumns, pitchWidthMetres, pitchHeightMetres] properties: calibrationId: type: ["string", "null"] fittedAt: type: ["string", "null"] format: date-time calibratedAspectRatio: type: ["number", "null"] gridRows: type: integer minimum: 2 gridColumns: type: integer minimum: 2 pitchWidthMetres: type: number exclusiveMinimum: 0 pitchHeightMetres: type: number exclusiveMinimum: 0 TrackingManifest: type: object required: [version, label, width, height, frameRate, frameCount, duration, matchOffset, segmentCount, segments] properties: version: type: integer minimum: 1 label: type: string width: type: integer minimum: 1 height: type: integer minimum: 1 frameRate: type: number exclusiveMinimum: 0 frameCount: type: integer minimum: 1 duration: type: number exclusiveMinimum: 0 matchOffset: type: number description: >- Display only. Added to tracking time to show a clock that matches the wider match, e.g. an hour that starts at minute 40. Must never be used to seek. videoStartSeconds: type: number minimum: 0 description: >- Where tracking frame 0 sits inside the video file, in seconds. The recording can be longer than the tracked window - the 2026-08-24 recording is two hours and the tracked hour starts 18 minutes in, so this is 1080. Optional for bundles uploaded before this field existed; the server fills 0 and the boxes will be wrong until it is set. segmentCount: type: integer minimum: 1 segments: type: array items: $ref: "#/components/schemas/TrackingSegmentManifest" pitchModel: $ref: "#/components/schemas/TrackingPitchModel" description: Optional camera-to-pitch calibration for distance metrics. identities: type: array description: The identity board's result - pieces of tracks that are one person. Optional. items: $ref: "#/components/schemas/TrackingIdentity" identityDecisions: type: array description: Admin decisions that keep parked or deleted fragments out of automatic regrouping. items: $ref: "#/components/schemas/TrackingIdentityDecision" provenance: type: object additionalProperties: true description: How the tracking bundle was produced. TrackingBundle: type: object description: Legacy single-file upload accepted during migration. New uploads should be ZIP bundles. required: [version, label, width, height, frameRate, frameCount, duration, matchOffset, tracks, crossings, inPlaySpans, events] properties: version: type: integer minimum: 1 label: type: string width: type: integer minimum: 1 height: type: integer minimum: 1 frameRate: type: number exclusiveMinimum: 0 frameCount: type: integer minimum: 1 duration: type: number exclusiveMinimum: 0 matchOffset: type: number tracks: type: array items: $ref: "#/components/schemas/TrackingTrack" crossings: type: array items: $ref: "#/components/schemas/TrackingCrossing" inPlaySpans: type: array items: $ref: "#/components/schemas/InPlaySpan" events: type: array items: $ref: "#/components/schemas/TrackingEvent" AdminTrackingBundlePatchBody: type: object minProperties: 1 properties: videoStartSeconds: type: number minimum: 0 pitchModel: oneOf: - $ref: "#/components/schemas/TrackingPitchModel" - type: "null" AdminMatchWindowBody: type: object required: [startSeconds] properties: startSeconds: type: ["number", "null"] minimum: 0 description: Tracking seconds where the match starts; null clears the window. endSeconds: type: ["number", "null"] description: Tracking seconds where the match ends; omitted or null means the end of the recording. why: type: string maxLength: 500 RecordingMatchWindow: type: object required: [startSeconds, endSeconds, source] properties: startSeconds: type: number endSeconds: type: ["number", "null"] description: Null means the end of the recording. source: type: string enum: [admin, detector] setBy: type: integer setAt: type: string why: type: string AdminMatchWindowResponse: type: object required: [recordingId, duration, matchWindow, resyncedClaims, updatedAt] properties: recordingId: type: integer duration: type: number description: The tracked duration the window is checked against, seconds. matchWindow: oneOf: - $ref: "#/components/schemas/RecordingMatchWindow" - type: "null" resyncedClaims: type: integer description: Claims on the recording whose coverage, completion and clip list were re-derived. updatedAt: type: string format: date-time AdminTrackingBundlePatchResponse: type: object required: [recordingId, videoStartSeconds, pitchModel, updatedAt] properties: recordingId: type: integer videoStartSeconds: type: number minimum: 0 pitchModel: oneOf: - $ref: "#/components/schemas/TrackingPitchModelSummary" - type: "null" updatedAt: type: string format: date-time TrackingBundleSummary: type: object required: [recordingId, label, duration, segmentCount, frameCoverage, trackCount, crossingCount, uploadedAt] properties: recordingId: type: integer label: type: string duration: type: number trackCount: type: integer crossingCount: type: integer segmentCount: type: integer frameCoverage: type: string segmentRanges: type: array items: $ref: "#/components/schemas/TrackingSegmentManifest" pitchModel: oneOf: - $ref: "#/components/schemas/TrackingPitchModelSummary" - type: "null" uploadedAt: type: string ClaimEarnedClip: type: object required: [id, title, momentSeconds, kind, status] properties: id: type: string title: type: string momentSeconds: type: number kind: type: string status: type: string userClipId: type: integer description: The user clip row backing this earned moment, when materialized. follow: type: array description: Player follow points retained for delayed clip framing. items: type: array minItems: 3 maxItems: 3 items: type: number ClaimPlayerStats: type: object required: [confirmedSeconds, minutesPlayed, coveragePercent, answeredMoments, acceptedMoments, trackedSegments, totalSegments, matchedEvents, heatmap, distanceMetres, averageSpeedMetresPerSecond, touches, passes, shots, dribbles] properties: confirmedSeconds: type: number minimum: 0 description: Union of the player's accepted tracking intervals, in seconds. minutesPlayed: type: number minimum: 0 description: Confirmed player presence in minutes. coveragePercent: type: number minimum: 0 maximum: 100 description: Percentage of the tracked match covered by accepted player intervals. answeredMoments: type: integer minimum: 0 description: Identity checkpoint moments answered by the player. acceptedMoments: type: integer minimum: 0 description: Identity checkpoint moments accepted as the player. trackedSegments: type: integer minimum: 0 description: Tracking segments containing an accepted interval for the player. totalSegments: type: integer minimum: 0 description: Total tracking segments in the uploaded match bundle. matchedEvents: type: integer minimum: 0 description: Match events that occurred during an accepted player interval. heatmap: type: object required: [coordinateSpace, cells] properties: coordinateSpace: type: string enum: [pitch, camera] description: Pitch-normalized coordinates when calibrated, otherwise image coordinates. cells: type: array items: type: object required: [x, y, weight] properties: x: type: number minimum: 0 maximum: 1 y: type: number minimum: 0 maximum: 1 weight: type: number minimum: 0 distanceMetres: type: ["number", "null"] minimum: 0 description: Smoothed camera-derived distance in metres, or null without a pitch model. averageSpeedMetresPerSecond: type: ["number", "null"] minimum: 0 description: Total calibrated distance divided by confirmed time present, or null without a pitch model. touches: $ref: "#/components/schemas/UnavailablePlayerMetric" passes: $ref: "#/components/schemas/UnavailablePlayerMetric" shots: $ref: "#/components/schemas/UnavailablePlayerMetric" dribbles: $ref: "#/components/schemas/UnavailablePlayerMetric" UnavailablePlayerMetric: type: object required: [value, available, unavailableReason] properties: value: type: ["number", "null"] available: type: boolean unavailableReason: type: string description: Machine-readable reason when the metric is unavailable. AdminPlayerMetrics: type: object required: [userId, displayName, email, playerStats, topSpeedMetresPerSecond, topSpeedUsableTimeFraction] properties: userId: type: integer displayName: type: string email: type: string playerStats: $ref: "#/components/schemas/ClaimPlayerStats" topSpeedMetresPerSecond: type: ["number", "null"] minimum: 0 description: Highest valid rolling one-second speed in metres per second; intentionally unvalidated. topSpeedUsableTimeFraction: type: ["number", "null"] minimum: 0 maximum: 1 description: Fraction of confirmed player time remaining after top-speed exclusions. AdminRecordingPlayerMetricsResponse: type: object required: [recordingId, pitchModel, players] properties: recordingId: type: integer pitchModel: oneOf: - $ref: "#/components/schemas/TrackingPitchModelSummary" - type: "null" players: type: array items: $ref: "#/components/schemas/AdminPlayerMetrics" ClaimChainPart: type: object required: [trackId, fromFrame, toFrame] properties: trackId: type: string fromFrame: type: integer toFrame: type: integer ClaimChainUncertainty: type: object description: >- Where playback should stop and ask. Playback stops here and nowhere else: a track end is definitive, a swap is judged and only raised when the geometry or the tracker's own confidence passes a threshold. required: [kind, frame, trackId, confidence, reason] properties: kind: type: string enum: [track-end, swap, continuity] frame: type: integer trackId: type: string otherTrackId: type: string description: For a swap, the player the identity may have been exchanged with. confidence: type: number reason: type: string description: A plain sentence for the person watching. Never a code. ClaimChain: type: object required: [recordingId, identityId, identityMap, name, bundleFingerprint, frameRate, chain, coverageSeconds, coveragePercent, nextUncertainty, openQuestions, completed, requiredCoveragePercent, labelRecorded, resetByAdmin] properties: openQuestions: type: array description: >- Every question still open on this chain, earliest first (capped). The page stops at the next one AHEAD of the playhead and lists the ones behind it - a filled gap leaves questions behind, and a stop behind the playhead must be shown, never fired. items: $ref: "#/components/schemas/ClaimChainUncertainty" completed: type: boolean description: >- Whether this claim counts as the person's match - enough of it claimed and nothing left to answer. The same rule that awards clips. requiredCoveragePercent: type: number description: The coverage this recording needs for a claim to count. resetByAdmin: type: boolean description: >- True when this claimant has no chain but an administrator released their claim on the identity board - i.e. the claim was removed by someone else, not by the claimant. The page says so instead of looking like a fresh start. recordingId: type: integer identityId: type: string description: >- The caller's identity row on the identity board. The chain IS that identity, so a merge made in the video is a merge on the board. identityMap: type: object description: >- The state of the identity map behind this recording. The chain only stops where a part has nothing to continue onto, so frequent stops mean the map is not joining this person's pieces -- which is either an empty map or one whose fingerprint no longer matches the bundle, in which case all of it is discarded silently. required: [people, matchesBundle, tracks, segments, linker] properties: people: type: integer matchesBundle: type: boolean tracks: type: integer segments: type: integer linker: type: ["string", "null"] description: >- Which linker produced this bundle, from the pipeline's own provenance stamp. Null means unstamped. name: type: ["string", "null"] bundleFingerprint: type: string description: Send this back on writes; a mismatch is a 409, never a blind merge. frameRate: type: number chain: type: array items: $ref: "#/components/schemas/ClaimChainPart" coverageSeconds: type: number coveragePercent: type: number nextUncertainty: oneOf: - $ref: "#/components/schemas/ClaimChainUncertainty" - type: "null" labelRecorded: type: ["boolean", "null"] description: >- Whether this decision's training label landed. A label write never fails the claim, so this is how a silently empty corpus becomes visible. Null on reads, which record nothing. ClaimChainForUserInput: type: object required: [userId, parts, bundleFingerprint] properties: userId: type: integer parts: type: array minItems: 1 items: $ref: "#/components/schemas/ClaimChainPart" name: type: ["string", "null"] bundleFingerprint: type: string description: The bundle the parts were built against; a mismatch is a 409. dryRun: type: boolean ClaimChainForUser: allOf: - $ref: "#/components/schemas/ClaimChain" - type: object required: [dryRun, userId, binding, progress] properties: dryRun: type: boolean userId: type: integer completionReason: type: string description: Dry run only. Why the chain would or would not count. earnedClipCount: type: integer description: Dry run only. Scoreable events inside the claimed stretch. binding: description: The player's identity binding after the write; null on a dry run. oneOf: - type: object required: [personId, state] properties: personId: type: string state: type: string - type: "null" progress: description: The player's claim progress row after the write; null on a dry run. oneOf: - type: object required: [completed, claimedPercent, clipsUnlocked, stage] properties: completed: type: boolean claimedPercent: type: number clipsUnlocked: type: integer stage: type: string - type: "null" ClaimChainConflict: type: object required: [error] properties: error: type: string currentBundleFingerprint: type: string conflict: $ref: "#/components/schemas/ClaimChainPart" ClaimChainTapInput: type: object required: [trackId, frame] properties: trackId: type: string minLength: 1 frame: type: integer minimum: 0 rejectedTrackId: type: ["string", "null"] description: The track we were following that turned out to be wrong, if any. name: type: ["string", "null"] maxLength: 60 description: What the person calls themselves. Falls back to their account name. decisionMs: type: ["integer", "null"] minimum: 0 description: How long the person took. Free difficulty weighting for the label. bundleFingerprint: type: ["string", "null"] ClaimChainFrameInput: type: object required: [frame] properties: frame: type: integer minimum: 0 decisionMs: type: ["integer", "null"] minimum: 0 bundleFingerprint: type: ["string", "null"] ClaimOffPitchInput: type: object required: [clientId, fromSeconds, toSeconds] properties: clientId: type: string minLength: 1 fromSeconds: type: number minimum: 0 description: Exact tracking-time seconds from the start of the tracking window. toSeconds: type: number minimum: 0 description: Exact tracking-time seconds from the start of the tracking window. confirmConflict: type: boolean description: Explicitly acknowledge overlap with vouched identity fragments. ClaimOffPitchSpan: type: object required: [id, clientId, fromSeconds, toSeconds, createdAt] properties: id: type: integer clientId: type: string fromSeconds: type: number toSeconds: type: number createdAt: type: string ClaimOffPitchDeleteResponse: type: object required: [deleted, clientId] properties: deleted: type: boolean clientId: type: string ClaimMatchResponse: type: object required: [identitiesFingerprint, recording, manifest, offPitchSpans, offPitchSeconds] properties: identitiesFingerprint: type: string description: >- A digest of manifest.identities as served. The identity board echoes it on save, and a save against a different value is refused - which is how a board opened before a player claimed themselves is stopped from overwriting that claim, independent of the vouched-fragment bindings. recording: $ref: "#/components/schemas/Recording" manifest: $ref: "#/components/schemas/TrackingManifest" offPitchSpans: type: array items: $ref: "#/components/schemas/ClaimOffPitchSpan" offPitchSeconds: type: number minimum: 0 ClaimMatchRosterResponse: type: object required: [players] properties: players: type: array items: $ref: "#/components/schemas/ClaimMatchRosterPlayer" ClaimMatchRosterPlayer: type: object required: [id, name, number, minutes, parts, photos] properties: id: type: string name: type: ["string", "null"] number: type: ["string", "null"] minutes: type: number minimum: 0 parts: type: array items: $ref: "#/components/schemas/ClaimMatchRosterPart" photos: type: array items: $ref: "#/components/schemas/ClaimMatchRosterPhoto" ClaimMatchRosterPart: type: object required: [segmentIndex, segmentName, trackId, fromFrame, toFrame] properties: segmentIndex: type: integer minimum: 0 segmentName: type: string trackId: type: string fromFrame: type: integer minimum: 0 description: Exact start frame from the referenced track in its stored bundle segment. toFrame: type: integer minimum: 0 description: Exact end frame from the referenced track in its stored bundle segment. ClaimMatchRosterPhoto: type: object required: [trackId, segmentIndex, frame, jpeg] properties: trackId: type: string segmentIndex: type: integer minimum: 0 frame: type: integer minimum: 0 jpeg: type: string ClaimMatchClipGroup: type: object required: [recordingId, recordingLabel, fieldName, date, clips] properties: recordingId: type: integer recordingLabel: type: string description: Human-readable match label. fieldName: type: string date: type: string clips: type: array items: $ref: "#/components/schemas/ClaimEarnedClip" ClaimMatchClipsResponse: type: array items: $ref: "#/components/schemas/ClaimMatchClipGroup" ClaimIdentityBinding: type: object required: [id, personId, trackingBundleId, bundleFingerprint, resolutionMethod, supportCount, acceptedAnswerCount, supportPercent, vouchedFragments, state, resolvedAt, updatedAt] properties: id: type: integer personId: type: string trackingBundleId: type: integer bundleFingerprint: type: string resolutionMethod: type: string enum: [identity-map, track-fallback, chain] supportCount: type: integer minimum: 0 acceptedAnswerCount: type: integer minimum: 0 supportPercent: type: number minimum: 0 maximum: 100 vouchedFragments: type: array items: $ref: "#/components/schemas/ClaimVouchedFragment" state: type: string enum: [pending, confirmed, disputed, needs_resolution, released, rejected] claimantName: type: string description: Claimant name. Returned only by the admin binding-list endpoint. claimedAt: type: string format: date-time description: When the claimant created this binding. Returned only by the admin binding-list endpoint. resolvedAt: type: ["string", "null"] format: date-time updatedAt: type: string format: date-time ClaimVouchedFragment: type: object required: [trackId, fromFrame, toFrame] properties: trackId: type: string fromFrame: type: integer minimum: 0 toFrame: type: integer minimum: 0 ClaimedMatchHistoryItem: type: object required: [recordingId, recordingLabel, fieldName, date, state, personId, resolutionMethod, supportPercent, claimedAt] properties: recordingId: type: integer recordingLabel: type: string fieldName: type: string date: type: string state: type: string enum: [pending, confirmed, disputed, needs_resolution, released, rejected] personId: type: string resolutionMethod: type: string enum: [identity-map, track-fallback, chain] supportPercent: type: number claimedAt: type: string format: date-time ClaimedMatchHistoryResponse: type: array items: $ref: "#/components/schemas/ClaimedMatchHistoryItem" ClaimMatchDispute: type: object required: [id, recordingId, recordingLabel, claimantUserId, claimantName, claimantEmail, personId, resolutionMethod, supportCount, acceptedAnswerCount, supportPercent, state, currentOwnerUserId, currentOwnerName, createdAt, updatedAt] properties: id: type: integer recordingId: type: integer recordingLabel: type: string claimantUserId: type: integer claimantName: type: string claimantEmail: type: string personId: type: string resolutionMethod: type: string supportCount: type: integer acceptedAnswerCount: type: integer supportPercent: type: number state: type: string currentOwnerUserId: type: ["integer", "null"] currentOwnerName: type: ["string", "null"] createdAt: type: string format: date-time updatedAt: type: string format: date-time ClaimMatchDisputesResponse: type: array items: $ref: "#/components/schemas/ClaimMatchDispute" ResolveClaimMatchDisputeInput: type: object required: [winnerUserId] properties: winnerUserId: type: integer AccountDeletionResponse: type: object required: [ok] properties: ok: type: boolean AccountDeletionError: type: object required: [error, reason] properties: error: type: string reason: type: string enum: - upcoming_booking - admin - field_owner - rate_limited - clerk_failed - data_failed - not_found - unauthenticated - forbidden - invalid_id - self_delete - last_admin activeFootageRequests: type: integer SentPlayerIdentificationRequest: type: object required: [id, recordingId, recipientUserId, recipientName, recordingDate, court, matchCode, rosterPlayerId, playerName, shirtNumber, status, createdAt] properties: id: type: integer recordingId: type: integer recipientUserId: type: integer recipientName: type: string recordingDate: type: ["string", "null"] court: type: ["string", "null"] matchCode: type: ["string", "null"] rosterPlayerId: type: string playerName: type: ["string", "null"] shirtNumber: type: ["string", "null"] status: type: string enum: [pending, accepted, declined] createdAt: type: string format: date-time PlayerIdentificationRequestActionResponse: type: object required: [ok] properties: ok: type: boolean AdminReviewerSignInLinksInput: oneOf: - $ref: "#/components/schemas/AdminReviewerSignInLinksByEmail" - $ref: "#/components/schemas/AdminReviewerSignInLinksById" AdminReviewerSignInLinksByEmail: type: object required: [email] additionalProperties: false properties: email: type: string format: email maxLength: 254 count: type: integer minimum: 1 maximum: 5 default: 3 validityDays: type: integer minimum: 1 maximum: 30 default: 30 AdminReviewerSignInLinksById: type: object required: [userId] additionalProperties: false properties: userId: type: integer minimum: 1 count: type: integer minimum: 1 maximum: 5 default: 3 validityDays: type: integer minimum: 1 maximum: 30 default: 30 ReviewerSignInLinksResponse: type: object required: [urls] properties: urls: type: array minItems: 1 maxItems: 5 items: type: string format: uri securitySchemes: clerkSession: type: http scheme: bearer bearerFormat: JWT