baseball-engine / backend /docs /openapi.json
github-actions[bot]
Automated Deploy: 83dd0e037548607e097653f87bce7ef9d342efc6
9ec8d34
Raw History Blame
117 kB
{ "openapi": "3.1.0", "info": { "title": "Cognivision Baseball API", "version": "0.1.0" }, "paths": { "/v1/auth/register": { "post": { "tags": [ "auth" ], "summary": "Register", "operationId": "register_v1_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterIn" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/login": { "post": { "tags": [ "auth" ], "summary": "Login", "operationId": "login_v1_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/social": { "post": { "tags": [ "auth" ], "summary": "Social", "operationId": "social_v1_auth_social_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialAuthOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/refresh": { "post": { "tags": [ "auth" ], "summary": "Refresh", "operationId": "refresh_v1_auth_refresh_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokensOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/logout": { "post": { "tags": [ "auth" ], "summary": "Logout", "operationId": "logout_v1_auth_logout_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshIn" } } } }, "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/password/forgot": { "post": { "tags": [ "auth" ], "summary": "Forgot Password", "operationId": "forgot_password_v1_auth_password_forgot_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordIn" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/auth/password/reset": { "post": { "tags": [ "auth" ], "summary": "Reset Password", "operationId": "reset_password_v1_auth_password_reset_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordIn" } } }, "required": true }, "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/me": { "get": { "tags": [ "accounts" ], "summary": "Get Me", "operationId": "get_me_v1_me_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": [ "accounts" ], "summary": "Update Me", "operationId": "update_me_v1_me_patch", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserBody" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "accounts" ], "summary": "Delete Me", "operationId": "delete_me_v1_me_delete", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/teams": { "post": { "tags": [ "teams" ], "summary": "Save Team", "operationId": "save_team_v1_teams_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/teams/lookup": { "get": { "tags": [ "teams" ], "summary": "Lookup Team", "operationId": "lookup_team_v1_teams_lookup_get", "parameters": [ { "name": "code", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 32, "title": "Code" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamSummaryResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/teams/{code}/join": { "post": { "tags": [ "teams" ], "summary": "Join Team", "operationId": "join_team_v1_teams__code__join_post", "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string", "title": "Code" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/me/team": { "delete": { "tags": [ "teams" ], "summary": "Leave Team", "operationId": "leave_team_v1_me_team_delete", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/uploads": { "post": { "tags": [ "uploads" ], "summary": "Create Upload", "operationId": "create_upload_v1_uploads_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadIn" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/sessions": { "post": { "tags": [ "sessions" ], "summary": "Create Session", "operationId": "create_session_v1_sessions_post", "parameters": [ { "name": "idempotency-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Idempotency-Key" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionIn" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionEnvelope" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "get": { "tags": [ "sessions" ], "summary": "List Sessions", "operationId": "list_sessions_v1_sessions_get", "parameters": [ { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "h", "p" ], "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "self", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Self" } }, { "name": "athlete_name", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 80 }, { "type": "null" } ], "title": "Athlete Name" } }, { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Since" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_SessionSummary_" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/sessions/{session_id}": { "get": { "tags": [ "sessions" ], "summary": "Get Session", "operationId": "get_session_v1_sessions__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionEnvelope" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "sessions" ], "summary": "Delete Session", "operationId": "delete_session_v1_sessions__session_id__delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/sessions/{session_id}/swing-report": { "post": { "tags": [ "swing reports" ], "summary": "Create Swing Report", "operationId": "create_swing_report_v1_sessions__session_id__swing_report_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwingAnalysisPayload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwingReport" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/drill-logs": { "post": { "tags": [ "drills" ], "summary": "Create Drill Log", "operationId": "create_drill_log_v1_drill_logs_post", "parameters": [ { "name": "idempotency-key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Idempotency-Key" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DrillLogIn" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DrillLogEnvelope" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "get": { "tags": [ "drills" ], "summary": "List Drill Logs", "operationId": "list_drill_logs_v1_drill_logs_get", "parameters": [ { "name": "from", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "From" } }, { "name": "to", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "To" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_DrillLogOut_" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/sessions/{session_id}/review": { "post": { "tags": [ "reviews" ], "summary": "Submit Review", "operationId": "submit_review_v1_sessions__session_id__review_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/coach/roster": { "get": { "tags": [ "coach" ], "summary": "Roster", "operationId": "roster_v1_coach_roster_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_RosterItem_" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/coach/players/{player_id}/sessions": { "get": { "tags": [ "coach" ], "summary": "Player Sessions", "operationId": "player_sessions_v1_coach_players__player_id__sessions_get", "parameters": [ { "name": "player_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Player Id" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "h", "p" ], "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_SessionSummary_" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/coach/queue": { "get": { "tags": [ "coach" ], "summary": "Queue", "operationId": "queue_v1_coach_queue_get", "parameters": [ { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Since" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/devices": { "post": { "tags": [ "devices" ], "summary": "Register Device", "operationId": "register_device_v1_devices_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceResponse" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/devices/{push_token}": { "delete": { "tags": [ "devices" ], "summary": "Remove Device", "operationId": "remove_device_v1_devices__push_token__delete", "parameters": [ { "name": "push_token", "in": "path", "required": true, "schema": { "type": "string", "title": "Push Token" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "204": { "description": "Successful Response" }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/me/entitlement": { "get": { "tags": [ "billing" ], "summary": "Get Entitlement", "operationId": "get_entitlement_v1_me_entitlement_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Entitlement" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/billing/receipts": { "post": { "tags": [ "billing" ], "summary": "Submit Receipt", "operationId": "submit_receipt_v1_billing_receipts_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReceiptIn" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReceiptOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/billing/webhooks/apple": { "post": { "tags": [ "billing" ], "summary": "Apple Webhook", "operationId": "apple_webhook_v1_billing_webhooks_apple_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppleWebhookIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookAck" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/billing/webhooks/google": { "post": { "tags": [ "billing" ], "summary": "Google Webhook", "operationId": "google_webhook_v1_billing_webhooks_google_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PubSubPushIn" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookAck" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/catalog/metrics": { "get": { "tags": [ "catalog" ], "summary": "Catalog Metrics", "operationId": "catalog_metrics_v1_catalog_metrics_get", "parameters": [ { "name": "mode", "in": "query", "required": false, "schema": { "enum": [ "h", "p" ], "type": "string", "default": "h", "title": "Mode" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogOut" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/admin/api-logs": { "get": { "tags": [ "API logs" ], "summary": "List Logs", "operationId": "list_logs_v1_admin_api_logs_get", "parameters": [ { "name": "request_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Request Id" } }, { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "analysis_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 256 }, { "type": "null" } ], "title": "Analysis Id" } }, { "name": "account_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Account Id" } }, { "name": "status_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 599, "minimum": 100 }, { "type": "null" } ], "title": "Status Code" } }, { "name": "method", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS" ], "type": "string" }, { "type": "null" } ], "title": "Method" } }, { "name": "route", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "title": "Route" } }, { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Since" } }, { "name": "until", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Until" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_AuditLogSummary_" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/v1/admin/api-logs/{log_id}": { "get": { "tags": [ "API logs" ], "summary": "Get Log", "operationId": "get_log_v1_admin_api_logs__log_id__get", "parameters": [ { "name": "log_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Log Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditLogDetail" } } } }, "400": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "components": { "schemas": { "AppleWebhookIn": { "properties": { "signedPayload": { "type": "string", "maxLength": 200000, "title": "Signedpayload" } }, "type": "object", "required": [ "signedPayload" ], "title": "AppleWebhookIn" }, "AthleteIn": { "properties": { "name": { "type": "string", "maxLength": 80, "minLength": 2, "title": "Name" }, "age": { "type": "integer", "maximum": 70.0, "minimum": 5.0, "title": "Age" }, "height_cm": { "type": "number", "maximum": 230.0, "minimum": 90.0, "title": "Height Cm" }, "weight_kg": { "type": "number", "maximum": 200.0, "minimum": 20.0, "title": "Weight Kg" }, "bats": { "type": "string", "enum": [ "L", "R", "S" ], "title": "Bats" }, "throws": { "type": "string", "enum": [ "L", "R" ], "title": "Throws" }, "level": { "type": "string", "enum": [ "youth", "high_school", "college", "adult" ], "title": "Level" } }, "additionalProperties": false, "type": "object", "required": [ "name", "age", "height_cm", "weight_kg", "bats", "throws", "level" ], "title": "AthleteIn" }, "AuthOut": { "properties": { "user": { "$ref": "#/components/schemas/UserOut" }, "tokens": { "$ref": "#/components/schemas/TokensOut" } }, "type": "object", "required": [ "user", "tokens" ], "title": "AuthOut" }, "BenchmarkOut": { "additionalProperties": false, "properties": { "benchmark_id": { "title": "Benchmark Id", "type": "string" }, "version": { "title": "Version", "type": "string" }, "population": { "title": "Population", "type": "string" }, "on_target": { "$ref": "#/components/schemas/Interval" }, "satisfactory": { "$ref": "#/components/schemas/Interval" }, "unit": { "title": "Unit", "type": "string" }, "source_reference": { "title": "Source Reference", "type": "string" } }, "required": [ "benchmark_id", "version", "population", "on_target", "satisfactory", "unit", "source_reference" ], "title": "BenchmarkOut", "type": "object" }, "CatalogOut": { "properties": { "groups": { "items": { "$ref": "#/components/schemas/GroupOut" }, "type": "array", "title": "Groups" }, "metrics": { "items": { "$ref": "#/components/schemas/MetricOut" }, "type": "array", "title": "Metrics" }, "drills": { "items": { "$ref": "#/components/schemas/DrillOut" }, "type": "array", "title": "Drills" } }, "type": "object", "required": [ "groups", "metrics", "drills" ], "title": "CatalogOut" }, "DataQualityNote": { "additionalProperties": false, "properties": { "code": { "title": "Code", "type": "string" }, "severity": { "enum": [ "info", "warning" ], "title": "Severity", "type": "string" }, "text": { "title": "Text", "type": "string" } }, "required": [ "code", "severity", "text" ], "title": "DataQualityNote", "type": "object" }, "DeviceCreate": { "properties": { "platform": { "type": "string", "enum": [ "ios", "android" ], "title": "Platform" }, "push_token": { "type": "string", "maxLength": 4096, "minLength": 1, "title": "Push Token" } }, "additionalProperties": false, "type": "object", "required": [ "platform", "push_token" ], "title": "DeviceCreate" }, "DeviceOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "platform": { "type": "string", "title": "Platform" }, "push_token": { "type": "string", "title": "Push Token" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "platform", "push_token", "created_at" ], "title": "DeviceOut" }, "DeviceResponse": { "properties": { "device": { "$ref": "#/components/schemas/DeviceOut" } }, "type": "object", "required": [ "device" ], "title": "DeviceResponse" }, "Drill": { "additionalProperties": false, "properties": { "drill_id": { "title": "Drill Id", "type": "string" }, "name": { "title": "Name", "type": "string" }, "how": { "title": "How", "type": "string" }, "cue": { "title": "Cue", "type": "string" }, "reps": { "title": "Reps", "type": "string" } }, "required": [ "drill_id", "name", "how", "cue", "reps" ], "title": "Drill", "type": "object" }, "DrillLogEnvelope": { "properties": { "log": { "$ref": "#/components/schemas/DrillLogOut" } }, "type": "object", "required": [ "log" ], "title": "DrillLogEnvelope" }, "DrillLogIn": { "properties": { "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "drill_id": { "type": "string", "maxLength": 16, "minLength": 1, "title": "Drill Id" }, "reps": { "type": "integer", "maximum": 8.0, "minimum": 1.0, "title": "Reps" }, "day": { "type": "string", "format": "date", "title": "Day" } }, "additionalProperties": false, "type": "object", "required": [ "drill_id", "reps", "day" ], "title": "DrillLogIn" }, "DrillLogOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "drill_id": { "type": "string", "title": "Drill Id" }, "reps": { "type": "integer", "title": "Reps" }, "day": { "type": "string", "format": "date", "title": "Day" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "drill_id", "reps", "day", "created_at" ], "title": "DrillLogOut" }, "DrillOut": { "properties": { "drill_id": { "type": "string", "title": "Drill Id" }, "name": { "type": "string", "title": "Name" }, "how": { "type": "string", "title": "How" }, "cue": { "type": "string", "title": "Cue" }, "reps": { "type": "string", "title": "Reps" } }, "type": "object", "required": [ "drill_id", "name", "how", "cue", "reps" ], "title": "DrillOut" }, "Entitlement": { "properties": { "plan": { "type": "string", "title": "Plan" }, "weekly_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Weekly Limit" }, "used_this_week": { "type": "integer", "title": "Used This Week" }, "left": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Left" }, "window_days": { "type": "integer", "title": "Window Days" } }, "type": "object", "required": [ "plan", "weekly_limit", "used_this_week", "left", "window_days" ], "title": "Entitlement" }, "FocusArea": { "additionalProperties": false, "properties": { "metric_id": { "title": "Metric Id", "type": "string" }, "group": { "enum": [ "balance_load", "stride", "power_move", "contact_follow_through" ], "title": "Group", "type": "string" }, "display_name": { "title": "Display Name", "type": "string" }, "rating": { "enum": [ "on_target", "satisfactory", "off_target", "not_rated" ], "title": "Rating", "type": "string" }, "rating_label": { "title": "Rating Label", "type": "string" }, "coach_message": { "title": "Coach Message", "type": "string" }, "practice_feel": { "title": "Practice Feel", "type": "string" }, "drill": { "$ref": "#/components/schemas/Drill" }, "evidence_metric_ids": { "items": { "type": "string" }, "title": "Evidence Metric Ids", "type": "array" } }, "required": [ "metric_id", "group", "display_name", "rating", "rating_label", "coach_message", "practice_feel", "drill", "evidence_metric_ids" ], "title": "FocusArea", "type": "object" }, "FocusSummary": { "properties": { "metric_id": { "type": "string", "title": "Metric Id" }, "display_name": { "type": "string", "title": "Display Name" }, "drill_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Drill Id" } }, "type": "object", "required": [ "metric_id", "display_name", "drill_id" ], "title": "FocusSummary" }, "ForgotPasswordIn": { "properties": { "email": { "type": "string", "maxLength": 254, "title": "Email" } }, "additionalProperties": false, "type": "object", "required": [ "email" ], "title": "ForgotPasswordIn" }, "GroupOut": { "properties": { "group": { "type": "string", "title": "Group" }, "display_name": { "type": "string", "title": "Display Name" } }, "type": "object", "required": [ "group", "display_name" ], "title": "GroupOut" }, "GroupReport": { "additionalProperties": false, "properties": { "group": { "enum": [ "balance_load", "stride", "power_move", "contact_follow_through" ], "title": "Group", "type": "string" }, "display_name": { "title": "Display Name", "type": "string" }, "score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Score" }, "rating": { "enum": [ "on_target", "satisfactory", "off_target", "not_rated" ], "title": "Rating", "type": "string" }, "rating_label": { "title": "Rating Label", "type": "string" }, "not_rated_reason": { "anyOf": [ { "enum": [ "measurement_unavailable", "no_benchmark", "no_measurements_available", "measurements_unavailable", "no_rated_measurements" ], "type": "string" }, { "type": "null" } ], "title": "Not Rated Reason" }, "summary": { "title": "Summary", "type": "string" }, "metric_ids": { "items": { "type": "string" }, "title": "Metric Ids", "type": "array" } }, "required": [ "group", "display_name", "score", "rating", "rating_label", "not_rated_reason", "summary", "metric_ids" ], "title": "GroupReport", "type": "object" }, "Interval": { "additionalProperties": false, "properties": { "lower": { "title": "Lower", "type": "number" }, "upper": { "title": "Upper", "type": "number" } }, "required": [ "lower", "upper" ], "title": "Interval", "type": "object" }, "Items_DrillLogOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DrillLogOut" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[DrillLogOut]" }, "Items_RosterItem_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/RosterItem" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[RosterItem]" }, "LastByMode": { "properties": { "h": { "anyOf": [ { "$ref": "#/components/schemas/LastSession" }, { "type": "null" } ] }, "p": { "anyOf": [ { "$ref": "#/components/schemas/LastSession" }, { "type": "null" } ] } }, "type": "object", "title": "LastByMode" }, "LastSession": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "overall_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Overall Score" }, "delta": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Delta" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "focus_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Focus Name" } }, "type": "object", "required": [ "session_id", "overall_score", "delta", "created_at", "focus_name" ], "title": "LastSession" }, "Limitation": { "additionalProperties": false, "properties": { "code": { "title": "Code", "type": "string" }, "text": { "title": "Text", "type": "string" } }, "required": [ "code", "text" ], "title": "Limitation", "type": "object" }, "LoginIn": { "properties": { "email": { "type": "string", "maxLength": 254, "minLength": 1, "title": "Email" }, "password": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Password" } }, "additionalProperties": false, "type": "object", "required": [ "email", "password" ], "title": "LoginIn" }, "MarksIn": { "properties": { "contact_frame": { "type": "integer", "minimum": 0.0, "title": "Contact Frame" }, "contact_offset": { "type": "integer", "title": "Contact Offset" }, "contact_source": { "type": "string", "enum": [ "detected", "suggested", "manual" ], "title": "Contact Source" }, "stride_start_frame": { "type": "integer", "minimum": 0.0, "title": "Stride Start Frame" }, "stride_end_frame": { "type": "integer", "minimum": 0.0, "title": "Stride End Frame" }, "pitcher_direction": { "anyOf": [ { "$ref": "#/components/schemas/PitcherDirection" }, { "type": "null" } ], "default": null } }, "additionalProperties": false, "type": "object", "required": [ "contact_frame", "contact_offset", "contact_source", "stride_start_frame", "stride_end_frame" ], "title": "MarksIn" }, "MeOut": { "properties": { "user": { "$ref": "#/components/schemas/UserOut" }, "team": { "anyOf": [ { "$ref": "#/components/schemas/TeamOut" }, { "type": "null" } ] }, "entitlement": { "$ref": "#/components/schemas/Entitlement" } }, "type": "object", "required": [ "user", "team", "entitlement" ], "title": "MeOut" }, "MeUpdate": { "properties": { "role": { "anyOf": [ { "type": "string", "enum": [ "player", "coach" ] }, { "type": "null" } ], "title": "Role" }, "focus": { "anyOf": [ { "type": "string", "enum": [ "h", "p", "both" ] }, { "type": "null" } ], "title": "Focus" }, "unit": { "anyOf": [ { "type": "string", "enum": [ "imperial", "metric" ] }, { "type": "null" } ], "title": "Unit" }, "private_videos": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Private Videos" }, "profile": { "anyOf": [ { "$ref": "#/components/schemas/ProfileUpdate" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "MeUpdate", "description": "Partial update: only the fields sent are changed. Profile nulls clear a value; top-level nulls are rejected." }, "MeasurementReport": { "additionalProperties": false, "properties": { "metric_id": { "title": "Metric Id", "type": "string" }, "display_name": { "title": "Display Name", "type": "string" }, "group": { "enum": [ "balance_load", "stride", "power_move", "contact_follow_through" ], "title": "Group", "type": "string" }, "status": { "enum": [ "available", "limited", "unavailable" ], "title": "Status", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "title": "Unit", "type": "string" }, "display_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Value" }, "score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Score" }, "rating": { "enum": [ "on_target", "satisfactory", "off_target", "not_rated" ], "title": "Rating", "type": "string" }, "rating_label": { "title": "Rating Label", "type": "string" }, "rating_is_tentative": { "title": "Rating Is Tentative", "type": "boolean" }, "not_rated_reason": { "anyOf": [ { "enum": [ "measurement_unavailable", "no_benchmark", "no_measurements_available", "measurements_unavailable", "no_rated_measurements" ], "type": "string" }, { "type": "null" } ], "title": "Not Rated Reason" }, "benchmark": { "anyOf": [ { "$ref": "#/components/schemas/BenchmarkOut" }, { "type": "null" } ] }, "what_it_means": { "title": "What It Means", "type": "string" }, "result_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result Text" }, "coach_tip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Coach Tip" }, "limitations": { "items": { "$ref": "#/components/schemas/Limitation" }, "title": "Limitations", "type": "array" } }, "required": [ "metric_id", "display_name", "group", "status", "value", "unit", "display_value", "score", "rating", "rating_label", "rating_is_tentative", "not_rated_reason", "benchmark", "what_it_means", "result_text", "coach_tip", "limitations" ], "title": "MeasurementReport", "type": "object" }, "MediaOut": { "properties": { "video_url": { "type": "string", "title": "Video Url" }, "thumbnail_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumbnail Url" }, "expires_at": { "type": "string", "format": "date-time", "title": "Expires At" } }, "type": "object", "required": [ "video_url", "thumbnail_url", "expires_at" ], "title": "MediaOut" }, "MetricOut": { "properties": { "metric_id": { "type": "string", "title": "Metric Id" }, "display_name": { "type": "string", "title": "Display Name" }, "group": { "type": "string", "title": "Group" }, "unit": { "type": "string", "title": "Unit" }, "what_it_means": { "type": "string", "title": "What It Means" } }, "type": "object", "required": [ "metric_id", "display_name", "group", "unit", "what_it_means" ], "title": "MetricOut" }, "Overview": { "additionalProperties": false, "properties": { "headline": { "title": "Headline", "type": "string" } }, "required": [ "headline" ], "title": "Overview", "type": "object" }, "Page_SessionSummary_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SessionSummary" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items" ], "title": "Page[SessionSummary]" }, "PitcherDirection": { "properties": { "from": { "prefixItems": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "number", "maximum": 1.0, "minimum": 0.0 } ], "type": "array", "maxItems": 2, "minItems": 2, "title": "From" }, "to": { "prefixItems": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "number", "maximum": 1.0, "minimum": 0.0 } ], "type": "array", "maxItems": 2, "minItems": 2, "title": "To" } }, "additionalProperties": false, "type": "object", "required": [ "from", "to" ], "title": "PitcherDirection" }, "PreviousOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "overall_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Overall Score" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "overall_score", "created_at" ], "title": "PreviousOut" }, "ProfileOut": { "properties": { "name": { "type": "string", "title": "Name" }, "age": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Age" }, "height_cm": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Height Cm" }, "weight_kg": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Weight Kg" }, "bats": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bats" }, "throws": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Throws" }, "level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Level" } }, "type": "object", "required": [ "name", "age", "height_cm", "weight_kg", "bats", "throws", "level" ], "title": "ProfileOut" }, "ProfileUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 80 }, { "type": "null" } ], "title": "Name" }, "age": { "anyOf": [ { "type": "integer", "maximum": 70.0, "minimum": 5.0 }, { "type": "null" } ], "title": "Age" }, "height_cm": { "anyOf": [ { "type": "number", "maximum": 230.0, "minimum": 90.0 }, { "type": "null" } ], "title": "Height Cm" }, "weight_kg": { "anyOf": [ { "type": "number", "maximum": 200.0, "minimum": 20.0 }, { "type": "null" } ], "title": "Weight Kg" }, "bats": { "anyOf": [ { "type": "string", "enum": [ "L", "R", "S" ] }, { "type": "null" } ], "title": "Bats" }, "throws": { "anyOf": [ { "type": "string", "enum": [ "L", "R" ] }, { "type": "null" } ], "title": "Throws" }, "level": { "anyOf": [ { "type": "string", "enum": [ "youth", "high_school", "college", "adult" ] }, { "type": "null" } ], "title": "Level" } }, "additionalProperties": false, "type": "object", "title": "ProfileUpdate" }, "PubSubMessage": { "properties": { "data": { "type": "string", "maxLength": 100000, "title": "Data", "default": "" } }, "type": "object", "title": "PubSubMessage" }, "PubSubPushIn": { "properties": { "message": { "$ref": "#/components/schemas/PubSubMessage" } }, "type": "object", "required": [ "message" ], "title": "PubSubPushIn" }, "QueueItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "owner_id": { "type": "string", "format": "uuid", "title": "Owner Id" }, "mode": { "type": "string", "title": "Mode" }, "is_self": { "type": "boolean", "title": "Is Self" }, "athlete_name": { "type": "string", "title": "Athlete Name" }, "status": { "type": "string", "title": "Status" }, "overall_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Overall Score" }, "focus": { "anyOf": [ { "$ref": "#/components/schemas/FocusSummary" }, { "type": "null" } ] }, "review": { "anyOf": [ { "$ref": "#/components/schemas/ReviewSummary" }, { "type": "null" } ] }, "thumbnail_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumbnail Url" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "owner_name": { "type": "string", "title": "Owner Name" } }, "type": "object", "required": [ "id", "owner_id", "mode", "is_self", "athlete_name", "status", "overall_score", "focus", "review", "thumbnail_url", "created_at", "owner_name" ], "title": "QueueItem" }, "QueueResponse": { "properties": { "open": { "items": { "$ref": "#/components/schemas/QueueItem" }, "type": "array", "title": "Open" }, "reviewed_today": { "items": { "$ref": "#/components/schemas/QueueItem" }, "type": "array", "title": "Reviewed Today" } }, "type": "object", "required": [ "open", "reviewed_today" ], "title": "QueueResponse" }, "ReceiptIn": { "properties": { "platform": { "type": "string", "enum": [ "ios", "android" ], "title": "Platform" }, "product_id": { "type": "string", "maxLength": 64, "minLength": 1, "title": "Product Id" }, "signed_transaction": { "anyOf": [ { "type": "string", "maxLength": 32000 }, { "type": "null" } ], "title": "Signed Transaction" }, "purchase_token": { "anyOf": [ { "type": "string", "maxLength": 4096 }, { "type": "null" } ], "title": "Purchase Token" } }, "additionalProperties": false, "type": "object", "required": [ "platform", "product_id" ], "title": "ReceiptIn" }, "ReceiptOut": { "properties": { "entitlement": { "$ref": "#/components/schemas/Entitlement" } }, "type": "object", "required": [ "entitlement" ], "title": "ReceiptOut" }, "RecentByMode": { "properties": { "h": { "items": { "type": "integer" }, "type": "array", "title": "H", "default": [] }, "p": { "items": { "type": "integer" }, "type": "array", "title": "P", "default": [] } }, "type": "object", "title": "RecentByMode" }, "RefreshIn": { "properties": { "refresh_token": { "type": "string", "maxLength": 256, "minLength": 1, "title": "Refresh Token" } }, "additionalProperties": false, "type": "object", "required": [ "refresh_token" ], "title": "RefreshIn" }, "RegisterIn": { "properties": { "email": { "type": "string", "maxLength": 254, "title": "Email" }, "password": { "type": "string", "maxLength": 128, "minLength": 8, "title": "Password" }, "role": { "type": "string", "enum": [ "player", "coach" ], "title": "Role" } }, "additionalProperties": false, "type": "object", "required": [ "email", "password", "role" ], "title": "RegisterIn" }, "ReportMeta": { "additionalProperties": false, "properties": { "generated_at": { "title": "Generated At", "type": "string" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "text_source": { "enum": [ "llm", "rules", "mixed" ], "title": "Text Source", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "prompt_version": { "title": "Prompt Version", "type": "string" }, "cache_hit": { "title": "Cache Hit", "type": "boolean" }, "fallback_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fallback Reason" }, "input_schema_version": { "title": "Input Schema Version", "type": "string" }, "measurement_definitions_version": { "title": "Measurement Definitions Version", "type": "string" }, "benchmark_registry_version": { "title": "Benchmark Registry Version", "type": "string" }, "coaching_rules_version": { "title": "Coaching Rules Version", "type": "string" } }, "required": [ "generated_at", "request_id", "text_source", "model", "prompt_version", "cache_hit", "fallback_reason", "input_schema_version", "measurement_definitions_version", "benchmark_registry_version", "coaching_rules_version" ], "title": "ReportMeta", "type": "object" }, "ResetPasswordIn": { "properties": { "token": { "type": "string", "maxLength": 256, "minLength": 1, "title": "Token" }, "password": { "type": "string", "maxLength": 128, "minLength": 8, "title": "Password" } }, "additionalProperties": false, "type": "object", "required": [ "token", "password" ], "title": "ResetPasswordIn" }, "ReviewCreate": { "properties": { "cue": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Cue" }, "drill_id": { "type": "string", "maxLength": 16, "minLength": 1, "title": "Drill Id" }, "verdicts": { "additionalProperties": { "type": "string", "enum": [ "agree", "change", "later" ] }, "type": "object", "title": "Verdicts", "default": {} } }, "additionalProperties": false, "type": "object", "required": [ "cue", "drill_id" ], "title": "ReviewCreate" }, "ReviewOut": { "properties": { "coach_id": { "type": "string", "format": "uuid", "title": "Coach Id" }, "coach_name": { "type": "string", "title": "Coach Name" }, "cue": { "type": "string", "title": "Cue" }, "drill_id": { "type": "string", "title": "Drill Id" }, "verdicts": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Verdicts" }, "at": { "type": "string", "format": "date-time", "title": "At" } }, "type": "object", "required": [ "coach_id", "coach_name", "cue", "drill_id", "verdicts", "at" ], "title": "ReviewOut", "description": "The review shape every endpoint returns (GET /sessions/{id} and POST /sessions/{id}/review)." }, "ReviewResponse": { "properties": { "review": { "$ref": "#/components/schemas/ReviewOut" } }, "type": "object", "required": [ "review" ], "title": "ReviewResponse" }, "ReviewSummary": { "properties": { "coach_name": { "type": "string", "title": "Coach Name" }, "at": { "type": "string", "format": "date-time", "title": "At" } }, "type": "object", "required": [ "coach_name", "at" ], "title": "ReviewSummary" }, "RosterItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "email": { "type": "string", "title": "Email" }, "focus": { "type": "string", "title": "Focus" }, "level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Level" }, "pending_count": { "type": "integer", "title": "Pending Count" }, "last": { "$ref": "#/components/schemas/LastByMode" }, "recent": { "$ref": "#/components/schemas/RecentByMode" } }, "type": "object", "required": [ "id", "name", "email", "focus", "level", "pending_count", "last", "recent" ], "title": "RosterItem", "description": "A player as the coach sees them. Never carries body data (age, height, weight)." }, "SessionEnvelope": { "properties": { "session": { "$ref": "#/components/schemas/SessionOut" } }, "type": "object", "required": [ "session" ], "title": "SessionEnvelope" }, "SessionIn": { "properties": { "video_upload_id": { "type": "string", "format": "uuid", "title": "Video Upload Id" }, "thumbnail_upload_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Thumbnail Upload Id" }, "mode": { "type": "string", "enum": [ "h", "p" ], "title": "Mode" }, "is_self": { "type": "boolean", "title": "Is Self" }, "athlete": { "anyOf": [ { "$ref": "#/components/schemas/AthleteIn" }, { "type": "null" } ] }, "duration_sec": { "type": "number", "exclusiveMinimum": 0.0, "title": "Duration Sec" }, "fps": { "type": "integer", "maximum": 240.0, "minimum": 1.0, "title": "Fps" }, "marks": { "$ref": "#/components/schemas/MarksIn" } }, "additionalProperties": false, "type": "object", "required": [ "video_upload_id", "mode", "is_self", "duration_sec", "fps", "marks" ], "title": "SessionIn" }, "SessionOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "owner_id": { "type": "string", "format": "uuid", "title": "Owner Id" }, "is_self": { "type": "boolean", "title": "Is Self" }, "mode": { "type": "string", "title": "Mode" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "analyzed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Analyzed At" }, "athlete": { "additionalProperties": true, "type": "object", "title": "Athlete" }, "duration_sec": { "type": "number", "title": "Duration Sec" }, "fps": { "type": "integer", "title": "Fps" }, "marks": { "additionalProperties": true, "type": "object", "title": "Marks" }, "report": { "anyOf": [ { "$ref": "#/components/schemas/SwingReport" }, { "type": "null" } ], "description": "Null while status is pending" }, "review": { "anyOf": [ { "$ref": "#/components/schemas/ReviewOut" }, { "type": "null" } ] }, "media": { "$ref": "#/components/schemas/MediaOut" }, "previous": { "anyOf": [ { "$ref": "#/components/schemas/PreviousOut" }, { "type": "null" } ] }, "ordinal": { "type": "integer", "title": "Ordinal" } }, "type": "object", "required": [ "id", "owner_id", "is_self", "mode", "status", "created_at", "analyzed_at", "athlete", "duration_sec", "fps", "marks", "report", "review", "media", "previous", "ordinal" ], "title": "SessionOut" }, "SessionSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "owner_id": { "type": "string", "format": "uuid", "title": "Owner Id" }, "mode": { "type": "string", "title": "Mode" }, "is_self": { "type": "boolean", "title": "Is Self" }, "athlete_name": { "type": "string", "title": "Athlete Name" }, "status": { "type": "string", "title": "Status" }, "overall_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Overall Score" }, "focus": { "anyOf": [ { "$ref": "#/components/schemas/FocusSummary" }, { "type": "null" } ] }, "review": { "anyOf": [ { "$ref": "#/components/schemas/ReviewSummary" }, { "type": "null" } ] }, "thumbnail_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumbnail Url" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "owner_id", "mode", "is_self", "athlete_name", "status", "overall_score", "focus", "review", "thumbnail_url", "created_at" ], "title": "SessionSummary" }, "SocialAuthOut": { "properties": { "user": { "$ref": "#/components/schemas/UserOut" }, "tokens": { "$ref": "#/components/schemas/TokensOut" }, "is_new": { "type": "boolean", "title": "Is New" } }, "type": "object", "required": [ "user", "tokens", "is_new" ], "title": "SocialAuthOut" }, "SocialIn": { "properties": { "provider": { "type": "string", "enum": [ "apple", "google" ], "title": "Provider" }, "id_token": { "type": "string", "maxLength": 8192, "minLength": 1, "title": "Id Token" }, "role": { "type": "string", "enum": [ "player", "coach" ], "title": "Role", "default": "player" } }, "additionalProperties": false, "type": "object", "required": [ "provider", "id_token" ], "title": "SocialIn" }, "SwingReport": { "additionalProperties": false, "properties": { "schema_version": { "const": "1.0", "title": "Schema Version", "type": "string" }, "analysis_id": { "title": "Analysis Id", "type": "string" }, "analysis_revision": { "title": "Analysis Revision", "type": "integer" }, "overall_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Overall Score" }, "overview": { "$ref": "#/components/schemas/Overview" }, "groups": { "items": { "$ref": "#/components/schemas/GroupReport" }, "title": "Groups", "type": "array" }, "focus_area": { "anyOf": [ { "$ref": "#/components/schemas/FocusArea" }, { "type": "null" } ] }, "measurements": { "items": { "$ref": "#/components/schemas/MeasurementReport" }, "title": "Measurements", "type": "array" }, "data_quality": { "items": { "$ref": "#/components/schemas/DataQualityNote" }, "title": "Data Quality", "type": "array" }, "meta": { "$ref": "#/components/schemas/ReportMeta" } }, "required": [ "schema_version", "analysis_id", "analysis_revision", "overall_score", "overview", "groups", "focus_area", "measurements", "data_quality", "meta" ], "title": "SwingReport", "type": "object" }, "TeamCreate": { "properties": { "name": { "type": "string", "maxLength": 60, "minLength": 2, "title": "Name" }, "coach_name": { "type": "string", "maxLength": 60, "minLength": 2, "title": "Coach Name" }, "coaching": { "type": "string", "enum": [ "h", "p", "both" ], "title": "Coaching" } }, "additionalProperties": false, "type": "object", "required": [ "name", "coach_name", "coaching" ], "title": "TeamCreate" }, "TeamOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "code": { "type": "string", "title": "Code" }, "name": { "type": "string", "title": "Name" }, "coach_id": { "type": "string", "format": "uuid", "title": "Coach Id" }, "coach_name": { "type": "string", "title": "Coach Name" }, "coaching": { "type": "string", "title": "Coaching" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "code", "name", "coach_id", "coach_name", "coaching", "created_at" ], "title": "TeamOut", "description": "The team shape every endpoint returns (GET /me, team create, lookup and join)." }, "TeamResponse": { "properties": { "team": { "$ref": "#/components/schemas/TeamOut" } }, "type": "object", "required": [ "team" ], "title": "TeamResponse" }, "TeamSummaryOut": { "properties": { "code": { "type": "string", "title": "Code" }, "name": { "type": "string", "title": "Name" }, "coach_name": { "type": "string", "title": "Coach Name" }, "coaching": { "type": "string", "title": "Coaching" } }, "type": "object", "required": [ "code", "name", "coach_name", "coaching" ], "title": "TeamSummaryOut", "description": "What a player sees before joining: no ids." }, "TeamSummaryResponse": { "properties": { "team": { "$ref": "#/components/schemas/TeamSummaryOut" } }, "type": "object", "required": [ "team" ], "title": "TeamSummaryResponse" }, "TokensOut": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "refresh_token": { "type": "string", "title": "Refresh Token" }, "expires_in": { "type": "integer", "title": "Expires In" } }, "type": "object", "required": [ "access_token", "refresh_token", "expires_in" ], "title": "TokensOut" }, "UploadIn": { "properties": { "kind": { "type": "string", "enum": [ "video", "thumbnail" ], "title": "Kind" }, "content_type": { "type": "string", "maxLength": 40, "minLength": 1, "title": "Content Type" }, "size_bytes": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Size Bytes" }, "duration_sec": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Duration Sec" } }, "additionalProperties": false, "type": "object", "required": [ "kind", "content_type", "size_bytes" ], "title": "UploadIn" }, "UploadOut": { "properties": { "upload_id": { "type": "string", "format": "uuid", "title": "Upload Id" }, "url": { "type": "string", "title": "Url" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "expires_at": { "type": "string", "format": "date-time", "title": "Expires At" } }, "type": "object", "required": [ "upload_id", "url", "headers", "expires_at" ], "title": "UploadOut" }, "UserBody": { "properties": { "user": { "$ref": "#/components/schemas/UserOut" } }, "type": "object", "required": [ "user" ], "title": "UserBody" }, "UserOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "role": { "type": "string", "title": "Role" }, "focus": { "type": "string", "title": "Focus" }, "profile": { "$ref": "#/components/schemas/ProfileOut" }, "unit": { "type": "string", "title": "Unit" }, "private_videos": { "type": "boolean", "title": "Private Videos" }, "team_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Code" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "email", "role", "focus", "profile", "unit", "private_videos", "team_code", "created_at" ], "title": "UserOut" }, "WebhookAck": { "properties": {}, "type": "object", "title": "WebhookAck" }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "examples": [ "VALIDATION", "NOT_FOUND", "PLAN_LIMIT" ] }, "message": { "type": "string", "description": "Safe to show in the app" }, "fields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Field path -> problem, for validation errors" } } } } }, "ApprovedBenchmark": { "additionalProperties": false, "properties": { "benchmark_id": { "minLength": 1, "pattern": "\\S", "title": "Benchmark Id", "type": "string" }, "version": { "minLength": 1, "pattern": "\\S", "title": "Version", "type": "string" }, "kind": { "const": "reference_interval", "title": "Kind", "type": "string" }, "lower": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Lower" }, "upper": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Upper" }, "unit": { "enum": [ "deg", "cm" ], "title": "Unit", "type": "string" }, "source_reference": { "minLength": 1, "pattern": "\\S", "title": "Source Reference", "type": "string" } }, "required": [ "benchmark_id", "version", "kind", "lower", "upper", "unit", "source_reference" ], "title": "ApprovedBenchmark", "type": "object" }, "Athlete": { "additionalProperties": false, "properties": { "athlete_id": { "minLength": 1, "pattern": "\\S", "title": "Athlete Id", "type": "string" }, "batting_hand": { "anyOf": [ { "enum": [ "left", "right" ], "type": "string" }, { "type": "null" } ], "title": "Batting Hand" }, "lead_foot": { "anyOf": [ { "enum": [ "left", "right" ], "type": "string" }, { "type": "null" } ], "title": "Lead Foot" }, "age_years": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "title": "Age Years" }, "height_cm": { "anyOf": [ { "exclusiveMinimum": 0, "type": "number" }, { "type": "null" } ], "title": "Height Cm" } }, "required": [ "athlete_id", "batting_hand", "lead_foot", "age_years", "height_cm" ], "title": "Athlete", "type": "object" }, "Events": { "additionalProperties": false, "properties": { "stride_start": { "$ref": "#/components/schemas/SwingEvent" }, "front_foot_down": { "$ref": "#/components/schemas/SwingEvent" }, "contact": { "$ref": "#/components/schemas/SwingEvent" } }, "required": [ "stride_start", "front_foot_down", "contact" ], "title": "Events", "type": "object" }, "Measurement": { "additionalProperties": false, "properties": { "metric_id": { "enum": [ "hip_shoulder_separation_at_foot_down", "stride_relative_length", "hip_shoulder_separation_at_contact" ], "title": "Metric Id", "type": "string" }, "group": { "enum": [ "balance_load", "stride", "power_move", "contact_follow_through" ], "title": "Group", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Value" }, "unit": { "enum": [ "deg", "cm" ], "title": "Unit", "type": "string" }, "event_id": { "anyOf": [ { "enum": [ "stride_start", "front_foot_down", "contact" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Event Id" }, "start_event_id": { "anyOf": [ { "enum": [ "stride_start", "front_foot_down", "contact" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Start Event Id" }, "end_event_id": { "anyOf": [ { "enum": [ "stride_start", "front_foot_down", "contact" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "End Event Id" }, "reference": { "enum": [ "signed_horizontal_shoulder_minus_hip_heading", "lead_ankle_displacement_relative_to_rear_ankle" ], "title": "Reference", "type": "string" }, "status": { "enum": [ "available", "limited", "unavailable" ], "title": "Status", "type": "string" }, "confidence": { "anyOf": [ { "maximum": 1, "minimum": 0, "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "uses_interpolated_input": { "title": "Uses Interpolated Input", "type": "boolean" }, "reasons": { "items": { "enum": [ "contact_not_verified", "contact_not_applicable", "event_not_detected", "event_timing_uncertain", "required_event_unavailable", "required_event_limited", "lead_foot_unknown", "required_landmarks_unusable", "ground_plane_unknown", "scale_is_model_estimated", "scale_unknown", "excessive_interpolation", "occlusion_unresolved", "temporal_inconsistency" ], "type": "string" }, "title": "Reasons", "type": "array" }, "benchmark": { "anyOf": [ { "$ref": "#/components/schemas/ApprovedBenchmark" }, { "type": "null" } ] } }, "required": [ "metric_id", "group", "value", "unit", "reference", "status", "confidence", "uses_interpolated_input", "reasons", "benchmark" ], "title": "Measurement", "type": "object" }, "SwingAnalysisPayload": { "additionalProperties": false, "properties": { "schema_version": { "const": "1.0", "title": "Schema Version", "type": "string" }, "analysis_id": { "minLength": 1, "pattern": "\\S", "title": "Analysis Id", "type": "string" }, "analysis_revision": { "minimum": 1, "title": "Analysis Revision", "type": "integer" }, "swing_id": { "minLength": 1, "pattern": "\\S", "title": "Swing Id", "type": "string" }, "status": { "const": "completed", "title": "Status", "type": "string" }, "athlete": { "$ref": "#/components/schemas/Athlete" }, "context": { "$ref": "#/components/schemas/SwingContext" }, "measurement_definitions_version": { "const": "1.0", "title": "Measurement Definitions Version", "type": "string" }, "events": { "$ref": "#/components/schemas/Events" }, "measurements": { "items": { "$ref": "#/components/schemas/Measurement" }, "minItems": 1, "title": "Measurements", "type": "array" } }, "required": [ "schema_version", "analysis_id", "analysis_revision", "swing_id", "status", "athlete", "context", "measurement_definitions_version", "events", "measurements" ], "title": "SwingAnalysisPayload", "type": "object" }, "SwingContext": { "additionalProperties": false, "properties": { "sport": { "const": "baseball", "title": "Sport", "type": "string" }, "practice_type": { "enum": [ "tee", "front_toss", "side_toss", "pitching_machine", "live_pitching", "game", "dry_swing", "unknown" ], "title": "Practice Type", "type": "string" } }, "required": [ "sport", "practice_type" ], "title": "SwingContext", "type": "object" }, "SwingEvent": { "additionalProperties": false, "properties": { "status": { "enum": [ "available", "limited", "unavailable" ], "title": "Status", "type": "string" }, "video_time_s": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Video Time S" }, "capture_time_s": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Capture Time S" }, "source": { "anyOf": [ { "enum": [ "manual_review", "pose_estimated", "bat_ball_detector" ], "type": "string" }, { "type": "null" } ], "title": "Source" }, "reasons": { "items": { "enum": [ "contact_not_verified", "contact_not_applicable", "event_not_detected", "event_timing_uncertain", "required_event_unavailable", "required_event_limited", "lead_foot_unknown", "required_landmarks_unusable", "ground_plane_unknown", "scale_is_model_estimated", "scale_unknown", "excessive_interpolation", "occlusion_unresolved", "temporal_inconsistency" ], "type": "string" }, "title": "Reasons", "type": "array" } }, "required": [ "status", "video_time_s", "capture_time_s", "source" ], "title": "SwingEvent", "type": "object" }, "AuditLogSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "request_id": { "type": "string", "title": "Request Id" }, "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "route": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Route" }, "status_code": { "type": "integer", "title": "Status Code" }, "duration_ms": { "type": "number", "title": "Duration Ms" }, "account_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Account Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "analysis_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Analysis Id" }, "analysis_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Analysis Revision" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code" }, "exception_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exception Type" }, "response_complete": { "type": "boolean", "title": "Response Complete" }, "service_version": { "type": "string", "title": "Service Version" } }, "type": "object", "required": [ "id", "created_at", "started_at", "request_id", "method", "path", "route", "status_code", "duration_ms", "account_id", "session_id", "analysis_id", "analysis_revision", "error_code", "exception_type", "response_complete", "service_version" ], "title": "AuditLogSummary" }, "AuditLogDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "request_id": { "type": "string", "title": "Request Id" }, "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "route": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Route" }, "status_code": { "type": "integer", "title": "Status Code" }, "duration_ms": { "type": "number", "title": "Duration Ms" }, "account_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Account Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "analysis_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Analysis Id" }, "analysis_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Analysis Revision" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code" }, "exception_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exception Type" }, "response_complete": { "type": "boolean", "title": "Response Complete" }, "service_version": { "type": "string", "title": "Service Version" }, "request_headers": { "additionalProperties": true, "type": "object", "title": "Request Headers" }, "query_params": { "additionalProperties": true, "type": "object", "title": "Query Params" }, "request_payload": { "additionalProperties": true, "type": "object", "title": "Request Payload" }, "response_headers": { "additionalProperties": true, "type": "object", "title": "Response Headers" }, "response_payload": { "additionalProperties": true, "type": "object", "title": "Response Payload" } }, "type": "object", "required": [ "id", "created_at", "started_at", "request_id", "method", "path", "route", "status_code", "duration_ms", "account_id", "session_id", "analysis_id", "analysis_revision", "error_code", "exception_type", "response_complete", "service_version", "request_headers", "query_params", "request_payload", "response_headers", "response_payload" ], "title": "AuditLogDetail" }, "Page_AuditLogSummary_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AuditLogSummary" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items" ], "title": "Page[AuditLogSummary]" } } } }
{
"openapi": "3.1.0",
"info": {
"title": "Cognivision Baseball API",
"version": "0.1.0"
},
"paths": {
"/v1/auth/register": {
"post": {
"tags": [
"auth"
],
"summary": "Register",
"operationId": "register_v1_auth_register_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterIn"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthOut"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/v1/auth/login": {
"post": {
"tags": [
"auth"
],
"summary": "Login",
"operationId": "login_v1_auth_login_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginIn"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthOut"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {