diff --git "a/backend/docs/openapi.json" "b/backend/docs/openapi.json" --- "a/backend/docs/openapi.json" +++ "b/backend/docs/openapi.json" @@ -1317,6 +1317,93 @@ } } }, + "/v1/sessions/{session_id}/pitch-report": { + "post": { + "tags": [ + "pitch reports" + ], + "summary": "Create Pitch Report", + "operationId": "create_pitch_report_v1_sessions__session_id__pitch_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/PitchAnalysisPayload" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PitchReport" + }, + { + "$ref": "#/components/schemas/SwingReport" + } + ], + "title": "Response Create Pitch Report V1 Sessions Session Id Pitch Report Post" + } + } + } + }, + "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": [ @@ -9244,7 +9331,11 @@ "balance_load", "stride", "power_move", - "contact_follow_through" + "contact_follow_through", + "leg_lift_balance", + "stride_landing", + "arm_action", + "release_finish" ], "type": "string" }, @@ -9719,7 +9810,11 @@ "balance_load", "stride", "power_move", - "contact_follow_through" + "contact_follow_through", + "leg_lift_balance", + "stride_landing", + "arm_action", + "release_finish" ], "title": "Group", "type": "string" @@ -9765,7 +9860,9 @@ "no_benchmark", "no_measurements_available", "measurements_unavailable", - "no_rated_measurements" + "no_rated_measurements", + "implausible_value", + "not_comparable_for_drill" ], "type": "string" }, @@ -10308,7 +10405,11 @@ "balance_load", "stride", "power_move", - "contact_follow_through" + "contact_follow_through", + "leg_lift_balance", + "stride_landing", + "arm_action", + "release_finish" ], "title": "Group", "type": "string" @@ -10385,7 +10486,9 @@ "no_benchmark", "no_measurements_available", "measurements_unavailable", - "no_rated_measurements" + "no_rated_measurements", + "implausible_value", + "not_comparable_for_drill" ], "type": "string" }, @@ -10437,6 +10540,28 @@ }, "title": "Limitations", "type": "array" + }, + "value_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/Interval" + }, + { + "type": "null" + } + ], + "default": null + }, + "score_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/Interval" + }, + { + "type": "null" + } + ], + "default": null } }, "required": [ @@ -11334,95 +11459,21 @@ "type": "object", "title": "PermissionsIn" }, - "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": { + "PitchAthleteIn": { "properties": { "name": { "type": "string", - "title": "Name" + "maxLength": 80, + "minLength": 2, + "title": "Name", + "default": "Pitching athlete" }, "age": { "anyOf": [ { - "type": "integer" + "type": "integer", + "maximum": 70.0, + "minimum": 5.0 }, { "type": "null" @@ -11433,7 +11484,9 @@ "height_cm": { "anyOf": [ { - "type": "number" + "type": "number", + "maximum": 230.0, + "minimum": 90.0 }, { "type": "null" @@ -11444,7 +11497,9 @@ "weight_kg": { "anyOf": [ { - "type": "number" + "type": "number", + "maximum": 200.0, + "minimum": 20.0 }, { "type": "null" @@ -11455,7 +11510,12 @@ "bats": { "anyOf": [ { - "type": "string" + "type": "string", + "enum": [ + "L", + "R", + "S" + ] }, { "type": "null" @@ -11466,7 +11526,11 @@ "throws": { "anyOf": [ { - "type": "string" + "type": "string", + "enum": [ + "L", + "R" + ] }, { "type": "null" @@ -11477,7 +11541,13 @@ "level": { "anyOf": [ { - "type": "string" + "type": "string", + "enum": [ + "youth", + "high_school", + "college", + "adult" + ] }, { "type": "null" @@ -11486,212 +11556,325 @@ "title": "Level" } }, + "additionalProperties": false, "type": "object", - "required": [ - "name", - "age", - "height_cm", - "weight_kg", - "bats", - "throws", - "level" - ], - "title": "ProfileOut" + "title": "PitchAthleteIn" }, - "ProfileUpdate": { + "PitchFocus": { "properties": { - "name": { + "kind": { + "type": "string", + "enum": [ + "fix", + "maintain", + "general" + ], + "title": "Kind" + }, + "is_tentative": { + "type": "boolean", + "title": "Is Tentative" + }, + "metric_id": { "anyOf": [ { - "type": "string", - "maxLength": 80 + "type": "string" }, { "type": "null" } ], - "title": "Name" + "title": "Metric Id" }, - "age": { + "group": { "anyOf": [ { - "type": "integer", - "maximum": 70.0, - "minimum": 5.0 + "type": "string", + "enum": [ + "gather", + "stride_plant", + "rotation_release", + "release_finish" + ] }, { "type": "null" } ], - "title": "Age" + "title": "Group" }, - "height_cm": { - "anyOf": [ - { - "type": "number", - "maximum": 230.0, - "minimum": 90.0 + "display_name": { + "type": "string", + "title": "Display Name" + }, + "rating": { + "type": "string", + "enum": [ + "on_target", + "satisfactory", + "off_target", + "not_rated" + ], + "title": "Rating" + }, + "rating_label": { + "type": "string", + "title": "Rating Label" + }, + "coach_message": { + "type": "string", + "title": "Coach Message" + }, + "practice_feel": { + "type": "string", + "title": "Practice Feel" + }, + "drill": { + "anyOf": [ + { + "$ref": "#/components/schemas/Drill" }, { "type": "null" } + ] + }, + "evidence_metric_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Evidence Metric Ids" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind", + "is_tentative", + "metric_id", + "group", + "display_name", + "rating", + "rating_label", + "coach_message", + "practice_feel", + "drill", + "evidence_metric_ids" + ], + "title": "PitchFocus" + }, + "PitchGroupReport": { + "properties": { + "group": { + "type": "string", + "enum": [ + "gather", + "stride_plant", + "rotation_release", + "release_finish" ], - "title": "Height Cm" + "title": "Group" }, - "weight_kg": { + "display_name": { + "type": "string", + "title": "Display Name" + }, + "score": { "anyOf": [ { - "type": "number", - "maximum": 200.0, - "minimum": 20.0 + "type": "integer" }, { "type": "null" } ], - "title": "Weight Kg" + "title": "Score" }, - "bats": { + "score_is_tentative": { + "type": "boolean", + "title": "Score Is Tentative" + }, + "rating": { + "type": "string", + "enum": [ + "on_target", + "satisfactory", + "off_target", + "not_rated" + ], + "title": "Rating" + }, + "rating_label": { + "type": "string", + "title": "Rating Label" + }, + "not_rated_reason": { "anyOf": [ { - "type": "string", - "enum": [ - "L", - "R", - "S" - ] + "type": "string" }, { "type": "null" } ], - "title": "Bats" + "title": "Not Rated Reason" }, - "throws": { + "summary": { + "type": "string", + "title": "Summary" + }, + "metric_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Metric Ids" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "group", + "display_name", + "score", + "score_is_tentative", + "rating", + "rating_label", + "not_rated_reason", + "summary", + "metric_ids" + ], + "title": "PitchGroupReport" + }, + "PitchMarksIn": { + "properties": { + "leg_lift_frame": { "anyOf": [ { - "type": "string", - "enum": [ - "L", - "R" - ] + "type": "integer", + "minimum": 0.0 }, { "type": "null" } ], - "title": "Throws" + "title": "Leg Lift Frame" }, - "level": { + "foot_strike_frame": { "anyOf": [ { - "type": "string", - "enum": [ - "youth", - "high_school", - "college", - "adult" - ] + "type": "integer", + "minimum": 0.0 }, { "type": "null" } ], - "title": "Level" + "title": "Foot Strike Frame" + }, + "release_frame": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Release Frame" } }, "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" + "title": "PitchMarksIn" }, - "QueueItem": { + "PitchMeasurementReport": { "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "owner_id": { + "metric_id": { "type": "string", - "format": "uuid", - "title": "Owner Id" + "title": "Metric Id" }, - "mode": { + "display_name": { "type": "string", - "title": "Mode" - }, - "is_self": { - "type": "boolean", - "title": "Is Self" + "title": "Display Name" }, - "athlete_name": { + "group": { "type": "string", - "title": "Athlete Name" + "enum": [ + "gather", + "stride_plant", + "rotation_release", + "release_finish" + ], + "title": "Group" }, "status": { "type": "string", + "enum": [ + "available", + "limited", + "unavailable" + ], "title": "Status" }, - "overall_score": { + "value": { "anyOf": [ { - "type": "integer" + "type": "number" }, { "type": "null" } ], - "title": "Overall Score" + "title": "Value" }, - "overall_score_is_tentative": { - "type": "boolean", - "title": "Overall Score Is Tentative" + "unit": { + "type": "string", + "title": "Unit" }, - "focus": { + "display_value": { "anyOf": [ { - "$ref": "#/components/schemas/FocusSummary" + "type": "string" }, { "type": "null" } - ] + ], + "title": "Display Value" }, - "review": { + "score": { "anyOf": [ { - "$ref": "#/components/schemas/ReviewSummary" + "type": "integer" }, { "type": "null" } - ] + ], + "title": "Score" }, - "thumbnail_url": { + "rating": { + "type": "string", + "enum": [ + "on_target", + "satisfactory", + "off_target", + "not_rated" + ], + "title": "Rating" + }, + "rating_label": { + "type": "string", + "title": "Rating Label" + }, + "rating_is_tentative": { + "type": "boolean", + "title": "Rating Is Tentative" + }, + "not_rated_reason": { "anyOf": [ { "type": "string" @@ -11700,275 +11883,305 @@ "type": "null" } ], - "title": "Thumbnail Url" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" + "title": "Not Rated Reason" }, - "owner_name": { - "type": "string", - "title": "Owner Name" - } - }, - "type": "object", - "required": [ - "id", - "owner_id", - "mode", - "is_self", - "athlete_name", - "status", - "overall_score", - "overall_score_is_tentative", - "focus", - "review", - "thumbnail_url", - "created_at", - "owner_name" - ], - "title": "QueueItem" - }, - "QueueResponse": { - "properties": { - "open": { - "items": { - "$ref": "#/components/schemas/QueueItem" - }, - "type": "array", - "title": "Open" + "benchmark": { + "anyOf": [ + { + "$ref": "#/components/schemas/BenchmarkOut" + }, + { + "type": "null" + } + ] }, - "reviewed_today": { + "what_it_means": { + "type": "string", + "title": "What It Means" + }, + "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/QueueItem" + "$ref": "#/components/schemas/Limitation" }, "type": "array", - "title": "Reviewed Today" - } - }, - "type": "object", - "required": [ - "open", - "reviewed_today" - ], - "title": "QueueResponse" - }, - "ReadAllIn": { - "properties": { - "through": { + "title": "Limitations" + }, + "value_interval": { "anyOf": [ { - "type": "string", - "format": "date-time" + "$ref": "#/components/schemas/Interval" }, { "type": "null" } - ], - "title": "Through" - } - }, - "additionalProperties": false, - "type": "object", - "title": "ReadAllIn" - }, - "ReadIn": { - "properties": { - "last_message_id": { + ] + }, + "score_interval": { "anyOf": [ { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/Interval" }, { "type": "null" } - ], - "title": "Last Message Id" + ] } }, "additionalProperties": false, "type": "object", - "title": "ReadIn" + "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": "PitchMeasurementReport" }, - "ReceiptIn": { + "PitchReport": { "properties": { - "platform": { + "schema_version": { "type": "string", - "enum": [ - "ios", - "android" - ], - "title": "Platform" + "const": "1.0", + "title": "Schema Version" }, - "product_id": { + "analysis_id": { "type": "string", - "maxLength": 64, - "minLength": 1, - "title": "Product Id" + "title": "Analysis Id" }, - "signed_transaction": { + "analysis_revision": { + "type": "integer", + "title": "Analysis Revision" + }, + "overall_score": { "anyOf": [ { - "type": "string", - "maxLength": 32000 + "type": "integer" }, { "type": "null" } ], - "title": "Signed Transaction" + "title": "Overall Score" }, - "purchase_token": { + "overall_score_is_tentative": { + "type": "boolean", + "title": "Overall Score Is Tentative" + }, + "overview": { + "$ref": "#/components/schemas/Overview" + }, + "groups": { + "items": { + "$ref": "#/components/schemas/PitchGroupReport" + }, + "type": "array", + "title": "Groups" + }, + "focus_area": { "anyOf": [ { - "type": "string", - "maxLength": 4096 + "$ref": "#/components/schemas/PitchFocus" }, { "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": { + ] + }, + "measurements": { "items": { - "type": "integer" + "$ref": "#/components/schemas/PitchMeasurementReport" }, "type": "array", - "title": "H", - "default": [] + "title": "Measurements" }, - "p": { + "data_quality": { "items": { - "type": "integer" + "$ref": "#/components/schemas/DataQualityNote" }, "type": "array", - "title": "P", - "default": [] - } - }, - "type": "object", - "title": "RecentByMode" - }, - "RefreshIn": { - "properties": { - "refresh_token": { + "title": "Data Quality" + }, + "meta": { + "$ref": "#/components/schemas/ReportMeta" + }, + "discipline": { "type": "string", - "maxLength": 256, - "minLength": 1, - "title": "Refresh Token" + "const": "pitching", + "title": "Discipline" } }, "additionalProperties": false, "type": "object", "required": [ - "refresh_token" + "schema_version", + "analysis_id", + "analysis_revision", + "overall_score", + "overall_score_is_tentative", + "overview", + "groups", + "focus_area", + "measurements", + "data_quality", + "meta", + "discipline" ], - "title": "RefreshIn" + "title": "PitchReport" }, - "RegisterIn": { + "PitcherDirection": { "properties": { - "email": { - "type": "string", - "maxLength": 254, - "title": "Email" + "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" }, - "password": { - "type": "string", - "maxLength": 128, - "minLength": 8, - "title": "Password" - }, - "role": { - "type": "string", - "enum": [ - "player", - "coach" + "to": { + "prefixItems": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + } ], - "title": "Role" + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "To" } }, "additionalProperties": false, "type": "object", "required": [ - "email", - "password", - "role" + "from", + "to" ], - "title": "RegisterIn" + "title": "PitcherDirection" }, - "ReportMeta": { - "additionalProperties": false, + "PreviousOut": { "properties": { - "generated_at": { - "title": "Generated At", - "type": "string" + "id": { + "type": "string", + "format": "uuid", + "title": "Id" }, - "request_id": { + "overall_score": { "anyOf": [ { - "type": "string" + "type": "integer" }, { "type": "null" } ], - "title": "Request Id" + "title": "Overall Score" }, - "text_source": { - "enum": [ - "llm", - "rules", - "mixed" - ], - "title": "Text Source", - "type": "string" + "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" }, - "model": { + "age": { "anyOf": [ { - "type": "string" + "type": "integer" }, { "type": "null" } ], - "title": "Model" + "title": "Age" }, - "prompt_version": { - "title": "Prompt Version", - "type": "string" + "height_cm": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Height Cm" }, - "cache_hit": { - "title": "Cache Hit", - "type": "boolean" + "weight_kg": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Weight Kg" }, - "fallback_reason": { + "bats": { "anyOf": [ { "type": "string" @@ -11977,229 +12190,237 @@ "type": "null" } ], - "title": "Fallback Reason" - }, - "input_schema_version": { - "title": "Input Schema Version", - "type": "string" - }, - "measurement_definitions_version": { - "title": "Measurement Definitions Version", - "type": "string" + "title": "Bats" }, - "benchmark_registry_version": { - "title": "Benchmark Registry Version", - "type": "string" + "throws": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Throws" }, - "coaching_rules_version": { - "title": "Coaching Rules Version", - "type": "string" + "level": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Level" } }, + "type": "object", "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" + "name", + "age", + "height_cm", + "weight_kg", + "bats", + "throws", + "level" ], - "title": "ReportMeta", - "type": "object" + "title": "ProfileOut" }, - "RequestOut": { + "ProfileUpdate": { "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "user_id": { - "type": "string", - "format": "uuid", - "title": "User Id" - }, "name": { - "type": "string", + "anyOf": [ + { + "type": "string", + "maxLength": 80 + }, + { + "type": "null" + } + ], "title": "Name" }, - "code": { - "type": "string", - "title": "Code" - }, - "at": { - "type": "string", - "format": "date-time", - "title": "At" - }, - "also_player": { - "type": "boolean", - "title": "Also Player" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "approved", - "declined" + "age": { + "anyOf": [ + { + "type": "integer", + "maximum": 70.0, + "minimum": 5.0 + }, + { + "type": "null" + } ], - "title": "Status" - } - }, - "type": "object", - "required": [ - "id", - "user_id", - "name", - "code", - "at", - "also_player", - "status" - ], - "title": "RequestOut" - }, - "RequestPage": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/RequestOut" - }, - "type": "array", - "title": "Items" + "title": "Age" }, - "next_cursor": { + "height_cm": { "anyOf": [ { - "type": "string" + "type": "number", + "maximum": 230.0, + "minimum": 90.0 }, { "type": "null" } ], - "title": "Next Cursor" + "title": "Height Cm" }, - "total_pending": { - "type": "integer", - "title": "Total Pending" - } - }, + "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", - "required": [ - "items", - "total_pending" - ], - "title": "RequestPage" + "title": "ProfileUpdate" }, - "ResetPasswordIn": { + "PubSubMessage": { "properties": { - "token": { - "type": "string", - "maxLength": 256, - "minLength": 1, - "title": "Token" - }, - "password": { + "data": { "type": "string", - "maxLength": 128, - "minLength": 8, - "title": "Password" + "maxLength": 100000, + "title": "Data", + "default": "" + } + }, + "type": "object", + "title": "PubSubMessage" + }, + "PubSubPushIn": { + "properties": { + "message": { + "$ref": "#/components/schemas/PubSubMessage" } }, - "additionalProperties": false, "type": "object", "required": [ - "token", - "password" + "message" ], - "title": "ResetPasswordIn" + "title": "PubSubPushIn" }, - "ReviewMessageOut": { + "QueueItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, - "author_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "type": "null" - } - ], - "title": "Author Id" - }, - "from": { + "owner_id": { "type": "string", - "enum": [ - "player", - "coach" - ], - "title": "From" + "format": "uuid", + "title": "Owner Id" }, - "at": { + "mode": { "type": "string", - "format": "date-time", - "title": "At" + "title": "Mode" }, - "kind": { + "is_self": { + "type": "boolean", + "title": "Is Self" + }, + "athlete_name": { "type": "string", - "const": "review", - "title": "Kind", - "default": "review" + "title": "Athlete Name" }, - "cue": { + "status": { "type": "string", - "title": "Cue" + "title": "Status" }, - "voice_seconds": { + "overall_score": { "anyOf": [ { - "type": "number" + "type": "integer" }, { "type": "null" } ], - "title": "Voice Seconds" + "title": "Overall Score" }, - "audio": { + "overall_score_is_tentative": { + "type": "boolean", + "title": "Overall Score Is Tentative" + }, + "focus": { "anyOf": [ { - "$ref": "#/components/schemas/MediaRef" + "$ref": "#/components/schemas/FocusSummary" }, { "type": "null" } ] }, - "findings": { - "items": { - "$ref": "#/components/schemas/Finding" - }, - "type": "array", - "title": "Findings" - }, - "drill_id": { + "review": { "anyOf": [ { - "type": "string" + "$ref": "#/components/schemas/ReviewSummary" }, { "type": "null" } - ], - "title": "Drill Id" + ] }, - "drill_name": { + "thumbnail_url": { "anyOf": [ { "type": "string" @@ -12208,39 +12429,82 @@ "type": "null" } ], - "title": "Drill Name" + "title": "Thumbnail Url" }, - "assignment_id": { + "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", + "overall_score_is_tentative", + "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" + }, + "ReadAllIn": { + "properties": { + "through": { "anyOf": [ { "type": "string", - "format": "uuid" + "format": "date-time" }, { "type": "null" } ], - "title": "Assignment Id" + "title": "Through" } }, + "additionalProperties": false, "type": "object", - "required": [ - "id", - "author_id", - "from", - "at", - "cue", - "voice_seconds", - "audio", - "findings", - "drill_id", - "drill_name" - ], - "title": "ReviewMessageOut" + "title": "ReadAllIn" }, - "ReviewOut": { + "ReadIn": { "properties": { - "coach_id": { + "last_message_id": { "anyOf": [ { "type": "string", @@ -12250,232 +12514,171 @@ "type": "null" } ], - "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" - }, - "voice_note": { - "anyOf": [ - { - "$ref": "#/components/schemas/MediaRef" - }, - { - "type": "null" - } - ] + "title": "Last Message Id" } }, + "additionalProperties": false, "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)." + "title": "ReadIn" }, - "ReviewSubmit": { + "ReceiptIn": { "properties": { - "cue": { + "platform": { "type": "string", - "maxLength": 200, - "minLength": 1, - "title": "Cue" + "enum": [ + "ios", + "android" + ], + "title": "Platform" }, - "drill_id": { + "product_id": { "type": "string", - "maxLength": 16, + "maxLength": 64, "minLength": 1, - "title": "Drill Id" - }, - "verdicts": { - "additionalProperties": { - "type": "string", - "enum": [ - "agree", - "change", - "later" - ] - }, - "type": "object", - "title": "Verdicts", - "default": {} + "title": "Product Id" }, - "voice_note_upload_id": { + "signed_transaction": { "anyOf": [ { "type": "string", - "format": "uuid" + "maxLength": 32000 }, { "type": "null" } ], - "title": "Voice Note Upload Id" + "title": "Signed Transaction" }, - "voice_note_seconds": { + "purchase_token": { "anyOf": [ { - "type": "number", - "maximum": 120.0, - "exclusiveMinimum": 0.0 + "type": "string", + "maxLength": 4096 }, { "type": "null" } ], - "title": "Voice Note Seconds" + "title": "Purchase Token" } }, "additionalProperties": false, "type": "object", "required": [ - "cue", - "drill_id" + "platform", + "product_id" ], - "title": "ReviewSubmit", - "description": "Voice fields: omitted keeps the prior attachment, explicit null removes it (see model_fields_set)." + "title": "ReceiptIn" }, - "ReviewSubmitted": { + "ReceiptOut": { "properties": { - "review": { - "$ref": "#/components/schemas/ReviewOut" - }, - "thread_id": { - "type": "string", - "format": "uuid", - "title": "Thread Id" + "entitlement": { + "$ref": "#/components/schemas/Entitlement" } }, "type": "object", "required": [ - "review", - "thread_id" + "entitlement" ], - "title": "ReviewSubmitted" + "title": "ReceiptOut" }, - "ReviewSummary": { + "RecentByMode": { "properties": { - "coach_name": { - "type": "string", - "title": "Coach Name" + "h": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "H", + "default": [] }, - "at": { - "type": "string", - "format": "date-time", - "title": "At" + "p": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "P", + "default": [] } }, "type": "object", - "required": [ - "coach_name", - "at" - ], - "title": "ReviewSummary" + "title": "RecentByMode" }, - "RosterAddIn": { + "RefreshIn": { "properties": { - "player_ids": { - "items": { - "type": "string", - "format": "uuid" - }, - "type": "array", - "maxItems": 100, - "minItems": 1, - "title": "Player Ids" - }, - "group_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "type": "null" - } - ], - "title": "Group Id" + "refresh_token": { + "type": "string", + "maxLength": 256, + "minLength": 1, + "title": "Refresh Token" } }, "additionalProperties": false, "type": "object", "required": [ - "player_ids" + "refresh_token" ], - "title": "RosterAddIn" + "title": "RefreshIn" }, - "RosterAddOut": { + "RegisterIn": { "properties": { - "added_player_ids": { - "items": { - "type": "string", - "format": "uuid" - }, - "type": "array", - "title": "Added Player Ids" + "email": { + "type": "string", + "maxLength": 254, + "title": "Email" }, - "already_present_player_ids": { - "items": { - "type": "string", - "format": "uuid" - }, - "type": "array", - "title": "Already Present Player Ids" + "password": { + "type": "string", + "maxLength": 128, + "minLength": 8, + "title": "Password" + }, + "role": { + "type": "string", + "enum": [ + "player", + "coach" + ], + "title": "Role" } }, + "additionalProperties": false, "type": "object", "required": [ - "added_player_ids", - "already_present_player_ids" + "email", + "password", + "role" ], - "title": "RosterAddOut" + "title": "RegisterIn" }, - "RosterItem": { + "ReportMeta": { + "additionalProperties": false, "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" + "generated_at": { + "title": "Generated At", + "type": "string" }, - "email": { - "type": "string", - "title": "Email" + "request_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Request Id" }, - "focus": { - "type": "string", - "title": "Focus" + "text_source": { + "enum": [ + "llm", + "rules", + "mixed" + ], + "title": "Text Source", + "type": "string" }, - "level": { + "model": { "anyOf": [ { "type": "string" @@ -12484,105 +12687,177 @@ "type": "null" } ], - "title": "Level" + "title": "Model" }, - "group_ids": { - "items": { - "type": "string", - "format": "uuid" + "prompt_version": { + "title": "Prompt Version", + "type": "string" + }, + "cache_hit": { + "title": "Cache Hit", + "type": "boolean" + }, + "fallback_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Fallback Reason" + }, + "text_rejections": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" }, - "type": "array", - "title": "Group Ids", - "default": [] + "title": "Text Rejections", + "type": "object" }, - "pending_count": { - "type": "integer", - "title": "Pending Count" + "input_schema_version": { + "title": "Input Schema Version", + "type": "string" }, - "last": { - "$ref": "#/components/schemas/LastByMode" + "measurement_definitions_version": { + "title": "Measurement Definitions Version", + "type": "string" }, - "recent": { - "$ref": "#/components/schemas/RecentByMode" + "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" + }, + "RequestOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "user_id": { + "type": "string", + "format": "uuid", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "code": { + "type": "string", + "title": "Code" + }, + "at": { + "type": "string", + "format": "date-time", + "title": "At" + }, + "also_player": { + "type": "boolean", + "title": "Also Player" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "approved", + "declined" + ], + "title": "Status" } }, "type": "object", "required": [ "id", + "user_id", "name", - "email", - "focus", - "level", - "pending_count", - "last", - "recent" + "code", + "at", + "also_player", + "status" ], - "title": "RosterItem", - "description": "A player as the coach sees them. Never carries body data (age, height, weight)." + "title": "RequestOut" }, - "SendResult": { + "RequestPage": { "properties": { - "message": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextMessageOut" - }, - { - "$ref": "#/components/schemas/VoiceMessageOut" - }, + "items": { + "items": { + "$ref": "#/components/schemas/RequestOut" + }, + "type": "array", + "title": "Items" + }, + "next_cursor": { + "anyOf": [ { - "$ref": "#/components/schemas/SessionMessageOut" + "type": "string" }, { - "$ref": "#/components/schemas/ReviewMessageOut" - } - ], - "title": "Message", - "discriminator": { - "propertyName": "kind", - "mapping": { - "review": "#/components/schemas/ReviewMessageOut", - "session": "#/components/schemas/SessionMessageOut", - "text": "#/components/schemas/TextMessageOut", - "voice": "#/components/schemas/VoiceMessageOut" + "type": "null" } - } - }, - "thread_status": { - "type": "string", - "enum": [ - "waiting_for_coach", - "reviewed" ], - "title": "Thread Status" + "title": "Next Cursor" }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" + "total_pending": { + "type": "integer", + "title": "Total Pending" } }, "type": "object", "required": [ - "message", - "thread_status", - "updated_at" + "items", + "total_pending" ], - "title": "SendResult" + "title": "RequestPage" }, - "SessionEnvelope": { + "ResetPasswordIn": { "properties": { - "session": { - "$ref": "#/components/schemas/SessionOut" + "token": { + "type": "string", + "maxLength": 256, + "minLength": 1, + "title": "Token" + }, + "password": { + "type": "string", + "maxLength": 128, + "minLength": 8, + "title": "Password" } }, + "additionalProperties": false, "type": "object", "required": [ - "session" + "token", + "password" ], - "title": "SessionEnvelope" + "title": "ResetPasswordIn" }, - "SessionMessageOut": { + "ReviewMessageOut": { "properties": { "id": { "type": "string", @@ -12616,23 +12891,43 @@ }, "kind": { "type": "string", - "const": "session", + "const": "review", "title": "Kind", - "default": "session" + "default": "review" }, - "session_id": { + "cue": { + "type": "string", + "title": "Cue" + }, + "voice_seconds": { "anyOf": [ { - "type": "string", - "format": "uuid" + "type": "number" }, { "type": "null" } ], - "title": "Session Id" + "title": "Voice Seconds" }, - "label": { + "audio": { + "anyOf": [ + { + "$ref": "#/components/schemas/MediaRef" + }, + { + "type": "null" + } + ] + }, + "findings": { + "items": { + "$ref": "#/components/schemas/Finding" + }, + "type": "array", + "title": "Findings" + }, + "drill_id": { "anyOf": [ { "type": "string" @@ -12641,18 +12936,30 @@ "type": "null" } ], - "title": "Label" + "title": "Drill Id" }, - "score": { + "drill_name": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Score" + "title": "Drill Name" + }, + "assignment_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Assignment Id" } }, "type": "object", @@ -12661,379 +12968,253 @@ "author_id", "from", "at", - "session_id", - "label", - "score" + "cue", + "voice_seconds", + "audio", + "findings", + "drill_id", + "drill_name" ], - "title": "SessionMessageOut" + "title": "ReviewMessageOut" }, - "SessionOut": { + "ReviewOut": { "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": { + "coach_id": { "anyOf": [ { "type": "string", - "format": "date-time" + "format": "uuid" }, { "type": "null" } ], - "title": "Analyzed At" + "title": "Coach Id" }, - "athlete": { - "additionalProperties": true, - "type": "object", - "title": "Athlete" + "coach_name": { + "type": "string", + "title": "Coach Name" }, - "duration_sec": { - "type": "number", - "title": "Duration Sec" + "cue": { + "type": "string", + "title": "Cue" }, - "fps": { - "type": "integer", - "title": "Fps" + "drill_id": { + "type": "string", + "title": "Drill Id" }, - "marks": { - "additionalProperties": true, + "verdicts": { + "additionalProperties": { + "type": "string" + }, "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" - } - ] + "title": "Verdicts" }, - "media": { - "$ref": "#/components/schemas/MediaOut" + "at": { + "type": "string", + "format": "date-time", + "title": "At" }, - "previous": { + "voice_note": { "anyOf": [ { - "$ref": "#/components/schemas/PreviousOut" + "$ref": "#/components/schemas/MediaRef" }, { "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" + "coach_id", + "coach_name", + "cue", + "drill_id", + "verdicts", + "at" ], - "title": "SessionOut" + "title": "ReviewOut", + "description": "The review shape every endpoint returns (GET /sessions/{id} and POST /sessions/{id}/review)." }, - "SessionSummary": { + "ReviewSubmit": { "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "owner_id": { - "type": "string", - "format": "uuid", - "title": "Owner Id" - }, - "mode": { + "cue": { "type": "string", - "title": "Mode" - }, - "is_self": { - "type": "boolean", - "title": "Is Self" + "maxLength": 200, + "minLength": 1, + "title": "Cue" }, - "athlete_name": { + "drill_id": { "type": "string", - "title": "Athlete Name" + "maxLength": 16, + "minLength": 1, + "title": "Drill Id" }, - "status": { - "type": "string", - "title": "Status" + "verdicts": { + "additionalProperties": { + "type": "string", + "enum": [ + "agree", + "change", + "later" + ] + }, + "type": "object", + "title": "Verdicts", + "default": {} }, - "overall_score": { + "voice_note_upload_id": { "anyOf": [ { - "type": "integer" + "type": "string", + "format": "uuid" }, { "type": "null" } ], - "title": "Overall Score" - }, - "overall_score_is_tentative": { - "type": "boolean", - "title": "Overall Score Is Tentative" - }, - "focus": { - "anyOf": [ - { - "$ref": "#/components/schemas/FocusSummary" - }, - { - "type": "null" - } - ] - }, - "review": { - "anyOf": [ - { - "$ref": "#/components/schemas/ReviewSummary" - }, - { - "type": "null" - } - ] + "title": "Voice Note Upload Id" }, - "thumbnail_url": { + "voice_note_seconds": { "anyOf": [ { - "type": "string" + "type": "number", + "maximum": 120.0, + "exclusiveMinimum": 0.0 }, { "type": "null" } ], - "title": "Thumbnail Url" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" + "title": "Voice Note Seconds" } }, + "additionalProperties": false, "type": "object", "required": [ - "id", - "owner_id", - "mode", - "is_self", - "athlete_name", - "status", - "overall_score", - "overall_score_is_tentative", - "focus", - "review", - "thumbnail_url", - "created_at" + "cue", + "drill_id" ], - "title": "SessionSummary" + "title": "ReviewSubmit", + "description": "Voice fields: omitted keeps the prior attachment, explicit null removes it (see model_fields_set)." }, - "SetIn": { + "ReviewSubmitted": { "properties": { - "set_number": { - "type": "integer", - "minimum": 1.0, - "title": "Set Number" - }, - "reps_done": { - "type": "integer", - "minimum": 1.0, - "title": "Reps Done" + "review": { + "$ref": "#/components/schemas/ReviewOut" }, - "day": { + "thread_id": { "type": "string", - "format": "date", - "title": "Day" + "format": "uuid", + "title": "Thread Id" } }, - "additionalProperties": false, "type": "object", "required": [ - "set_number", - "reps_done", - "day" + "review", + "thread_id" ], - "title": "SetIn" + "title": "ReviewSubmitted" }, - "SetLogOut": { + "ReviewSummary": { "properties": { - "id": { + "coach_name": { "type": "string", - "format": "uuid", - "title": "Id" - }, - "set_number": { - "type": "integer", - "title": "Set Number" - }, - "reps_done": { - "type": "integer", - "title": "Reps Done" + "title": "Coach Name" }, - "day": { + "at": { "type": "string", - "format": "date", - "title": "Day" + "format": "date-time", + "title": "At" } }, "type": "object", "required": [ - "id", - "set_number", - "reps_done", - "day" + "coach_name", + "at" ], - "title": "SetLogOut" + "title": "ReviewSummary" }, - "SetResult": { + "RosterAddIn": { "properties": { - "assignment": { - "$ref": "#/components/schemas/AssignmentOut" + "player_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "maxItems": 100, + "minItems": 1, + "title": "Player Ids" }, - "set_log": { - "$ref": "#/components/schemas/SetLogOut" + "group_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Group Id" } }, + "additionalProperties": false, "type": "object", "required": [ - "assignment", - "set_log" + "player_ids" ], - "title": "SetResult" + "title": "RosterAddIn" }, - "SettingsEnvelope": { + "RosterAddOut": { "properties": { - "settings": { - "$ref": "#/components/schemas/SettingsOut" + "added_player_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "title": "Added Player Ids" + }, + "already_present_player_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "title": "Already Present Player Ids" } }, "type": "object", "required": [ - "settings" + "added_player_ids", + "already_present_player_ids" ], - "title": "SettingsEnvelope" + "title": "RosterAddOut" }, - "SettingsOut": { + "RosterItem": { "properties": { - "coach_can_see_sessions": { - "type": "boolean", - "title": "Coach Can See Sessions" - }, - "share_with_parent": { - "type": "boolean", - "title": "Share With Parent" - }, - "parent_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Email" - }, - "auto_monthly_report": { - "type": "boolean", - "title": "Auto Monthly Report" - }, - "private_links": { - "type": "boolean", - "title": "Private Links" - }, - "clips_as_examples": { - "type": "boolean", - "title": "Clips As Examples" - }, - "help_improve_ai": { - "type": "boolean", - "title": "Help Improve Ai" - }, - "notify_results": { - "type": "boolean", - "title": "Notify Results" - }, - "notify_coach": { - "type": "boolean", - "title": "Notify Coach" + "id": { + "type": "string", + "format": "uuid", + "title": "Id" }, - "notify_drills": { - "type": "boolean", - "title": "Notify Drills" + "name": { + "type": "string", + "title": "Name" }, - "notify_weekly": { - "type": "boolean", - "title": "Notify Weekly" + "email": { + "type": "string", + "title": "Email" }, - "consented_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Consented At" + "focus": { + "type": "string", + "title": "Focus" }, - "consent_version": { + "level": { "anyOf": [ { "type": "string" @@ -13042,375 +13223,335 @@ "type": "null" } ], - "title": "Consent Version" + "title": "Level" }, - "skip_filming_guide": { - "type": "boolean", - "title": "Skip Filming Guide" + "group_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "title": "Group Ids", + "default": [] }, - "version": { + "pending_count": { "type": "integer", - "title": "Version" + "title": "Pending Count" + }, + "last": { + "$ref": "#/components/schemas/LastByMode" + }, + "recent": { + "$ref": "#/components/schemas/RecentByMode" } }, "type": "object", "required": [ - "coach_can_see_sessions", - "share_with_parent", - "parent_email", - "auto_monthly_report", - "private_links", - "clips_as_examples", - "help_improve_ai", - "notify_results", - "notify_coach", - "notify_drills", - "notify_weekly", - "consented_at", - "consent_version", - "skip_filming_guide", - "version" + "id", + "name", + "email", + "focus", + "level", + "pending_count", + "last", + "recent" ], - "title": "SettingsOut" + "title": "RosterItem", + "description": "A player as the coach sees them. Never carries body data (age, height, weight)." }, - "SettingsPatch": { + "SendResult": { "properties": { - "coach_can_see_sessions": { - "anyOf": [ + "message": { + "oneOf": [ { - "type": "boolean" + "$ref": "#/components/schemas/TextMessageOut" }, { - "type": "null" - } - ], - "title": "Coach Can See Sessions" - }, - "share_with_parent": { - "anyOf": [ - { - "type": "boolean" + "$ref": "#/components/schemas/VoiceMessageOut" }, { - "type": "null" - } - ], - "title": "Share With Parent" - }, - "parent_email": { - "anyOf": [ - { - "type": "string", - "maxLength": 254 + "$ref": "#/components/schemas/SessionMessageOut" }, { - "type": "null" + "$ref": "#/components/schemas/ReviewMessageOut" } ], - "title": "Parent Email" - }, - "auto_monthly_report": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" + "title": "Message", + "discriminator": { + "propertyName": "kind", + "mapping": { + "review": "#/components/schemas/ReviewMessageOut", + "session": "#/components/schemas/SessionMessageOut", + "text": "#/components/schemas/TextMessageOut", + "voice": "#/components/schemas/VoiceMessageOut" } + } + }, + "thread_status": { + "type": "string", + "enum": [ + "waiting_for_coach", + "reviewed" ], - "title": "Auto Monthly Report" + "title": "Thread Status" }, - "private_links": { + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "message", + "thread_status", + "updated_at" + ], + "title": "SendResult" + }, + "SessionEnvelope": { + "properties": { + "session": { + "$ref": "#/components/schemas/SessionOut" + } + }, + "type": "object", + "required": [ + "session" + ], + "title": "SessionEnvelope" + }, + "SessionMessageOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "author_id": { "anyOf": [ { - "type": "boolean" + "type": "string", + "format": "uuid" }, { "type": "null" } ], - "title": "Private Links" + "title": "Author Id" }, - "clips_as_examples": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } + "from": { + "type": "string", + "enum": [ + "player", + "coach" ], - "title": "Clips As Examples" + "title": "From" }, - "help_improve_ai": { + "at": { + "type": "string", + "format": "date-time", + "title": "At" + }, + "kind": { + "type": "string", + "const": "session", + "title": "Kind", + "default": "session" + }, + "session_id": { "anyOf": [ { - "type": "boolean" + "type": "string", + "format": "uuid" }, { "type": "null" } ], - "title": "Help Improve Ai" + "title": "Session Id" }, - "notify_results": { + "label": { "anyOf": [ { - "type": "boolean" + "type": "string" }, { "type": "null" } ], - "title": "Notify Results" + "title": "Label" }, - "notify_coach": { + "score": { "anyOf": [ { - "type": "boolean" + "type": "integer" }, { "type": "null" } ], - "title": "Notify Coach" + "title": "Score" + } + }, + "type": "object", + "required": [ + "id", + "author_id", + "from", + "at", + "session_id", + "label", + "score" + ], + "title": "SessionMessageOut" + }, + "SessionOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" }, - "notify_drills": { + "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": "boolean" + "type": "string", + "format": "date-time" }, { "type": "null" } ], - "title": "Notify Drills" + "title": "Analyzed At" }, - "notify_weekly": { + "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": [ { - "type": "boolean" + "$ref": "#/components/schemas/SwingReport" }, { "type": "null" } ], - "title": "Notify Weekly" + "description": "Null while status is pending" }, - "skip_filming_guide": { + "review": { "anyOf": [ { - "type": "boolean" + "$ref": "#/components/schemas/ReviewOut" }, { "type": "null" } - ], - "title": "Skip Filming Guide" + ] }, - "expected_version": { + "media": { + "$ref": "#/components/schemas/MediaOut" + }, + "previous": { "anyOf": [ { - "type": "integer", - "minimum": 1.0 + "$ref": "#/components/schemas/PreviousOut" }, { "type": "null" } - ], - "title": "Expected Version" - } - }, - "additionalProperties": false, - "type": "object", - "title": "SettingsPatch" - }, - "SocialAuthOut": { - "properties": { - "user": { - "$ref": "#/components/schemas/UserOut" - }, - "tokens": { - "$ref": "#/components/schemas/TokensOut" + ] }, - "is_new": { - "type": "boolean", - "title": "Is New" + "ordinal": { + "type": "integer", + "title": "Ordinal" } }, "type": "object", "required": [ - "user", - "tokens", - "is_new" + "id", + "owner_id", + "is_self", + "mode", + "status", + "created_at", + "analyzed_at", + "athlete", + "duration_sec", + "fps", + "marks", + "report", + "review", + "media", + "previous", + "ordinal" ], - "title": "SocialAuthOut" + "title": "SessionOut" }, - "SocialIn": { + "SessionSummary": { "properties": { - "provider": { + "id": { "type": "string", - "enum": [ - "apple", - "google" - ], - "title": "Provider" + "format": "uuid", + "title": "Id" }, - "id_token": { + "owner_id": { "type": "string", - "maxLength": 8192, - "minLength": 1, - "title": "Id Token" + "format": "uuid", + "title": "Owner Id" }, - "role": { + "mode": { "type": "string", - "enum": [ - "player", - "coach" - ], - "title": "Role", - "default": "player" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "provider", - "id_token" - ], - "title": "SocialIn" - }, - "StaffCodeBody": { - "properties": { - "staff_code": { - "$ref": "#/components/schemas/StaffCodeOut" - } - }, - "type": "object", - "required": [ - "staff_code" - ], - "title": "StaffCodeBody" - }, - "StaffCodeCreate": { - "properties": { - "role": { - "type": "string", - "enum": [ - "coach", - "assistant" - ], - "title": "Role" - }, - "expires_days": { - "type": "integer", - "enum": [ - 1, - 7, - 30 - ], - "title": "Expires Days" - }, - "max_uses": { - "type": "integer", - "enum": [ - 1, - 5, - 20 - ], - "title": "Max Uses" - }, - "approval": { - "type": "string", - "enum": [ - "admin", - "auto" - ], - "title": "Approval" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "role", - "expires_days", - "max_uses", - "approval" - ], - "title": "StaffCodeCreate" - }, - "StaffCodeOut": { - "properties": { - "code": { - "type": "string", - "title": "Code" - }, - "role": { - "type": "string", - "enum": [ - "coach", - "assistant" - ], - "title": "Role" - }, - "expires": { - "type": "string", - "format": "date-time", - "title": "Expires" - }, - "uses": { - "type": "integer", - "title": "Uses" + "title": "Mode" }, - "max_uses": { - "type": "integer", - "title": "Max Uses" + "is_self": { + "type": "boolean", + "title": "Is Self" }, - "approval": { + "athlete_name": { "type": "string", - "enum": [ - "admin", - "auto" - ], - "title": "Approval" + "title": "Athlete Name" }, "status": { "type": "string", - "enum": [ - "active", - "expired", - "revoked" - ], "title": "Status" - } - }, - "type": "object", - "required": [ - "code", - "role", - "expires", - "uses", - "max_uses", - "approval", - "status" - ], - "title": "StaffCodeOut" - }, - "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": [ @@ -13424,1037 +13565,2177 @@ "title": "Overall Score" }, "overall_score_is_tentative": { - "title": "Overall Score Is Tentative", - "type": "boolean" - }, - "overview": { - "$ref": "#/components/schemas/Overview" - }, - "groups": { - "items": { - "$ref": "#/components/schemas/GroupReport" - }, - "title": "Groups", - "type": "array" + "type": "boolean", + "title": "Overall Score Is Tentative" }, - "focus_area": { + "focus": { "anyOf": [ { - "$ref": "#/components/schemas/FocusArea" + "$ref": "#/components/schemas/FocusSummary" }, { "type": "null" } ] }, - "measurements": { - "items": { - "$ref": "#/components/schemas/MeasurementReport" - }, - "title": "Measurements", - "type": "array" + "review": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReviewSummary" + }, + { + "type": "null" + } + ] }, - "data_quality": { - "items": { - "$ref": "#/components/schemas/DataQualityNote" - }, - "title": "Data Quality", - "type": "array" + "thumbnail_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Thumbnail Url" }, - "meta": { - "$ref": "#/components/schemas/ReportMeta" + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" } }, + "type": "object", "required": [ - "schema_version", - "analysis_id", - "analysis_revision", + "id", + "owner_id", + "mode", + "is_self", + "athlete_name", + "status", "overall_score", "overall_score_is_tentative", - "overview", - "groups", - "focus_area", - "measurements", - "data_quality", - "meta" + "focus", + "review", + "thumbnail_url", + "created_at" ], - "title": "SwingReport", - "type": "object" + "title": "SessionSummary" }, - "TeamCreate": { + "SetIn": { "properties": { - "name": { - "type": "string", - "maxLength": 60, - "minLength": 2, - "title": "Name" + "set_number": { + "type": "integer", + "minimum": 1.0, + "title": "Set Number" }, - "coach_name": { - "type": "string", - "maxLength": 60, - "minLength": 2, - "title": "Coach Name" + "reps_done": { + "type": "integer", + "minimum": 1.0, + "title": "Reps Done" }, - "coaching": { + "day": { "type": "string", - "enum": [ - "h", - "p", - "both" - ], - "title": "Coaching" + "format": "date", + "title": "Day" } }, "additionalProperties": false, "type": "object", "required": [ - "name", - "coach_name", - "coaching" - ], - "title": "TeamCreate" + "set_number", + "reps_done", + "day" + ], + "title": "SetIn" }, - "TeamOut": { + "SetLogOut": { "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" + "set_number": { + "type": "integer", + "title": "Set Number" }, - "coaching": { - "type": "string", - "title": "Coaching" + "reps_done": { + "type": "integer", + "title": "Reps Done" }, - "created_at": { + "day": { "type": "string", - "format": "date-time", - "title": "Created At" + "format": "date", + "title": "Day" } }, "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" + "set_number", + "reps_done", + "day" ], - "title": "TeamResponse" + "title": "SetLogOut" }, - "TeamSummaryOut": { + "SetResult": { "properties": { - "code": { - "type": "string", - "title": "Code" - }, - "name": { - "type": "string", - "title": "Name" - }, - "coach_name": { - "type": "string", - "title": "Coach Name" + "assignment": { + "$ref": "#/components/schemas/AssignmentOut" }, - "coaching": { - "type": "string", - "title": "Coaching" + "set_log": { + "$ref": "#/components/schemas/SetLogOut" } }, "type": "object", "required": [ - "code", - "name", - "coach_name", - "coaching" + "assignment", + "set_log" ], - "title": "TeamSummaryOut", - "description": "What a player sees before joining: no ids." + "title": "SetResult" }, - "TeamSummaryResponse": { + "SettingsEnvelope": { "properties": { - "team": { - "$ref": "#/components/schemas/TeamSummaryOut" + "settings": { + "$ref": "#/components/schemas/SettingsOut" } }, "type": "object", "required": [ - "team" + "settings" ], - "title": "TeamSummaryResponse" + "title": "SettingsEnvelope" }, - "TextIn": { + "SettingsOut": { "properties": { - "kind": { - "type": "string", - "const": "text", - "title": "Kind" + "coach_can_see_sessions": { + "type": "boolean", + "title": "Coach Can See Sessions" }, - "text": { - "type": "string", - "maxLength": 500, - "minLength": 1, - "title": "Text" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "kind", - "text" - ], - "title": "TextIn" - }, - "TextMessageOut": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" + "share_with_parent": { + "type": "boolean", + "title": "Share With Parent" }, - "author_id": { + "parent_email": { "anyOf": [ { - "type": "string", - "format": "uuid" + "type": "string" }, { "type": "null" } ], - "title": "Author Id" + "title": "Parent Email" }, - "from": { - "type": "string", - "enum": [ - "player", - "coach" - ], - "title": "From" + "auto_monthly_report": { + "type": "boolean", + "title": "Auto Monthly Report" }, - "at": { - "type": "string", - "format": "date-time", - "title": "At" + "private_links": { + "type": "boolean", + "title": "Private Links" }, - "kind": { - "type": "string", - "const": "text", - "title": "Kind", - "default": "text" + "clips_as_examples": { + "type": "boolean", + "title": "Clips As Examples" }, - "text": { - "type": "string", - "title": "Text" - } - }, - "type": "object", - "required": [ - "id", - "author_id", - "from", - "at", - "text" - ], - "title": "TextMessageOut" - }, - "ThreadEnvelope": { - "properties": { - "thread": { - "$ref": "#/components/schemas/ThreadOut" - } - }, - "type": "object", - "required": [ - "thread" - ], - "title": "ThreadEnvelope" - }, - "ThreadOut": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" + "help_improve_ai": { + "type": "boolean", + "title": "Help Improve Ai" }, - "mode": { - "type": "string", - "enum": [ - "h", - "p" - ], - "title": "Mode" + "notify_results": { + "type": "boolean", + "title": "Notify Results" }, - "session_id": { + "notify_coach": { + "type": "boolean", + "title": "Notify Coach" + }, + "notify_drills": { + "type": "boolean", + "title": "Notify Drills" + }, + "notify_weekly": { + "type": "boolean", + "title": "Notify Weekly" + }, + "consented_at": { "anyOf": [ { "type": "string", - "format": "uuid" + "format": "date-time" }, { "type": "null" } ], - "title": "Session Id" - }, - "session_label": { - "type": "string", - "title": "Session Label" + "title": "Consented At" }, - "score": { + "consent_version": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Score" + "title": "Consent Version" }, - "tone": { - "type": "string", - "enum": [ - "g", - "y", - "r" - ], - "title": "Tone" + "skip_filming_guide": { + "type": "boolean", + "title": "Skip Filming Guide" }, - "coach_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid" + "version": { + "type": "integer", + "title": "Version" + } + }, + "type": "object", + "required": [ + "coach_can_see_sessions", + "share_with_parent", + "parent_email", + "auto_monthly_report", + "private_links", + "clips_as_examples", + "help_improve_ai", + "notify_results", + "notify_coach", + "notify_drills", + "notify_weekly", + "consented_at", + "consent_version", + "skip_filming_guide", + "version" + ], + "title": "SettingsOut" + }, + "SettingsPatch": { + "properties": { + "coach_can_see_sessions": { + "anyOf": [ + { + "type": "boolean" }, { "type": "null" } ], - "title": "Coach Id" + "title": "Coach Can See Sessions" }, - "coach_name": { - "type": "string", - "title": "Coach Name" + "share_with_parent": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Share With Parent" }, - "player_id": { - "type": "string", - "format": "uuid", - "title": "Player Id" + "parent_email": { + "anyOf": [ + { + "type": "string", + "maxLength": 254 + }, + { + "type": "null" + } + ], + "title": "Parent Email" }, - "player_name": { - "type": "string", - "title": "Player Name" + "auto_monthly_report": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Auto Monthly Report" }, - "status": { - "type": "string", - "enum": [ - "waiting_for_coach", - "reviewed" + "private_links": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "title": "Status" + "title": "Private Links" }, - "unread_for_player": { - "type": "boolean", - "title": "Unread For Player" + "clips_as_examples": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Clips As Examples" }, - "unread_for_coach": { - "type": "boolean", - "title": "Unread For Coach" + "help_improve_ai": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Help Improve Ai" }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" + "notify_results": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Notify Results" }, - "messages": { - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextMessageOut" - }, - { - "$ref": "#/components/schemas/VoiceMessageOut" - }, - { - "$ref": "#/components/schemas/SessionMessageOut" - }, - { - "$ref": "#/components/schemas/ReviewMessageOut" - } - ], - "discriminator": { - "propertyName": "kind", - "mapping": { - "review": "#/components/schemas/ReviewMessageOut", - "session": "#/components/schemas/SessionMessageOut", - "text": "#/components/schemas/TextMessageOut", - "voice": "#/components/schemas/VoiceMessageOut" - } + "notify_coach": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" } - }, - "type": "array", - "title": "Messages" + ], + "title": "Notify Coach" }, - "next_message_cursor": { + "notify_drills": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } ], - "title": "Next Message Cursor" + "title": "Notify Drills" + }, + "notify_weekly": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Notify Weekly" + }, + "skip_filming_guide": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Skip Filming Guide" + }, + "expected_version": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Expected Version" } }, + "additionalProperties": false, "type": "object", - "required": [ - "id", - "mode", - "session_id", - "session_label", - "score", - "tone", - "coach_id", - "coach_name", - "player_id", - "player_name", - "status", - "unread_for_player", - "unread_for_coach", - "updated_at", - "messages" - ], - "title": "ThreadOut" + "title": "SettingsPatch" }, - "TokensOut": { + "SocialAuthOut": { "properties": { - "access_token": { - "type": "string", - "title": "Access Token" + "user": { + "$ref": "#/components/schemas/UserOut" }, - "refresh_token": { - "type": "string", - "title": "Refresh Token" + "tokens": { + "$ref": "#/components/schemas/TokensOut" }, - "expires_in": { - "type": "integer", - "title": "Expires In" + "is_new": { + "type": "boolean", + "title": "Is New" } }, "type": "object", "required": [ - "access_token", - "refresh_token", - "expires_in" + "user", + "tokens", + "is_new" ], - "title": "TokensOut" + "title": "SocialAuthOut" }, - "UnreadCount": { + "SocialIn": { "properties": { - "count": { - "type": "integer", - "minimum": 0.0, - "title": "Count" - } - }, - "type": "object", - "required": [ - "count" - ], - "title": "UnreadCount" - }, - "UploadIn": { - "properties": { - "kind": { + "provider": { "type": "string", "enum": [ - "video", - "thumbnail", - "audio", - "drill_video" + "apple", + "google" ], - "title": "Kind" + "title": "Provider" }, - "content_type": { + "id_token": { "type": "string", - "maxLength": 40, + "maxLength": 8192, "minLength": 1, - "title": "Content Type" - }, - "size_bytes": { - "type": "integer", - "exclusiveMinimum": 0.0, - "title": "Size Bytes" + "title": "Id Token" }, - "duration_sec": { - "anyOf": [ - { - "type": "number", - "exclusiveMinimum": 0.0 - }, - { - "type": "null" - } + "role": { + "type": "string", + "enum": [ + "player", + "coach" ], - "title": "Duration Sec" + "title": "Role", + "default": "player" } }, "additionalProperties": false, "type": "object", "required": [ - "kind", - "content_type", - "size_bytes" + "provider", + "id_token" ], - "title": "UploadIn" + "title": "SocialIn" }, - "UploadOut": { + "StaffCodeBody": { "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" + "staff_code": { + "$ref": "#/components/schemas/StaffCodeOut" } }, "type": "object", "required": [ - "upload_id", - "url", - "headers", - "expires_at" + "staff_code" ], - "title": "UploadOut" + "title": "StaffCodeBody" }, - "UserBody": { + "StaffCodeCreate": { "properties": { - "user": { - "$ref": "#/components/schemas/UserOut" + "role": { + "type": "string", + "enum": [ + "coach", + "assistant" + ], + "title": "Role" + }, + "expires_days": { + "type": "integer", + "enum": [ + 1, + 7, + 30 + ], + "title": "Expires Days" + }, + "max_uses": { + "type": "integer", + "enum": [ + 1, + 5, + 20 + ], + "title": "Max Uses" + }, + "approval": { + "type": "string", + "enum": [ + "admin", + "auto" + ], + "title": "Approval" } }, + "additionalProperties": false, "type": "object", "required": [ - "user" + "role", + "expires_days", + "max_uses", + "approval" ], - "title": "UserBody" + "title": "StaffCodeCreate" }, - "UserOut": { + "StaffCodeOut": { "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "email": { + "code": { "type": "string", - "title": "Email" + "title": "Code" }, "role": { "type": "string", + "enum": [ + "coach", + "assistant" + ], "title": "Role" }, - "focus": { + "expires": { "type": "string", - "title": "Focus" - }, - "profile": { - "$ref": "#/components/schemas/ProfileOut" + "format": "date-time", + "title": "Expires" }, - "unit": { - "type": "string", - "title": "Unit" + "uses": { + "type": "integer", + "title": "Uses" }, - "private_videos": { - "type": "boolean", - "title": "Private Videos" + "max_uses": { + "type": "integer", + "title": "Max Uses" }, - "team_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + "approval": { + "type": "string", + "enum": [ + "admin", + "auto" ], - "title": "Team Code" + "title": "Approval" }, - "created_at": { + "status": { "type": "string", - "format": "date-time", - "title": "Created At" + "enum": [ + "active", + "expired", + "revoked" + ], + "title": "Status" } }, "type": "object", "required": [ - "id", - "email", + "code", "role", - "focus", - "profile", - "unit", - "private_videos", - "team_code", - "created_at" + "expires", + "uses", + "max_uses", + "approval", + "status" ], - "title": "UserOut" + "title": "StaffCodeOut" }, - "VoiceIn": { + "SwingReport": { + "additionalProperties": false, "properties": { - "kind": { - "type": "string", - "const": "voice", - "title": "Kind" + "schema_version": { + "const": "1.0", + "title": "Schema Version", + "type": "string" }, - "upload_id": { - "type": "string", - "format": "uuid", - "title": "Upload Id" + "analysis_id": { + "title": "Analysis Id", + "type": "string" }, - "seconds": { - "type": "number", - "maximum": 120.0, - "exclusiveMinimum": 0.0, - "title": "Seconds" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "kind", - "upload_id", - "seconds" - ], - "title": "VoiceIn" - }, - "VoiceMessageOut": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" + "analysis_revision": { + "title": "Analysis Revision", + "type": "integer" }, - "author_id": { + "overall_score": { "anyOf": [ { - "type": "string", - "format": "uuid" + "type": "integer" }, { "type": "null" } ], - "title": "Author Id" - }, - "from": { - "type": "string", - "enum": [ - "player", - "coach" - ], - "title": "From" + "title": "Overall Score" }, - "at": { - "type": "string", - "format": "date-time", - "title": "At" + "overall_score_is_tentative": { + "title": "Overall Score Is Tentative", + "type": "boolean" }, - "kind": { - "type": "string", - "const": "voice", - "title": "Kind", - "default": "voice" + "overview": { + "$ref": "#/components/schemas/Overview" }, - "seconds": { - "type": "number", - "title": "Seconds" + "groups": { + "items": { + "$ref": "#/components/schemas/GroupReport" + }, + "title": "Groups", + "type": "array" }, - "audio": { + "focus_area": { "anyOf": [ { - "$ref": "#/components/schemas/MediaRef" + "$ref": "#/components/schemas/FocusArea" }, { "type": "null" } ] - } - }, - "type": "object", - "required": [ - "id", - "author_id", - "from", - "at", - "seconds", - "audio" - ], - "title": "VoiceMessageOut" - }, - "WebhookAck": { - "properties": {}, - "type": "object", - "title": "WebhookAck" - }, - "WeeklyIn": { - "properties": { - "practice_days": { - "type": "integer", - "maximum": 7.0, - "minimum": 1.0, - "title": "Practice Days" }, - "drill_sets": { - "type": "integer", - "maximum": 30.0, - "minimum": 1.0, - "title": "Drill Sets" + "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" } }, - "additionalProperties": false, - "type": "object", "required": [ - "practice_days", - "drill_sets" + "schema_version", + "analysis_id", + "analysis_revision", + "overall_score", + "overall_score_is_tentative", + "overview", + "groups", + "focus_area", + "measurements", + "data_quality", + "meta" ], - "title": "WeeklyIn" + "title": "SwingReport", + "type": "object" }, - "WeeklyOut": { + "TeamCreate": { "properties": { - "practice_days": { - "type": "integer", - "title": "Practice Days" + "name": { + "type": "string", + "maxLength": 60, + "minLength": 2, + "title": "Name" }, - "drill_sets": { - "type": "integer", - "title": "Drill Sets" + "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": [ - "practice_days", - "drill_sets" + "name", + "coach_name", + "coaching" ], - "title": "WeeklyOut" + "title": "TeamCreate" }, - "app__modules__academy_org__schemas__GroupOut": { + "TeamOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, + "code": { + "type": "string", + "title": "Code" + }, "name": { "type": "string", "title": "Name" }, - "focus": { + "coach_id": { "type": "string", - "enum": [ - "Hitting", - "Pitching", - "Both" - ], - "title": "Focus" - }, - "players": { - "type": "integer", - "title": "Players" + "format": "uuid", + "title": "Coach Id" }, - "player_ids": { - "items": { - "type": "string", - "format": "uuid" - }, - "type": "array", - "title": "Player Ids" + "coach_name": { + "type": "string", + "title": "Coach Name" }, - "coaches": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Coaches" + "coaching": { + "type": "string", + "title": "Coaching" }, - "coach_ids": { - "items": { - "type": "string", - "format": "uuid" - }, - "type": "array", - "title": "Coach Ids" + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" } }, "type": "object", "required": [ "id", + "code", "name", - "focus", - "players", - "player_ids", - "coaches", - "coach_ids" + "coach_id", + "coach_name", + "coaching", + "created_at" ], - "title": "GroupOut" + "title": "TeamOut", + "description": "The team shape every endpoint returns (GET /me, team create, lookup and join)." }, - "app__modules__catalog__schemas__GroupOut": { + "TeamResponse": { "properties": { - "group": { - "type": "string", - "title": "Group" - }, - "display_name": { - "type": "string", - "title": "Display Name" + "team": { + "$ref": "#/components/schemas/TeamOut" } }, "type": "object", "required": [ - "group", - "display_name" + "team" ], - "title": "GroupOut" + "title": "TeamResponse" }, - "app__modules__reporting__schemas__ExportOut": { + "TeamSummaryOut": { "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "status": { + "code": { "type": "string", - "title": "Status" + "title": "Code" }, - "url": { + "name": { "type": "string", - "title": "Url" + "title": "Name" }, - "expires_at": { + "coach_name": { "type": "string", - "format": "date-time", - "title": "Expires At" + "title": "Coach Name" }, - "filename": { + "coaching": { "type": "string", - "title": "Filename" + "title": "Coaching" } }, "type": "object", "required": [ - "id", - "status", - "url", - "expires_at", - "filename" + "code", + "name", + "coach_name", + "coaching" ], - "title": "ExportOut" + "title": "TeamSummaryOut", + "description": "What a player sees before joining: no ids." }, - "app__modules__sessions__schemas__SessionIn": { + "TeamSummaryResponse": { "properties": { - "video_upload_id": { - "type": "string", - "format": "uuid", + "team": { + "$ref": "#/components/schemas/TeamSummaryOut" + } + }, + "type": "object", + "required": [ + "team" + ], + "title": "TeamSummaryResponse" + }, + "TextIn": { + "properties": { + "kind": { + "type": "string", + "const": "text", + "title": "Kind" + }, + "text": { + "type": "string", + "maxLength": 500, + "minLength": 1, + "title": "Text" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind", + "text" + ], + "title": "TextIn" + }, + "TextMessageOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "author_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Author Id" + }, + "from": { + "type": "string", + "enum": [ + "player", + "coach" + ], + "title": "From" + }, + "at": { + "type": "string", + "format": "date-time", + "title": "At" + }, + "kind": { + "type": "string", + "const": "text", + "title": "Kind", + "default": "text" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "type": "object", + "required": [ + "id", + "author_id", + "from", + "at", + "text" + ], + "title": "TextMessageOut" + }, + "ThreadEnvelope": { + "properties": { + "thread": { + "$ref": "#/components/schemas/ThreadOut" + } + }, + "type": "object", + "required": [ + "thread" + ], + "title": "ThreadEnvelope" + }, + "ThreadOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "mode": { + "type": "string", + "enum": [ + "h", + "p" + ], + "title": "Mode" + }, + "session_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Session Id" + }, + "session_label": { + "type": "string", + "title": "Session Label" + }, + "score": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Score" + }, + "tone": { + "type": "string", + "enum": [ + "g", + "y", + "r" + ], + "title": "Tone" + }, + "coach_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Coach Id" + }, + "coach_name": { + "type": "string", + "title": "Coach Name" + }, + "player_id": { + "type": "string", + "format": "uuid", + "title": "Player Id" + }, + "player_name": { + "type": "string", + "title": "Player Name" + }, + "status": { + "type": "string", + "enum": [ + "waiting_for_coach", + "reviewed" + ], + "title": "Status" + }, + "unread_for_player": { + "type": "boolean", + "title": "Unread For Player" + }, + "unread_for_coach": { + "type": "boolean", + "title": "Unread For Coach" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "messages": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextMessageOut" + }, + { + "$ref": "#/components/schemas/VoiceMessageOut" + }, + { + "$ref": "#/components/schemas/SessionMessageOut" + }, + { + "$ref": "#/components/schemas/ReviewMessageOut" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "review": "#/components/schemas/ReviewMessageOut", + "session": "#/components/schemas/SessionMessageOut", + "text": "#/components/schemas/TextMessageOut", + "voice": "#/components/schemas/VoiceMessageOut" + } + } + }, + "type": "array", + "title": "Messages" + }, + "next_message_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Message Cursor" + } + }, + "type": "object", + "required": [ + "id", + "mode", + "session_id", + "session_label", + "score", + "tone", + "coach_id", + "coach_name", + "player_id", + "player_name", + "status", + "unread_for_player", + "unread_for_coach", + "updated_at", + "messages" + ], + "title": "ThreadOut" + }, + "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" + }, + "UnreadCount": { + "properties": { + "count": { + "type": "integer", + "minimum": 0.0, + "title": "Count" + } + }, + "type": "object", + "required": [ + "count" + ], + "title": "UnreadCount" + }, + "UploadIn": { + "properties": { + "kind": { + "type": "string", + "enum": [ + "video", + "thumbnail", + "audio", + "drill_video" + ], + "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" + }, + "VoiceIn": { + "properties": { + "kind": { + "type": "string", + "const": "voice", + "title": "Kind" + }, + "upload_id": { + "type": "string", + "format": "uuid", + "title": "Upload Id" + }, + "seconds": { + "type": "number", + "maximum": 120.0, + "exclusiveMinimum": 0.0, + "title": "Seconds" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind", + "upload_id", + "seconds" + ], + "title": "VoiceIn" + }, + "VoiceMessageOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "author_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Author Id" + }, + "from": { + "type": "string", + "enum": [ + "player", + "coach" + ], + "title": "From" + }, + "at": { + "type": "string", + "format": "date-time", + "title": "At" + }, + "kind": { + "type": "string", + "const": "voice", + "title": "Kind", + "default": "voice" + }, + "seconds": { + "type": "number", + "title": "Seconds" + }, + "audio": { + "anyOf": [ + { + "$ref": "#/components/schemas/MediaRef" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "author_id", + "from", + "at", + "seconds", + "audio" + ], + "title": "VoiceMessageOut" + }, + "WebhookAck": { + "properties": {}, + "type": "object", + "title": "WebhookAck" + }, + "WeeklyIn": { + "properties": { + "practice_days": { + "type": "integer", + "maximum": 7.0, + "minimum": 1.0, + "title": "Practice Days" + }, + "drill_sets": { + "type": "integer", + "maximum": 30.0, + "minimum": 1.0, + "title": "Drill Sets" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "practice_days", + "drill_sets" + ], + "title": "WeeklyIn" + }, + "WeeklyOut": { + "properties": { + "practice_days": { + "type": "integer", + "title": "Practice Days" + }, + "drill_sets": { + "type": "integer", + "title": "Drill Sets" + } + }, + "type": "object", + "required": [ + "practice_days", + "drill_sets" + ], + "title": "WeeklyOut" + }, + "app__modules__academy_org__schemas__GroupOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "focus": { + "type": "string", + "enum": [ + "Hitting", + "Pitching", + "Both" + ], + "title": "Focus" + }, + "players": { + "type": "integer", + "title": "Players" + }, + "player_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "title": "Player Ids" + }, + "coaches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Coaches" + }, + "coach_ids": { + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array", + "title": "Coach Ids" + } + }, + "type": "object", + "required": [ + "id", + "name", + "focus", + "players", + "player_ids", + "coaches", + "coach_ids" + ], + "title": "GroupOut" + }, + "app__modules__catalog__schemas__GroupOut": { + "properties": { + "group": { + "type": "string", + "title": "Group" + }, + "display_name": { + "type": "string", + "title": "Display Name" + } + }, + "type": "object", + "required": [ + "group", + "display_name" + ], + "title": "GroupOut" + }, + "app__modules__reporting__schemas__ExportOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "url": { + "type": "string", + "title": "Url" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expires At" + }, + "filename": { + "type": "string", + "title": "Filename" + } + }, + "type": "object", + "required": [ + "id", + "status", + "url", + "expires_at", + "filename" + ], + "title": "ExportOut" + }, + "app__modules__sessions__schemas__SessionIn": { + "properties": { + "video_upload_id": { + "type": "string", + "format": "uuid", "title": "Video Upload Id" }, - "thumbnail_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" + }, + { + "$ref": "#/components/schemas/PitchAthleteIn" + }, + { + "type": "null" + } + ], + "title": "Athlete" + }, + "duration_sec": { + "type": "number", + "exclusiveMinimum": 0.0, + "title": "Duration Sec" + }, + "fps": { + "type": "integer", + "maximum": 240.0, + "minimum": 1.0, + "title": "Fps" + }, + "frame_count": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Frame Count" + }, + "marks": { + "anyOf": [ + { + "$ref": "#/components/schemas/MarksIn" + }, + { + "$ref": "#/components/schemas/PitchMarksIn" + } + ], + "title": "Marks" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "video_upload_id", + "mode", + "is_self", + "duration_sec", + "fps", + "marks" + ], + "title": "SessionIn" + }, + "app__modules__settings__schemas__ExportOut": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "requested_at": { + "type": "string", + "format": "date-time", + "title": "Requested At" + }, + "delivery": { + "type": "string", + "const": "account_email", + "title": "Delivery", + "default": "account_email" + } + }, + "type": "object", + "required": [ + "id", + "status", + "requested_at" + ], + "title": "ExportOut" + }, + "app__modules__threads__schemas__SessionIn": { + "properties": { + "kind": { + "type": "string", + "const": "session", + "title": "Kind" + }, + "session_id": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind", + "session_id" + ], + "title": "SessionIn" + }, + "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" + }, + "follow_through": { + "anyOf": [ + { + "$ref": "#/components/schemas/SwingEvent" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "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", + "torso_inclination_at_stride_start", + "hip_shoulder_separation_at_stride_start", + "pelvis_rotation_to_contact", + "lead_knee_extension_to_contact", + "torso_inclination_at_contact", + "shoulder_rotation_after_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", + "follow_through" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Event Id" + }, + "start_event_id": { "anyOf": [ { - "type": "string", - "format": "uuid" + "enum": [ + "stride_start", + "front_foot_down", + "contact", + "follow_through" + ], + "type": "string" }, { "type": "null" } ], - "title": "Thumbnail Upload Id" + "default": null, + "title": "Start Event Id" }, - "mode": { - "type": "string", + "end_event_id": { + "anyOf": [ + { + "enum": [ + "stride_start", + "front_foot_down", + "contact", + "follow_through" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "End Event Id" + }, + "reference": { "enum": [ - "h", - "p" + "signed_horizontal_shoulder_minus_hip_heading", + "lead_ankle_displacement_relative_to_rear_ankle", + "torso_angle_from_vertical", + "absolute_net_horizontal_rotation", + "change_in_3d_lead_knee_angle" ], - "title": "Mode" + "title": "Reference", + "type": "string" }, - "is_self": { - "type": "boolean", - "title": "Is Self" + "status": { + "enum": [ + "available", + "limited", + "unavailable" + ], + "title": "Status", + "type": "string" }, - "athlete": { + "confidence": { "anyOf": [ { - "$ref": "#/components/schemas/AthleteIn" + "maximum": 1, + "minimum": 0, + "type": "number" }, { "type": "null" } - ] + ], + "title": "Confidence" }, - "duration_sec": { - "type": "number", - "exclusiveMinimum": 0.0, - "title": "Duration Sec" + "uses_interpolated_input": { + "title": "Uses Interpolated Input", + "type": "boolean" }, - "fps": { - "type": "integer", - "maximum": 240.0, - "minimum": 1.0, - "title": "Fps" + "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", + "capture_time_unknown", + "follow_through_not_recorded", + "model_accuracy_unvalidated" + ], + "type": "string" + }, + "title": "Reasons", + "type": "array" }, - "marks": { - "$ref": "#/components/schemas/MarksIn" + "benchmark": { + "anyOf": [ + { + "$ref": "#/components/schemas/ApprovedBenchmark" + }, + { + "type": "null" + } + ] + }, + "value_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/ValueInterval" + }, + { + "type": "null" + } + ], + "default": null } }, - "additionalProperties": false, - "type": "object", "required": [ - "video_upload_id", - "mode", - "is_self", - "duration_sec", - "fps", - "marks" + "metric_id", + "group", + "value", + "unit", + "reference", + "status", + "confidence", + "uses_interpolated_input", + "reasons", + "benchmark" ], - "title": "SessionIn" + "title": "Measurement", + "type": "object" }, - "app__modules__settings__schemas__ExportOut": { + "PitchAnalysisPayload": { + "additionalProperties": false, "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" + "schema_version": { + "const": "pitch-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" + }, + "pitch_id": { + "minLength": 1, + "pattern": "\\S", + "title": "Pitch Id", + "type": "string" }, "status": { - "type": "string", - "title": "Status" + "const": "completed", + "title": "Status", + "type": "string" }, - "requested_at": { - "type": "string", - "format": "date-time", - "title": "Requested At" + "athlete": { + "$ref": "#/components/schemas/PitchAthlete" }, - "delivery": { - "type": "string", - "const": "account_email", - "title": "Delivery", - "default": "account_email" + "context": { + "$ref": "#/components/schemas/PitchContext" + }, + "measurement_definitions_version": { + "const": "pitch-1.0", + "title": "Measurement Definitions Version", + "type": "string" + }, + "events": { + "$ref": "#/components/schemas/PitchEvents" + }, + "measurements": { + "items": { + "$ref": "#/components/schemas/PitchMeasurement" + }, + "minItems": 1, + "title": "Measurements", + "type": "array" } }, - "type": "object", "required": [ - "id", + "schema_version", + "analysis_id", + "analysis_revision", + "pitch_id", "status", - "requested_at" + "athlete", + "context", + "measurement_definitions_version", + "events", + "measurements" ], - "title": "ExportOut" + "title": "PitchAnalysisPayload", + "type": "object" }, - "app__modules__threads__schemas__SessionIn": { - "properties": { - "kind": { - "type": "string", - "const": "session", - "title": "Kind" - }, - "session_id": { - "type": "string", - "format": "uuid", - "title": "Session Id" - } - }, + "PitchAthlete": { "additionalProperties": false, - "type": "object", - "required": [ - "kind", - "session_id" - ], - "title": "SessionIn" - }, - "ErrorResponse": { - "type": "object", - "required": [ - "error" - ], "properties": { - "error": { - "type": "object", - "required": [ - "code", - "message" + "athlete_id": { + "minLength": 1, + "pattern": "\\S", + "title": "Athlete Id", + "type": "string" + }, + "throwing_hand": { + "anyOf": [ + { + "enum": [ + "left", + "right" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Throwing Hand" + }, + "lead_foot": { + "anyOf": [ + { + "enum": [ + "left", + "right" + ], + "type": "string" + }, + { + "type": "null" + } ], - "properties": { - "code": { - "type": "string", - "examples": [ - "VALIDATION", - "NOT_FOUND", - "PLAN_LIMIT" - ] + "title": "Lead Foot" + }, + "age_years": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" }, - "message": { - "type": "string", - "description": "Safe to show in the app" + { + "type": "null" + } + ], + "title": "Age Years" + }, + "height_cm": { + "anyOf": [ + { + "exclusiveMinimum": 0, + "type": "number" }, - "fields": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Field path -> problem, for validation errors" + { + "type": "null" } - } + ], + "title": "Height Cm" } - } + }, + "required": [ + "athlete_id", + "throwing_hand", + "lead_foot", + "age_years", + "height_cm" + ], + "title": "PitchAthlete", + "type": "object" }, - "ApprovedBenchmark": { + "PitchBenchmark": { "additionalProperties": false, "properties": { "benchmark_id": { @@ -14499,7 +15780,7 @@ "unit": { "enum": [ "deg", - "cm" + "pct_height" ], "title": "Unit", "type": "string" @@ -14520,122 +15801,220 @@ "unit", "source_reference" ], - "title": "ApprovedBenchmark", + "title": "PitchBenchmark", "type": "object" }, - "Athlete": { + "PitchContext": { "additionalProperties": false, "properties": { - "athlete_id": { - "minLength": 1, - "pattern": "\\S", - "title": "Athlete Id", + "sport": { + "const": "baseball", + "title": "Sport", "type": "string" }, - "batting_hand": { + "practice_type": { + "enum": [ + "bullpen", + "flat_ground", + "game", + "live_bp", + "long_toss", + "dry_drill", + "towel_drill", + "unknown" + ], + "title": "Practice Type", + "type": "string" + }, + "delivery": { + "enum": [ + "windup", + "stretch", + "unknown" + ], + "title": "Delivery", + "type": "string" + }, + "pitch_type": { + "enum": [ + "fastball", + "changeup", + "breaking", + "unknown" + ], + "title": "Pitch Type", + "type": "string" + }, + "camera_view": { + "enum": [ + "open_side", + "behind", + "front", + "unknown" + ], + "title": "Camera View", + "type": "string" + } + }, + "required": [ + "sport", + "practice_type", + "delivery", + "pitch_type", + "camera_view" + ], + "title": "PitchContext", + "type": "object" + }, + "PitchEvent": { + "additionalProperties": false, + "properties": { + "status": { + "enum": [ + "available", + "limited", + "unavailable" + ], + "title": "Status", + "type": "string" + }, + "video_time_s": { "anyOf": [ { - "enum": [ - "left", - "right" - ], - "type": "string" + "type": "number" }, { "type": "null" } ], - "title": "Batting Hand" + "title": "Video Time S" }, - "lead_foot": { + "capture_time_s": { "anyOf": [ { - "enum": [ - "left", - "right" - ], - "type": "string" + "type": "number" }, { "type": "null" } ], - "title": "Lead Foot" + "title": "Capture Time S" }, - "age_years": { + "source": { "anyOf": [ { - "minimum": 0, - "type": "integer" + "enum": [ + "manual_review", + "pose_estimated" + ], + "type": "string" }, { "type": "null" } ], - "title": "Age Years" + "title": "Source" }, - "height_cm": { + "reasons": { + "items": { + "enum": [ + "event_not_detected", + "event_timing_uncertain", + "required_event_unavailable", + "required_event_limited", + "lead_foot_unknown", + "required_landmarks_unusable", + "ground_plane_unknown", + "excessive_interpolation", + "occlusion_unresolved", + "temporal_inconsistency", + "capture_time_unknown", + "model_accuracy_unvalidated", + "release_not_verified", + "pitching_direction_unknown", + "camera_view_unsuitable" + ], + "type": "string" + }, + "title": "Reasons", + "type": "array" + }, + "source_frame_index": { "anyOf": [ { - "exclusiveMinimum": 0, - "type": "number" + "minimum": 0, + "type": "integer" }, { "type": "null" } ], - "title": "Height Cm" + "default": null, + "title": "Source Frame Index" } }, "required": [ - "athlete_id", - "batting_hand", - "lead_foot", - "age_years", - "height_cm" + "status", + "video_time_s", + "capture_time_s", + "source" ], - "title": "Athlete", + "title": "PitchEvent", "type": "object" }, - "Events": { + "PitchEvents": { "additionalProperties": false, "properties": { - "stride_start": { - "$ref": "#/components/schemas/SwingEvent" + "peak_knee_height": { + "anyOf": [ + { + "$ref": "#/components/schemas/PitchEvent" + }, + { + "type": "null" + } + ], + "default": null }, - "front_foot_down": { - "$ref": "#/components/schemas/SwingEvent" + "foot_plant": { + "$ref": "#/components/schemas/PitchEvent" }, - "contact": { - "$ref": "#/components/schemas/SwingEvent" + "ball_release": { + "$ref": "#/components/schemas/PitchEvent" } }, "required": [ - "stride_start", - "front_foot_down", - "contact" + "foot_plant", + "ball_release" ], - "title": "Events", + "title": "PitchEvents", "type": "object" }, - "Measurement": { + "PitchMeasurement": { "additionalProperties": false, "properties": { "metric_id": { "enum": [ - "hip_shoulder_separation_at_foot_down", - "stride_relative_length", - "hip_shoulder_separation_at_contact" + "stride_length_pct_height", + "stride_direction_deg", + "hip_shoulder_separation_at_foot_plant", + "trunk_forward_tilt_at_foot_plant", + "shoulder_abduction_at_foot_plant", + "elbow_flexion_at_foot_plant", + "trunk_forward_tilt_at_release", + "trunk_lateral_tilt_at_release", + "arm_slot_at_release", + "lead_knee_extension_plant_to_release" ], "title": "Metric Id", "type": "string" }, "group": { "enum": [ - "balance_load", - "stride", - "power_move", - "contact_follow_through" + "leg_lift_balance", + "stride_landing", + "arm_action", + "release_finish" ], "title": "Group", "type": "string" @@ -14654,7 +16033,7 @@ "unit": { "enum": [ "deg", - "cm" + "pct_height" ], "title": "Unit", "type": "string" @@ -14663,9 +16042,9 @@ "anyOf": [ { "enum": [ - "stride_start", - "front_foot_down", - "contact" + "peak_knee_height", + "foot_plant", + "ball_release" ], "type": "string" }, @@ -14680,9 +16059,9 @@ "anyOf": [ { "enum": [ - "stride_start", - "front_foot_down", - "contact" + "peak_knee_height", + "foot_plant", + "ball_release" ], "type": "string" }, @@ -14697,9 +16076,9 @@ "anyOf": [ { "enum": [ - "stride_start", - "front_foot_down", - "contact" + "peak_knee_height", + "foot_plant", + "ball_release" ], "type": "string" }, @@ -14712,8 +16091,15 @@ }, "reference": { "enum": [ - "signed_horizontal_shoulder_minus_hip_heading", - "lead_ankle_displacement_relative_to_rear_ankle" + "horizontal_lead_ankle_minus_rear_ankle_over_body_height", + "stride_angle_cross_body_positive", + "pelvis_minus_trunk_rotation_throwing_side", + "trunk_flexion_forward_positive", + "throwing_shoulder_abduction", + "throwing_elbow_flexion", + "trunk_lateral_flexion_glove_side_positive", + "forearm_angle_above_horizontal", + "change_in_3d_lead_knee_angle" ], "title": "Reference", "type": "string" @@ -14747,8 +16133,6 @@ "reasons": { "items": { "enum": [ - "contact_not_verified", - "contact_not_applicable", "event_not_detected", "event_timing_uncertain", "required_event_unavailable", @@ -14756,11 +16140,14 @@ "lead_foot_unknown", "required_landmarks_unusable", "ground_plane_unknown", - "scale_is_model_estimated", - "scale_unknown", "excessive_interpolation", "occlusion_unresolved", - "temporal_inconsistency" + "temporal_inconsistency", + "capture_time_unknown", + "model_accuracy_unvalidated", + "release_not_verified", + "pitching_direction_unknown", + "camera_view_unsuitable" ], "type": "string" }, @@ -14770,12 +16157,23 @@ "benchmark": { "anyOf": [ { - "$ref": "#/components/schemas/ApprovedBenchmark" + "$ref": "#/components/schemas/PitchBenchmark" }, { "type": "null" } ] + }, + "value_interval": { + "anyOf": [ + { + "$ref": "#/components/schemas/ValueInterval" + }, + { + "type": "null" + } + ], + "default": null } }, "required": [ @@ -14790,14 +16188,17 @@ "reasons", "benchmark" ], - "title": "Measurement", + "title": "PitchMeasurement", "type": "object" }, "SwingAnalysisPayload": { "additionalProperties": false, "properties": { "schema_version": { - "const": "1.0", + "enum": [ + "1.0", + "1.1" + ], "title": "Schema Version", "type": "string" }, @@ -14830,7 +16231,10 @@ "$ref": "#/components/schemas/SwingContext" }, "measurement_definitions_version": { - "const": "1.0", + "enum": [ + "1.0", + "1.1" + ], "title": "Measurement Definitions Version", "type": "string" }, @@ -14878,6 +16282,7 @@ "live_pitching", "game", "dry_swing", + "walk_through", "unknown" ], "title": "Practice Type", @@ -14931,7 +16336,8 @@ "enum": [ "manual_review", "pose_estimated", - "bat_ball_detector" + "bat_ball_detector", + "derived_from_contact" ], "type": "string" }, @@ -14957,12 +16363,28 @@ "scale_unknown", "excessive_interpolation", "occlusion_unresolved", - "temporal_inconsistency" + "temporal_inconsistency", + "capture_time_unknown", + "follow_through_not_recorded", + "model_accuracy_unvalidated" ], "type": "string" }, "title": "Reasons", "type": "array" + }, + "source_frame_index": { + "anyOf": [ + { + "minimum": 0, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Source Frame Index" } }, "required": [ @@ -14973,7 +16395,32 @@ ], "title": "SwingEvent", "type": "object" + }, + "ValueInterval": { + "additionalProperties": false, + "properties": { + "lower": { + "title": "Lower", + "type": "number" + }, + "upper": { + "title": "Upper", + "type": "number" + }, + "source": { + "const": "adjacent_event_frames", + "title": "Source", + "type": "string" + } + }, + "required": [ + "lower", + "upper", + "source" + ], + "title": "ValueInterval", + "type": "object" } } } -} \ No newline at end of file +}