{"openapi":"3.1.0","info":{"title":"AMA Rider Portal","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Return a simple health status for uptime monitoring.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Authenticate with email and password.\n\nRate limited to 10 attempts per minute per IP. Accounts lock after\n5 consecutive failed attempts for 15 minutes.","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"Exchange a valid refresh token for a new access/refresh token pair.\n\nThe old refresh token is revoked (rotation).","operationId":"refresh_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/validate-invite":{"post":{"tags":["auth"],"summary":"Validate Invite","description":"Check if an invite token is valid and unused.\n\nReturns 200 if the link may still be used. Returns 400 with a\ndescriptive detail if it is expired, invalid, retired by a newer\nlink, already used, or the account is deactivated.","operationId":"validate_invite_auth_validate_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Validate Invite Auth Validate Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/set-password":{"post":{"tags":["auth"],"summary":"Set Password","description":"Set a password using an invite token.\n\nCalled when a new user clicks their invite link and chooses a\npassword. Returns tokens so the user is immediately logged in.","operationId":"set_password_auth_set_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Change the authenticated user's password.\n\nEnds every session, this one included — if the change was triggered\nby a stolen token, the thief is locked out immediately. The portals\nsign in again with the new password to carry on.","operationId":"change_password_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Request a password reset email.\n\nAlways returns 200 regardless of whether the email exists — prevents\nemail enumeration. If the user exists, generates a reset link (which\nretires earlier ones) and emails it via Resend. Delivery never\nchanges the response, so a send failure cannot leak account\nexistence either.\n\nEvery request is audited server-side (#299): ``password_reset.emailed``\nor ``password_reset.email_failed`` for a sendable account, and\n``password_reset.skipped`` with the reason otherwise, so the office\ncan see why a rider never got the email. \"Reset requested\" is only\nrecorded once Resend accepts the message.","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using a reset token.\n\nVerifies the reset link, sets the new password (ending every other\nsession and retiring the link), and returns auth tokens so the user\nis immediately logged in.","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/config/public/{key}":{"get":{"tags":["config"],"summary":"Get Public Config","description":"Return a single public-readable config value, no auth required.\n\nReturns 404 for any key outside PUBLIC_CONFIG_KEYS so callers cannot\nprobe for the existence of admin-only keys.","operationId":"get_public_config_config_public__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ConfigResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/config":{"get":{"tags":["config"],"summary":"List Config","description":"List all config entries. Admin only.","operationId":"list_config_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ConfigResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["config"],"summary":"Create Config","description":"Create a new config entry. Admin only.","operationId":"create_config_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ConfigResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/config/{key}":{"get":{"tags":["config"],"summary":"Get Config","description":"Get a single config entry by key. Admin only.","operationId":"get_config_config__key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ConfigResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["config"],"summary":"Update Config","description":"Update a config entry's value or description. Admin only.","operationId":"update_config_config__key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ConfigResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me":{"get":{"tags":["users"],"summary":"Get Current User","description":"Get the currently authenticated user's profile with roles.","operationId":"get_current_user_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["users"],"summary":"Update Current User","description":"Update the current user's intake/profile fields.","operationId":"update_current_user_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/me/intake-status":{"get":{"tags":["users"],"summary":"Get Intake Status","description":"Check whether the current user has completed the intake flow.\n\nAn emergency contact is required only of riders with an upcoming\nenrollment. Alumni and riders not yet booked go straight through,\nand are asked the moment an enrollment lands.","operationId":"get_intake_status_users_me_intake_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_IntakeStatusResponse_"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/{target_id}/invite-link":{"post":{"tags":["users"],"summary":"Create User Invite Link","description":"Generate a fresh invite link for manual delivery (text, etc.).\n\nAdmin only. Only valid for users who have not yet set a password —\nactivated accounts use the password-reset flow instead.","operationId":"create_user_invite_link_users__target_id__invite_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/send-invite":{"post":{"tags":["users"],"summary":"Send User Invite Email","description":"Email a fresh invite link to an invite-pending user. Admin only.","operationId":"send_user_invite_email_users__target_id__send_invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/enrollments":{"get":{"tags":["users"],"summary":"Get User Enrollments","description":"List a user's class and tour enrollments. Admin only.","operationId":"get_user_enrollments_users__target_id__enrollments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserEnrollmentsResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/badges":{"get":{"tags":["users"],"summary":"Get User Badges","description":"List all badges earned by a user with award timestamps. Admin only.\n\nReturns badges ordered newest-first so the most recently earned\nbadge appears at the top. Returns an empty list for users who have\nnot earned any badges yet.","operationId":"get_user_badges_users__target_id__badges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserBadgeAwardResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"tags":["users"],"summary":"List Users","description":"List all users with their active role assignments. Admin only.","operationId":"list_users_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserListItem__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["users"],"summary":"Create User","description":"Create a new user, emailing the invite when asked. Admin only.\n\nWhen ``send_invite`` is true the invite email is sent through the\nsame path as the admin send-invite button, and the outcome is\nrecorded both in the audit log and on ``invite_emailed`` so the\ncaller can report what actually happened.\n\nA failed send does not fail the request: the user exists either way,\nand the admin can retry from the user detail screen. Rolling the\ncreation back over an email provider outage would be worse.","operationId":"create_user_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserCreateResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/{target_id}":{"get":{"tags":["users"],"summary":"Get User","description":"Get a user's full detail including roles and coach flag. Admin only.","operationId":"get_user_users__target_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Update User","description":"Update a user's profile fields. Admin only.","operationId":"update_user_users__target_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/reset-password":{"post":{"tags":["users"],"summary":"Admin Reset Password","description":"Email a password reset link to an activated user. Admin only.\n\nThe reset is only recorded once Resend has accepted the message, so\na failed send leaves no trace of a reset nobody received (#183). The\nrider-facing self-service path is POST /auth/forgot-password.","operationId":"admin_reset_password_users__target_id__reset_password_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/reset-to-invited":{"post":{"tags":["users"],"summary":"Reset User To Invited","description":"Send a user back to the Invited state. Admin only.\n\nClears the password and kills every live session, so the account can\nbe onboarded again from the invite link. Unlike a password reset the\nuser loses access immediately, and unlike deactivation the account\nstays usable the moment they accept a fresh invite.\n\nSessions are revoked before the credential is cleared, so a failure\npart-way through denies access rather than leaving a live session on\nan account with no password.","operationId":"reset_user_to_invited_users__target_id__reset_to_invited_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/email":{"patch":{"tags":["users"],"summary":"Change User Email","description":"Change a user's email address. Admin only.","operationId":"change_user_email_users__target_id__email_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEmailUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/deactivate":{"post":{"tags":["users"],"summary":"Deactivate User","description":"Deactivate a user. Admin only.\n\nSets deactivated_at, ends every active role, and revokes all\nrefresh tokens. Reversible via /users/{id}/reactivate.","operationId":"deactivate_user_users__target_id__deactivate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/unlock":{"post":{"tags":["users"],"summary":"Unlock User","description":"Lift a wrong-password lock now instead of waiting it out. Admin only (#325).\n\nClears the lock and the failure count, audited as ``login.unlocked``.\nA lock that has already run out needs nothing, so it is not audited.","operationId":"unlock_user_users__target_id__unlock_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/reactivate":{"post":{"tags":["users"],"summary":"Reactivate User","description":"Reactivate a previously deactivated user. Admin only.\n\nClears deactivated_at. Previously ended role assignments are NOT\nautomatically restored — grant them again explicitly.","operationId":"reactivate_user_users__target_id__reactivate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/roles/{role_name}":{"post":{"tags":["users"],"summary":"Grant Role","description":"Grant a role to a user. Admin only.","operationId":"grant_role_users__target_id__roles__role_name__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"role_name","in":"path","required":true,"schema":{"type":"string","title":"Role Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Revoke Role","description":"Revoke a role from a user. Admin only.","operationId":"revoke_role_users__target_id__roles__role_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"role_name","in":"path","required":true,"schema":{"type":"string","title":"Role Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/garage":{"get":{"tags":["users"],"summary":"Get User Garage","description":"List a user's garage bikes. Admin only.","operationId":"get_user_garage_users__target_id__garage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Add User Bike","description":"Add a bike to a user's garage. Admin only.","operationId":"add_user_bike_users__target_id__garage_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/garage/{bike_id}":{"patch":{"tags":["users"],"summary":"Update User Bike","description":"Update a bike in a user's garage. Admin only.","operationId":"update_user_bike_users__target_id__garage__bike_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Remove User Bike","description":"Remove a bike from a user's garage. Admin only.","operationId":"remove_user_bike_users__target_id__garage__bike_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/agreements":{"get":{"tags":["users"],"summary":"Get User Agreements","description":"List all active agreements with the user's acceptance status. Admin only.","operationId":"get_user_agreements_users__target_id__agreements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserAgreementStatusResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/agreements/{agreement_id}/accept":{"post":{"tags":["users"],"summary":"Admin Accept Agreement","description":"Accept an agreement on behalf of a user. Admin only.","operationId":"admin_accept_agreement_users__target_id__agreements__agreement_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agreement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/agreements/{agreement_id}":{"delete":{"tags":["users"],"summary":"Admin Revoke Agreement","description":"Revoke a user's agreement acceptance. Admin only.","operationId":"admin_revoke_agreement_users__target_id__agreements__agreement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agreement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/rentals":{"get":{"tags":["users"],"summary":"Get User Rentals","description":"List a user's rental history with bike and damage notes. Admin only.\n\nReturns newest-first. Empty for users who have never rented.","operationId":"get_user_rentals_users__target_id__rentals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserRentalSummary__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/medical-summary":{"get":{"tags":["users"],"summary":"Get User Medical Summary","description":"Report whether a user has medical info on file. Admin only.\n\nCarries a count and a last-updated timestamp but no medical detail,\nso an admin screen can flag the record without exposing it.","operationId":"get_user_medical_summary_users__target_id__medical_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_MedicalInfoSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/medical-reveal":{"post":{"tags":["users"],"summary":"Reveal User Medical Info","description":"Return a user's medical detail and record the access. Admin only.\n\nA POST rather than a GET because reading this is an auditable event:\nevery reveal writes a user.medical_info_revealed audit row naming the\nadmin who looked.","operationId":"reveal_user_medical_info_users__target_id__medical_reveal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_MedicalInfo_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/waiver-status":{"get":{"tags":["users"],"summary":"Get User Waiver Status","description":"Report a user's waiver standing from the CRM. Admin only.\n\nThree states matter to staff: signed, sent but not signed, and\nnothing sent at all. The last one is the common failure and is the\nreason this endpoint exists.\n\nA CRM outage returns ``crm_available: false`` rather than an error,\nso the admin screen keeps rendering.","operationId":"get_user_waiver_status_users__target_id__waiver_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_WaiverStatusResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{target_id}/marketing-opt-out":{"patch":{"tags":["users"],"summary":"Set User Marketing Opt Out","description":"Override a user's marketing email preference. Admin only.\n\nFor riders who ask to be removed (or re-added) over the phone. The\naudit row is staged on the same transaction the update commits, so\nthe change and its record land together.","operationId":"set_user_marketing_opt_out_users__target_id__marketing_opt_out_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingOptOutUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserDetailResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs":{"get":{"tags":["jobs"],"summary":"List Jobs","description":"Every background job with its last run and recent history. Admin only.","operationId":"list_jobs_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_JobResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/jobs/{name}/run":{"post":{"tags":["jobs"],"summary":"Run Job Now","description":"Start a job now, in the background. Admin only, audited.","operationId":"run_job_now_jobs__name__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{name}":{"patch":{"tags":["jobs"],"summary":"Update Job","description":"Change how often a job checks, pause it, or edit its timings (#375). Audited.","operationId":"update_job_jobs__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coaches":{"get":{"tags":["coaches"],"summary":"List Coaches","description":"List all coach profiles with their linked user data. Admin only.","operationId":"list_coaches_coaches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_CoachResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["coaches"],"summary":"Create Coach","description":"Create a coach profile for an existing user. Admin only.","operationId":"create_coach_coaches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/coaches/{coach_id}":{"get":{"tags":["coaches"],"summary":"Get Coach","description":"Get a single coach profile by ID. Admin only.","operationId":"get_coach_coaches__coach_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["coaches"],"summary":"Update Coach","description":"Update coach profile fields. Admin only.","operationId":"update_coach_coaches__coach_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coaches"],"summary":"Delete Coach","description":"Delete a coach profile. Does not delete the underlying user. Admin only.","operationId":"delete_coach_coaches__coach_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes":{"get":{"tags":["classes"],"summary":"List Classes","description":"List classes with optional filters. Admin only.","operationId":"list_classes_classes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Type Id"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"}},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|upcoming|past)$","default":"all","title":"Timeframe"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["classes"],"summary":"Create Class","description":"Create a new scheduled class. Admin only.\n\nThe caller supplies local start date/time plus duration in days.\nThe service layer reads the class location's timezone and stores\nUTC-normalized ``starts_at`` / ``ends_at`` timestamps.","operationId":"create_class_classes_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}":{"get":{"tags":["classes"],"summary":"Get Class","description":"Fetch a single class by ID. Admin only.","operationId":"get_class_classes__class_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["classes"],"summary":"Update Class","description":"Update a class. Any scheduling field change recomputes UTC bounds.","operationId":"update_class_classes__class_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["classes"],"summary":"Delete Class","description":"Delete a future class and all of its dependent rows. Admin only.\n\nReturns 409 if the class has already started — past classes are\nhistorical records and must not be removed.","operationId":"delete_class_classes__class_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/coaches":{"get":{"tags":["classes"],"summary":"List Class Coaches","description":"List every coach assigned to a class. Admin only.","operationId":"list_class_coaches_classes__class_id__coaches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassCoachResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["classes"],"summary":"Assign Coach","description":"Assign a coach to a class. Admin only.","operationId":"assign_coach_classes__class_id__coaches_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassCoachCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassCoachResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/coaches/{coach_id}":{"patch":{"tags":["classes"],"summary":"Update Class Coach Assignment","description":"Toggle the ``is_lead`` flag on an existing coach assignment.","operationId":"update_class_coach_assignment_classes__class_id__coaches__coach_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassCoachUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassCoachResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["classes"],"summary":"Remove Class Coach","description":"Remove a coach assignment from a class. Admin only.","operationId":"remove_class_coach_classes__class_id__coaches__coach_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/coaches/{coach_id}/days":{"patch":{"tags":["classes"],"summary":"Set Coach Days","description":"Set which days of a class a coach is coaching (#367). Admin only, audited.","operationId":"set_coach_days_classes__class_id__coaches__coach_id__days_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"coach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Coach Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassCoachDaysUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/warnings":{"get":{"tags":["classes"],"summary":"Class Warnings","description":"Things to fix before the class runs, e.g. phases longer than the class (#368).","operationId":"class_warnings_classes__class_id__warnings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_str__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/enrollments":{"get":{"tags":["classes"],"summary":"List Enrollments","description":"Return every enrollment on a class with student + completion details.","operationId":"list_enrollments_classes__class_id__enrollments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_EnrollmentResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["classes"],"summary":"Enroll Rider","description":"Enroll a user into a class. Admin only.\n\nMaterializes one ``enrollment_completions`` row per milestone on\nthe enrolled class's class type, each with its ``scheduled_for``\ncomputed from the class start and the location timezone. The\ngraduation scheduler will later flip these to completed when their\ntrigger time arrives.","operationId":"enroll_rider_classes__class_id__enrollments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_EnrollmentResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/waiver-status":{"get":{"tags":["classes"],"summary":"List Enrollment Waiver Status","description":"Report the waiver state of every rider on a class roster.\n\nRiders with no contract in the CRM come back as ``missing``, which\nis the state staff most need to see before a weekend.\n\nA CRM outage returns ``crm_available: false`` with an empty roster\nrather than an error, so the roster tab still renders.","operationId":"list_enrollment_waiver_status_classes__class_id__waiver_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RosterWaiverResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/enrollments/{user_id}":{"delete":{"tags":["classes"],"summary":"Unenroll Rider","description":"Remove a user from a class, revoking its awards. Admin only, audited.","operationId":"unenroll_rider_classes__class_id__enrollments__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/enrollments/{user_id}/withdraw":{"post":{"tags":["classes"],"summary":"Withdraw Rider","description":"Withdraw a rider, revoking the class's awards. Admin only, audited (#289).","operationId":"withdraw_rider_classes__class_id__enrollments__user_id__withdraw_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/enrollments/{user_id}/reinstate":{"post":{"tags":["classes"],"summary":"Reinstate Rider","description":"Put a withdrawn rider back on the roster. Admin only, audited (#289).","operationId":"reinstate_rider_classes__class_id__enrollments__user_id__reinstate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/enrollments/{user_id}/completions/{milestone_key}":{"patch":{"tags":["classes"],"summary":"Toggle Completion Exclusion","description":"Toggle a single milestone completion between pending and excluded.\n\nThe coach's \"not completing\" checkbox hits this endpoint. Only rows\ncurrently in ``pending`` or ``excluded`` can be toggled — once the\ngraduation scheduler flips a row to ``completed``, it is historical\nand cannot be un-graduated here.","operationId":"toggle_completion_exclusion_classes__class_id__enrollments__user_id__completions__milestone_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"milestone_key","in":"path","required":true,"schema":{"type":"string","title":"Milestone Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionExclusionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_EnrollmentCompletionItem_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/pre-class-email":{"get":{"tags":["classes"],"summary":"Pre Class Email Status","description":"Who has had which pre-class email and what is missing. Admin only.","operationId":"pre_class_email_status_classes__class_id__pre_class_email_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PreClassEmailStatus_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/pre-class-email/test":{"post":{"tags":["classes"],"summary":"Send Pre Class Email Test","description":"Email one of the pre-class emails to the signed-in admin. Admin only.","operationId":"send_pre_class_email_test_classes__class_id__pre_class_email_test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"week_out","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PreClassTestResult_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/pre-class-email/send":{"post":{"tags":["classes"],"summary":"Send Pre Class Email To Riders","description":"Send one pre-class email to every rider who has not had it. Admin only, audited.","operationId":"send_pre_class_email_to_riders_classes__class_id__pre_class_email_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"week_out","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PreClassSendResult_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/classes/{class_id}/training-roster":{"get":{"tags":["classes"],"summary":"Training Roster Status","description":"Whether the class can be posted to #training and when it last was. Admin only.","operationId":"training_roster_status_classes__class_id__training_roster_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_TrainingRosterStatus_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["classes"],"summary":"Post Training Roster","description":"Post the class and its roster to Slack #training now. Admin only, audited.","operationId":"post_training_roster_classes__class_id__training_roster_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/locations":{"get":{"tags":["locations"],"summary":"List Locations","description":"List all training locations ordered by name.\n\nRead access is granted to admin and rental_staff so the rental portal's\nbike-add form can render a location picker. Mutating endpoints below\nremain admin-only.","operationId":"list_locations_locations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_list_LocationResponse____1"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["locations"],"summary":"Create Location","description":"Create a new training location. Admin only.","operationId":"create_location_locations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_LocationResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/locations/{location_id}":{"get":{"tags":["locations"],"summary":"Get Location","description":"Get a single location by ID. Admin only.","operationId":"get_location_locations__location_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_LocationResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["locations"],"summary":"Update Location","description":"Update location fields. Admin only.","operationId":"update_location_locations__location_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_LocationResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["locations"],"summary":"Delete Location","description":"Delete a location. Fails if classes reference it. Admin only.","operationId":"delete_location_locations__location_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Location Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/partner-deals":{"get":{"tags":["partner-deals"],"summary":"List Partner Deals","description":"List all deals including inactive ones. Admin only.","operationId":"list_partner_deals_partner_deals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_PartnerDealResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["partner-deals"],"summary":"Create Partner Deal","description":"Create a deal. Admin only.","operationId":"create_partner_deal_partner_deals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDealCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PartnerDealResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/partner-deals/{deal_id}":{"patch":{"tags":["partner-deals"],"summary":"Update Partner Deal","description":"Update a deal (including the active toggle). Admin only.","operationId":"update_partner_deal_partner_deals__deal_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDealUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PartnerDealResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["partner-deals"],"summary":"Delete Partner Deal","description":"Delete a deal outright. Admin only.\n\nPrefer the active toggle for expired deals; delete is for mistakes.","operationId":"delete_partner_deal_partner_deals__deal_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/class-types":{"get":{"tags":["class-types"],"summary":"List Class Types","description":"List all class types ordered by sort_order. Admin only.","operationId":"list_class_types_class_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassTypeResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["class-types"],"summary":"Create Class Type","description":"Create a new class type. Admin only.","operationId":"create_class_type_class_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassTypeCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassTypeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/class-types/{class_type_id}":{"get":{"tags":["class-types"],"summary":"Get Class Type","description":"Get a single class type by ID. Admin only.","operationId":"get_class_type_class_types__class_type_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassTypeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["class-types"],"summary":"Update Class Type","description":"Update class type fields. Admin only.","operationId":"update_class_type_class_types__class_type_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassTypeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["class-types"],"summary":"Delete Class Type","description":"Delete a class type. Fails if classes reference it. Admin only.","operationId":"delete_class_type_class_types__class_type_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/class-types/{class_type_id}/milestones":{"get":{"tags":["class-types"],"summary":"List Milestones","description":"List graduation milestones for a class type. Admin only.","operationId":"list_milestones_class_types__class_type_id__milestones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassTypeMilestoneResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["class-types"],"summary":"Create Milestone","description":"Create a graduation milestone template. Admin only.","operationId":"create_milestone_class_types__class_type_id__milestones_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassTypeMilestoneCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassTypeMilestoneResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/class-types/{class_type_id}/milestones/{milestone_id}":{"patch":{"tags":["class-types"],"summary":"Update Milestone","description":"Update a graduation milestone template. Admin only.","operationId":"update_milestone_class_types__class_type_id__milestones__milestone_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Milestone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassTypeMilestoneUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassTypeMilestoneResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["class-types"],"summary":"Delete Milestone","description":"Delete a graduation milestone template. Admin only.","operationId":"delete_milestone_class_types__class_type_id__milestones__milestone_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Milestone Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agreements/pending":{"get":{"tags":["agreements"],"summary":"List Pending Agreements","description":"List required agreements the current user has not yet accepted.","operationId":"list_pending_agreements_agreements_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_AgreementResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/agreements/{agreement_id}/accept":{"post":{"tags":["agreements"],"summary":"Accept Agreement","description":"Record the current user's acceptance of an agreement.","operationId":"accept_agreement_agreements__agreement_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agreement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementAcceptRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_UserAgreementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agreements":{"get":{"tags":["agreements"],"summary":"List Agreements","description":"List all agreements. Admin only.","operationId":"list_agreements_agreements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_AgreementResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["agreements"],"summary":"Create Agreement","description":"Create a new agreement. Admin only.","operationId":"create_agreement_agreements_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_AgreementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/agreements/{agreement_id}":{"get":{"tags":["agreements"],"summary":"Get Agreement","description":"Get a single agreement by ID. Admin only.","operationId":"get_agreement_agreements__agreement_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agreement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_AgreementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agreements"],"summary":"Update Agreement","description":"Update agreement fields. Admin only.","operationId":"update_agreement_agreements__agreement_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agreement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agreement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_AgreementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes":{"get":{"tags":["coach-portal"],"summary":"List My Classes","description":"List classes the authenticated coach is assigned to.\n\nReturns all classes (upcoming and past) ordered by start time.","operationId":"list_my_classes_coach_classes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/coach/calendar":{"get":{"tags":["coach-portal"],"summary":"List Calendar","description":"Every scheduled class, upcoming and past, for the coach calendar.\n\nUnlike ``/classes`` this is not filtered by assignment: the whole team\nworks the same weekends and needs to see the schedule. Rosters and\nrider detail stay behind the assignment check; ``is_assigned`` tells\nthe portal which rows can open them.","operationId":"list_calendar_coach_calendar_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_CoachCalendarEntry__"}}}}},"security":[{"HTTPBearer":[]}]}},"/coach/riders":{"get":{"tags":["coach-portal"],"summary":"Search Riders","description":"Find riders by name or email, on classes that ended or the coach is on.","operationId":"search_riders_coach_riders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_FoundRiderResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/coaches/me":{"post":{"tags":["coach-portal"],"summary":"Sign Up To Coach","description":"Sign the signed-in coach up for a class that has not started. Audited.","operationId":"sign_up_to_coach_coach_classes__class_id__coaches_me_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coach-portal"],"summary":"Drop Out Of Coaching","description":"Take the signed-in coach off a class that has not started. Audited.","operationId":"drop_out_of_coaching_coach_classes__class_id__coaches_me_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/coaches/me/days":{"patch":{"tags":["coach-portal"],"summary":"Set My Coaching Days","description":"Choose which days of a class the signed-in coach will coach (#367). Audited.","operationId":"set_my_coaching_days_coach_classes__class_id__coaches_me_days_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachDaysRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachDaysResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}":{"get":{"tags":["coach-portal"],"summary":"Get My Class","description":"Get detail for a class the coach can open, with attention counts.","operationId":"get_my_class_coach_classes__class_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachClassResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/roster":{"get":{"tags":["coach-portal"],"summary":"Get Class Roster","description":"List enrolled students with their completion status.\n\nWithdrawn riders are left out: coaches see only who is coming (#282).\nOpen to coaches on the class, and to any coach once it has ended.","operationId":"get_class_roster_coach_classes__class_id__roster_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_EnrollmentResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/roster-detail":{"get":{"tags":["coach-portal"],"summary":"Get Class Roster Detail","description":"Rider detail for a class, for coaches on it or any coach once it has ended.\n\nCarries dietary requirements, emergency contact, and medical\ndisclosures plainly. Every coach on the class is authorised to see\nall three, and so is any coach once the class has ended (#381), so\nnothing here sits behind a reveal; the scoping is enforced here\nrather than in the client.\n\nThe admin-facing path keeps its redaction and audited reveal. This is\na separate, class-scoped route and does not weaken it.","operationId":"get_class_roster_detail_coach_classes__class_id__roster_detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachRosterDetail_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/enrollments/{target_user_id}/completions/{milestone_key}":{"patch":{"tags":["coach-portal"],"summary":"Toggle Exclusion","description":"Toggle the exclusion flag on a student's milestone completion.\n\nCoaches use this to mark a student as \"not completing\" a milestone\nbefore the graduation scheduler fires. Only works on pending rows.","operationId":"toggle_exclusion_coach_classes__class_id__enrollments__target_user_id__completions__milestone_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target User Id"}},{"name":"milestone_key","in":"path","required":true,"schema":{"type":"string","title":"Milestone Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionExclusionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_EnrollmentCompletionItem_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/phases/{milestone_key}/advance":{"post":{"tags":["coach-portal"],"summary":"Advance Phase","description":"Mark every pending completion with this milestone_key complete now.\n\nUse this when the class hit the milestone earlier than scheduled —\nthe coach wants drills + badges released immediately rather than at\nthe pre-seeded time. Excluded riders are skipped. Downstream badge\n+ XP awards run through the normal graduation path.","operationId":"advance_phase_coach_classes__class_id__phases__milestone_key__advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"milestone_key","in":"path","required":true,"schema":{"type":"string","title":"Milestone Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PhaseOverrideResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/phases/{milestone_key}/cancel":{"post":{"tags":["coach-portal"],"summary":"Cancel Phase","description":"Mark every pending completion with this milestone_key as excluded.\n\nUse this when a phase will not happen as planned (rain delay, whole\nday scrubbed). Excluded rows never fire the scheduler. Completed\nrows are left alone — this is a before-the-fact veto, not an unwind.","operationId":"cancel_phase_coach_classes__class_id__phases__milestone_key__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"milestone_key","in":"path","required":true,"schema":{"type":"string","title":"Milestone Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseCancelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PhaseOverrideResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/phases/advance":{"post":{"tags":["coach-portal"],"summary":"Advance Phase Batch","description":"Advance a whole phase in one transaction.\n\nA phase is every milestone that fires at the same moment (Sunday's\nLevel II and Explorer, for instance). One call, one graduation tick,\nso a dropped connection at back camp can never leave riders with half\na graduation.","operationId":"advance_phase_batch_coach_classes__class_id__phases_advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PhaseOverrideResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/phases/cancel":{"post":{"tags":["coach-portal"],"summary":"Cancel Phase Batch","description":"Cancel a whole phase in one transaction. See advance_phase_batch.","operationId":"cancel_phase_batch_coach_classes__class_id__phases_cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PhaseOverrideResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/phases/undo":{"post":{"tags":["coach-portal"],"summary":"Undo Phase Batch","description":"Take back a phase that never happened (#314), e.g. a rained-out Sunday.\n\nBadges, XP and drills from the phase are removed for every rider who\ngot them, and riders still pending are excluded so nobody gets it.","operationId":"undo_phase_batch_coach_classes__class_id__phases_undo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PhaseOverrideResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/milestones":{"get":{"tags":["coach-portal"],"summary":"List Class Milestones","description":"The milestone templates behind an assigned class.\n\nGives the coach portal the badge names and firing times it needs to\ngroup milestones into phases, instead of guessing from the timestamps\non individual riders' rows, which drift once a phase is advanced.","operationId":"list_class_milestones_coach_classes__class_id__milestones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassTypeMilestoneResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/enrollments/{rider_user_id}/notes":{"get":{"tags":["coach-portal"],"summary":"List Rider Notes","description":"Every coach's notes on one rider of a class the caller can open.","operationId":"list_rider_notes_coach_classes__class_id__enrollments__rider_user_id__notes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"rider_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rider User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_CoachNoteResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["coach-portal"],"summary":"Create Rider Note","description":"Write a note on a rider, for the team or for the rider.","operationId":"create_rider_note_coach_classes__class_id__enrollments__rider_user_id__notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}},{"name":"rider_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rider User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachNoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachNoteResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/notes/{note_id}":{"patch":{"tags":["coach-portal"],"summary":"Update Rider Note","description":"Edit your own note's text or visibility.","operationId":"update_rider_note_coach_notes__note_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachNoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachNoteResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coach-portal"],"summary":"Delete Rider Note","description":"Delete your own note.","operationId":"delete_rider_note_coach_notes__note_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/classes/{class_id}/posts":{"get":{"tags":["coach-portal"],"summary":"List Class Posts","description":"Posts to a class the caller coaches, newest first.","operationId":"list_class_posts_coach_classes__class_id__posts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_PostResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["coach-portal"],"summary":"Create Class Post","description":"Post to everyone enrolled on a class the caller coaches.","operationId":"create_class_post_coach_classes__class_id__posts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PostResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coach/posts/{post_id}":{"patch":{"tags":["coach-portal"],"summary":"Update Class Post","description":"Edit your own post.","operationId":"update_class_post_coach_posts__post_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PostResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coach-portal"],"summary":"Delete Class Post","description":"Delete your own post.","operationId":"delete_class_post_coach_posts__post_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rider/stats":{"get":{"tags":["rider"],"summary":"Get My Stats","description":"Get the current rider's XP, streak, and practice stats.","operationId":"get_my_stats_rider_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RiderStatsResponse_"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/next-badge":{"get":{"tags":["rider"],"summary":"Get My Next Badge","description":"Return the single closest-to-earn badge with progress, or null.\n\nEvaluates two badge categories in priority order:\n- practice_count: badges tied to practice-session milestones (10, 25, ...).\n- streak_days: the first unearned streak-milestone badge still ahead of the\n  rider's current streak.\n\nThe winning candidate is the one with the smallest distance (target -\ncurrent). Ties break as: practice_count > streak_days.\n\nReturns ``data: null`` when no unearned badge candidates exist.","operationId":"get_my_next_badge_rider_next_badge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_Union_NextBadgeResponse__NoneType__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/path":{"get":{"tags":["rider"],"summary":"Get Rider Path","description":"Return the rider's class path with per-stop milestone status.\n\nWalks every ClassType in sort_order order and computes one of four\nstatuses for each stop:\n\n- ``graduated`` — the rider has a completed EnrollmentCompletion\n  whose milestone_key matches any milestone on this class type.\n- ``enrolled`` — the rider has an active Enrollment in a class of\n  this type, but no graduation yet.\n- ``next-to-book`` — the first un-graduated, un-enrolled stop\n  walking the path in sort_order order.\n- ``future`` — any subsequent un-graduated, un-enrolled stop.\n\n``booking_url`` is populated only for the ``next-to-book`` stop and\nis sourced from the ``booking_urls`` app_config entry (a JSONB dict\nkeyed by class_type_key, with an optional ``_default`` fallback).","operationId":"get_rider_path_rider_path_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_MilestoneStopResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/badges":{"get":{"tags":["rider"],"summary":"Get My Badges","description":"List badges the current rider has earned.","operationId":"get_my_badges_rider_badges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_EarnedBadgeResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/badges/all":{"get":{"tags":["rider"],"summary":"Get My Badges All","description":"Return all badges with the rider's earned/locked status and requirement text.\n\nPowers the Profile credentials wall: earned badges glow, locked badges\nshow what unlocks them. Sorted by (category, name) for stable list output.\nFrontend consumers may want to re-sort earned-first for visual grouping.","operationId":"get_my_badges_all_rider_badges_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_AllBadgeResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/enrollments":{"get":{"tags":["rider"],"summary":"Get My Enrollments","description":"List classes the current rider is enrolled in, with assigned coaches.","operationId":"get_my_enrollments_rider_enrollments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_RiderEnrollmentResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/coach-messages":{"get":{"tags":["rider"],"summary":"Get My Coach Messages","description":"For Home: posts to the rider's current class, and notes to them not yet acknowledged.\n\nPosts show from two weeks before a class starts until a week after it\nends. A note to the rider shows, whatever its class, until they tap\nGot it (#382).","operationId":"get_my_coach_messages_rider_coach_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_CoachMessagesResponse_"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/coach-notes":{"get":{"tags":["rider"],"summary":"Get My Coach Notes","description":"Every note a coach wrote to the rider, on any class, newest first (#382).","operationId":"get_my_coach_notes_rider_coach_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_CoachMessageItem__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/coach-notes/{note_id}/seen":{"post":{"tags":["rider"],"summary":"Acknowledge Coach Note","description":"The rider tapped Got it: the note leaves Home and the coach sees it was read.","operationId":"acknowledge_coach_note_rider_coach_notes__note_id__seen_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rider/waivers":{"get":{"tags":["rider"],"summary":"Get My Waivers","description":"Report which legal documents the CRM holds for the current rider.\n\nAn indicator only: the document type and whether it is signed. The\ndocuments themselves live in the CRM and are never served or linked\nfrom the portal.\n\nA CRM outage returns ``crm_available: false`` with no documents, so\nthe rider screen can stay quiet instead of erroring.","operationId":"get_my_waivers_rider_waivers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_WaiverStatusResponse_"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/garage":{"get":{"tags":["rider"],"summary":"Get My Garage","description":"List bikes in the rider's garage.","operationId":"get_my_garage_rider_garage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_GarageResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["rider"],"summary":"Add Bike","description":"Add a bike to the rider's garage. A retry with the same id returns it (#283).","operationId":"add_bike_rider_garage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GarageCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GarageResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/garage/{bike_id}":{"patch":{"tags":["rider"],"summary":"Update Bike","description":"Update a bike in the rider's garage.","operationId":"update_bike_rider_garage__bike_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GarageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GarageResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["rider"],"summary":"Remove Bike","description":"Remove a bike from the rider's garage.","operationId":"remove_bike_rider_garage__bike_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rider/deals":{"get":{"tags":["rider"],"summary":"Get Deals","description":"List active partner deals.","operationId":"get_deals_rider_deals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_DealResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/coaches":{"get":{"tags":["rider"],"summary":"Get Coaches","description":"List coach profiles visible to riders.","operationId":"get_coaches_rider_coaches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_CoachListResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/weather":{"get":{"tags":["rider"],"summary":"Get Weather","description":"Get current weather at the rider's next class location.\n\nFalls back to the first location in the database if the rider\nhas no upcoming enrollment.","operationId":"get_weather_rider_weather_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_WeatherResponse_"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/locations":{"get":{"tags":["rider"],"summary":"Get Locations","description":"List training locations.","operationId":"get_locations_rider_locations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_list_LocationResponse____2"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/drills":{"get":{"tags":["rider"],"summary":"Get My Drills","description":"List drills visible to the rider.\n\nDrills with no unlock_milestone_key are always visible. Drills tagged\nwith an unlock_milestone_key are only visible once the rider has a\ncompleted enrollment_completion row with that milestone_key on an\nenrollment for the drill's class_type.","operationId":"get_my_drills_rider_drills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_RiderDrillResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rider/practice-logs":{"get":{"tags":["rider"],"summary":"Get My Practice Logs","description":"List the rider's practice log entries.","operationId":"get_my_practice_logs_rider_practice_logs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_PracticeLogResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["rider"],"summary":"Log Practice","description":"Log a practice session for a drill.\n\nA retry with the same id returns the saved log without awarding XP\nagain (#283).","operationId":"log_practice_rider_practice_logs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeLogCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_PracticeLogResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/journal":{"get":{"tags":["rider"],"summary":"Get My Journal","description":"List the rider's journal entries.","operationId":"get_my_journal_rider_journal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_JournalEntryResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["rider"],"summary":"Create Journal Entry","description":"Create a practice journal entry. A retry with the same id returns it (#283).","operationId":"create_journal_entry_rider_journal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_JournalEntryResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rider/gear":{"get":{"tags":["rider"],"summary":"Get My Gear","description":"List gear items with ownership status.\n\nIf class_type_id is provided, shows gear required for that class\ntype with the rider's ownership status. Otherwise shows all gear\ncatalog items.","operationId":"get_my_gear_rider_gear_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_GearItemResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rider/gear/{gear_id}":{"patch":{"tags":["rider"],"summary":"Toggle Gear Ownership","description":"Toggle ownership of a gear item.","operationId":"toggle_gear_ownership_rider_gear__gear_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gear_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Gear Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GearToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GearItemResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badges":{"get":{"tags":["badges"],"summary":"List Badges","description":"List all badges ordered by category then name. Admin only.","operationId":"list_badges_badges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_BadgeResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["badges"],"summary":"Create Badge","description":"Create a new badge. Admin only.","operationId":"create_badge_badges_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/badges/analytics":{"get":{"tags":["badges"],"summary":"Get Badge Award Stats","description":"Return award counts and latest-award timestamps for every badge.\n\nResults are ordered by category then badge name. Badges with zero\nawards are included so the full catalog is always represented.\nAdmin only.","operationId":"get_badge_award_stats_badges_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_BadgeAwardStatsResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/badges/{badge_id}":{"get":{"tags":["badges"],"summary":"Get Badge","description":"Get a single badge by ID. Admin only.","operationId":"get_badge_badges__badge_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Badge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["badges"],"summary":"Update Badge","description":"Update badge fields. Admin only.","operationId":"update_badge_badges__badge_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Badge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["badges"],"summary":"Delete Badge","description":"Delete a badge. Admin only.","operationId":"delete_badge_badges__badge_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Badge Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/badge-rules":{"get":{"tags":["badge-rules"],"summary":"List Badge Rules","description":"List all badge rules. Admin only.","operationId":"list_badge_rules_badge_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_BadgeRuleResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["badge-rules"],"summary":"Create Badge Rule","description":"Create a new badge rule. Admin only.","operationId":"create_badge_rule_badge_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeRuleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/badge-rules/{rule_id}":{"get":{"tags":["badge-rules"],"summary":"Get Badge Rule","description":"Get a single badge rule by ID. Admin only.","operationId":"get_badge_rule_badge_rules__rule_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["badge-rules"],"summary":"Update Badge Rule","description":"Update badge rule fields. Admin only.","operationId":"update_badge_rule_badge_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_BadgeRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["badge-rules"],"summary":"Delete Badge Rule","description":"Delete a badge rule. Admin only.","operationId":"delete_badge_rule_badge_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/xp-rules":{"get":{"tags":["xp-rules"],"summary":"List Xp Rules","description":"List all XP rules. Admin only.","operationId":"list_xp_rules_xp_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_XpRuleResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["xp-rules"],"summary":"Create Xp Rule","description":"Create a new XP rule. Admin only.","operationId":"create_xp_rule_xp_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XpRuleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_XpRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/xp-rules/{rule_id}":{"get":{"tags":["xp-rules"],"summary":"Get Xp Rule","description":"Get a single XP rule by ID. Admin only.","operationId":"get_xp_rule_xp_rules__rule_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_XpRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["xp-rules"],"summary":"Update Xp Rule","description":"Update XP rule fields. Admin only.","operationId":"update_xp_rule_xp_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XpRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_XpRuleResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["xp-rules"],"summary":"Delete Xp Rule","description":"Delete an XP rule. Admin only.","operationId":"delete_xp_rule_xp_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drills":{"get":{"tags":["drills"],"summary":"List Drills","description":"List drills, optionally filtered by class type. Admin only.","operationId":"list_drills_drills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_DrillResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["drills"],"summary":"Create Drill","description":"Create a new drill. Admin only.","operationId":"create_drill_drills_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_DrillResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drills/{drill_id}":{"get":{"tags":["drills"],"summary":"Get Drill","description":"Get a single drill by ID. Admin only.","operationId":"get_drill_drills__drill_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"drill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_DrillResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["drills"],"summary":"Update Drill","description":"Update drill fields. Admin only.","operationId":"update_drill_drills__drill_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"drill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_DrillResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["drills"],"summary":"Delete Drill","description":"Delete a drill. Admin only.","operationId":"delete_drill_drills__drill_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"drill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drill Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gear/catalog":{"get":{"tags":["gear"],"summary":"List Gear Catalog","description":"List all gear catalog items. Admin only.","operationId":"list_gear_catalog_gear_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_GearCatalogResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["gear"],"summary":"Create Gear Item","description":"Create a new gear catalog item. Admin only.","operationId":"create_gear_item_gear_catalog_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GearCatalogCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GearCatalogResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/gear/catalog/{item_id}":{"get":{"tags":["gear"],"summary":"Get Gear Item","description":"Get a single gear catalog item. Admin only.","operationId":"get_gear_item_gear_catalog__item_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GearCatalogResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["gear"],"summary":"Update Gear Item","description":"Update a gear catalog item. Admin only.","operationId":"update_gear_item_gear_catalog__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GearCatalogUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_GearCatalogResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gear"],"summary":"Delete Gear Item","description":"Delete a gear catalog item. Admin only.","operationId":"delete_gear_item_gear_catalog__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gear/requirements/{class_type_id}":{"get":{"tags":["gear"],"summary":"List Class Gear Requirements","description":"List gear requirements for a class type. Admin only.","operationId":"list_class_gear_requirements_gear_requirements__class_type_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_ClassGearRequirementResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["gear"],"summary":"Add Gear Requirement","description":"Add a gear requirement to a class type. Admin only.","operationId":"add_gear_requirement_gear_requirements__class_type_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"class_type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Class Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassGearRequirementCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassGearRequirementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gear/requirements/item/{req_id}":{"patch":{"tags":["gear"],"summary":"Update Gear Requirement","description":"Update a gear requirement. Admin only.","operationId":"update_gear_requirement_gear_requirements_item__req_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassGearRequirementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_ClassGearRequirementResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gear"],"summary":"Delete Gear Requirement","description":"Remove a gear requirement. Admin only.","operationId":"delete_gear_requirement_gear_requirements_item__req_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Req Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uploads/coach-photo":{"post":{"tags":["uploads"],"summary":"Upload Coach Photo","description":"Upload a coach profile photo and return its public URL. Admin only.\n\nThe path is persisted on ``coach.photo_url`` via the coaches API; the\nreturned URL is for immediate display only. Files larger than 5 MB or\nwith a non-image MIME type are rejected before any bytes are written\nto disk.","operationId":"upload_coach_photo_uploads_coach_photo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_coach_photo_uploads_coach_photo_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___1"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/uploads/profile-photo":{"post":{"tags":["uploads"],"summary":"Upload Profile Photo","description":"Upload the current user's profile photo. Any authenticated user.\n\nStores the file via the active storage adapter and persists the\nobject path (not the absolute URL) on ``users.avatar_url``, so the\nstored reference survives a storage backend swap. Returns the\nresolved public URL for immediate display.","operationId":"upload_profile_photo_uploads_profile_photo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_profile_photo_uploads_profile_photo_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___1"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/uploads/legal-url":{"get":{"tags":["uploads"],"summary":"Get Legal Signed Url","description":"Return a short-lived signed URL for a legal/ object. Admin only.\n\nIn production this is a presigned S3 GetObject URL against the private\nbucket, valid for ``SIGNED_URL_TTL_SECONDS``. On the local development\nadapter, which cannot sign, it is the plain media URL and ``signed`` is\nFalse.\n\nArgs:\n    path: The object path within the storage backend, e.g.\n        ``legal/rentals/abc/waiver.pdf``. Must start with ``legal/``.\n\nReturns:\n    A URL the caller can use to fetch the object, when it expires, and\n    whether it is genuinely signed.\n\nRaises:\n    HTTPException 400: If ``path`` does not start with ``legal/``.","operationId":"get_legal_signed_url_uploads_legal_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_SignedUrlResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/qr/pwa.png":{"get":{"tags":["qr"],"summary":"Get Pwa Qr","description":"Return a QR code PNG pointing at the rider PWA.\n\nPublic by design: it encodes nothing but the public PWA URL.\nCached client-side for a day; the URL only changes with a redeploy.","operationId":"get_pwa_qr_qr_pwa_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/analytics/summary":{"get":{"tags":["analytics"],"summary":"Get Summary","description":"Scoreboard KPIs: total users, DAU/WAU/MAU, avg XP, weekly counts.","operationId":"get_summary_admin_analytics_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_str__Any__"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/analytics/active-users":{"get":{"tags":["analytics"],"summary":"Get Active Users","description":"Daily distinct-active-user counts over the last `days` days.","operationId":"get_active_users_admin_analytics_active_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/at-risk":{"get":{"tags":["analytics"],"summary":"Get At Risk","description":"Enrolled riders silent for longer than `days` days.","operationId":"get_at_risk_admin_analytics_at_risk_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":180,"minimum":1,"default":14,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/top-performers":{"get":{"tags":["analytics"],"summary":"Get Top Performers","description":"Top riders ranked by total XP.","operationId":"get_top_performers_admin_analytics_top_performers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/class-funnel":{"get":{"tags":["analytics"],"summary":"Get Class Funnel","description":"Per-class-type completion breakdown by milestone and status.","operationId":"get_class_funnel_admin_analytics_class_funnel_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/analytics/drill-heatmap":{"get":{"tags":["analytics"],"summary":"Get Drill Heatmap","description":"Drill engagement: practice counts and unique users per drill.","operationId":"get_drill_heatmap_admin_analytics_drill_heatmap_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/gear-heatmap":{"get":{"tags":["analytics"],"summary":"Get Gear Heatmap","description":"Gear ownership ranked across the active-user population.","operationId":"get_gear_heatmap_admin_analytics_gear_heatmap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/analytics/badge-velocity":{"get":{"tags":["analytics"],"summary":"Get Badge Velocity","description":"Award counts per badge over a recent window.","operationId":"get_badge_velocity_admin_analytics_badge_velocity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/xp-sources":{"get":{"tags":["analytics"],"summary":"Get Xp Sources","description":"All-time XP totals grouped by trigger type.","operationId":"get_xp_sources_admin_analytics_xp_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/analytics/milestone-pipeline":{"get":{"tags":["analytics"],"summary":"Get Milestone Pipeline","description":"Count of riders who have completed each milestone.","operationId":"get_milestone_pipeline_admin_analytics_milestone_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/analytics/users/{user_id}/snapshot":{"get":{"tags":["analytics"],"summary":"Get User Snapshot","description":"Header numbers for a single user's Activity panel.","operationId":"get_user_snapshot_admin_analytics_users__user_id__snapshot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_str__Any__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/users/{user_id}/xp-curve":{"get":{"tags":["analytics"],"summary":"Get User Xp Curve","description":"Cumulative XP over time for a single user.","operationId":"get_user_xp_curve_admin_analytics_users__user_id__xp_curve_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/users/{user_id}/streak-calendar":{"get":{"tags":["analytics"],"summary":"Get User Streak Calendar","description":"Daily practice counts for a user — drives the streak heatmap.","operationId":"get_user_streak_calendar_admin_analytics_users__user_id__streak_calendar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/users/{user_id}/timeline":{"get":{"tags":["analytics"],"summary":"Get User Timeline","description":"Chronological activity feed for one user.","operationId":"get_user_timeline_admin_analytics_users__user_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_dict_str__Any___"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/fleet":{"get":{"tags":["rental"],"summary":"List Fleet","description":"List fleet bikes with optional filters.\n\nQuery parameters\n----------------\nstatus:\n    Filter by bike status (available, rented, maintenance, retired).\nlocation_id:\n    Filter to bikes at a specific location UUID.\nsearch:\n    Case-insensitive substring match on identifier or model.","operationId":"list_fleet_rental_fleet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"location_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_FleetBikeResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["rental"],"summary":"Create Fleet Bike","description":"Add a bike to the rental fleet.\n\nThe new bike is created with status ``available``.","operationId":"create_fleet_bike_rental_fleet_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetBikeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_FleetBikeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/fleet/{bike_id}":{"patch":{"tags":["rental"],"summary":"Patch Fleet Bike","description":"Update one or more fleet bike fields, including status.\n\nStatus changes are rejected with 409 when the bike has an active rental\n(any rental in status ``out``, ``in``, or ``damage_open``). The bike's\nstatus is managed automatically by the rental lifecycle — staff close\nor cancel the rental first, then status edits are unlocked.\n\nReturns 400 if the provided status value is not in VALID_STATUSES.\nReturns 404 if no bike with the given id exists.","operationId":"patch_fleet_bike_rental_fleet__bike_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetBikeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_FleetBikeResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/fleet/{bike_id}/rental-history":{"get":{"tags":["rental"],"summary":"Get Fleet Bike History","description":"List historical rentals on this bike, newest first.","operationId":"get_fleet_bike_history_rental_fleet__bike_id__rental_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_RentalSummary__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/fleet/{bike_id}/baseline-photos":{"post":{"tags":["rental"],"summary":"Upload Fleet Baseline Photo","description":"Save one baseline photo for a fleet bike, keyed by viewing angle.\n\nPersists the uploaded image under ``fleet/baseline/{bike_id}`` and\nsets ``baseline_photos[key]`` on the bike row to the resulting object\npath. Re-uploading the same key replaces the path; the previous file\nis left in storage (no orphan cleanup yet — acceptable for v1).\n\nArgs:\n    bike_id: UUID of the fleet bike.\n    key: Viewing angle — one of ``front``, ``left``, ``right``, ``rear``.\n    file: The uploaded image file.\n    db: Active async database session.\n\nReturns:\n    An ApiResponse wrapping the resolved URL for immediate display.","operationId":"upload_fleet_baseline_photo_rental_fleet__bike_id__baseline_photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bike_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bike Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","pattern":"^(front|left|right|rear)$","title":"Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_fleet_baseline_photo_rental_fleet__bike_id__baseline_photos_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/waiver-clauses":{"get":{"tags":["rental"],"summary":"List Active Clauses","description":"List currently active waiver clauses, ordered by sort_order.","operationId":"list_active_clauses_rental_waiver_clauses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_WaiverClauseResponse__"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["rental"],"summary":"Create Waiver Clause","description":"Create a new waiver clause at version 1.0.","operationId":"create_waiver_clause_rental_waiver_clauses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaiverClauseCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_WaiverClauseResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/rental/waiver-clauses/all":{"get":{"tags":["rental"],"summary":"List All Clauses","description":"List all clauses including inactive rows (full version history).","operationId":"list_all_clauses_rental_waiver_clauses_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_WaiverClauseResponse__"}}}}},"security":[{"HTTPBearer":[]}]}},"/rental/waiver-clauses/{clause_id}":{"patch":{"tags":["rental"],"summary":"Update Waiver Clause","description":"Edit a clause — deactivates the current row and creates a new version.\n\nReturns 404 if no clause with the given id exists.","operationId":"update_waiver_clause_rental_waiver_clauses__clause_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"clause_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Clause Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaiverClauseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_WaiverClauseResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals":{"get":{"tags":["rental"],"summary":"List Rentals","description":"List rentals with optional filters.\n\nQuery parameters\n----------------\nstatus:\n    Filter by rental status (draft, out, in, damage_open, closed, cancelled).\nsource:\n    Filter by originating channel (website, walk_in, manual).\nsearch:\n    Case-insensitive substring match on renter_full_name.","operationId":"list_rentals_rental_rentals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_RentalResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["rental"],"summary":"Create Rental","description":"Create a new rental draft.\n\nThe new rental is created with status ``draft``. The authenticated\nuser is recorded as the creator.","operationId":"create_rental_rental_rentals_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}":{"get":{"tags":["rental"],"summary":"Get Rental","description":"Fetch a single rental by id.\n\nReturns 404 if no rental with the given id exists.","operationId":"get_rental_rental_rentals__rental_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["rental"],"summary":"Patch Rental","description":"Update fields on a rental draft.\n\nRenter-snapshot edits are rejected with 409 once the rental moves\npast draft status. Returns 404 if no rental with the given id exists.","operationId":"patch_rental_rental_rentals__rental_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/license-photos":{"post":{"tags":["rental"],"summary":"Upload License Photo","description":"Save a driver-license photo and record the object path on the rental.\n\nArgs:\n    rental_id: UUID of the target rental.\n    kind: Which side of the license -- ``front`` or ``back``.\n    file: The uploaded image file.\n    db: The active async database session.\n\nReturns:\n    An ``ApiResponse`` wrapping a signed URL for immediate display.","operationId":"upload_license_photo_rental_rentals__rental_id__license_photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","pattern":"^(front|back)$","title":"Kind"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_license_photo_rental_rentals__rental_id__license_photos_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/photos-out":{"post":{"tags":["rental"],"summary":"Upload Photo Out","description":"Save one pre-departure walk-around photo keyed by position.\n\n``key`` must be one of the allowed position identifiers (e.g. \"front\",\n\"rear\"). Unknown keys are rejected with 400.\n\nArgs:\n    rental_id: UUID of the target rental.\n    key: Walk-around position identifier.\n    file: The uploaded image file.\n    db: The active async database session.\n\nReturns:\n    An ``ApiResponse`` wrapping the stored URL.","operationId":"upload_photo_out_rental_rentals__rental_id__photos_out_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_photo_out_rental_rentals__rental_id__photos_out_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/photos-in":{"post":{"tags":["rental"],"summary":"Upload Photo In","description":"Save one return walk-around photo keyed by position.\n\n``key`` must be one of the allowed position identifiers (e.g. \"front\",\n\"rear\"). Unknown keys are rejected with 400.\n\nArgs:\n    rental_id: UUID of the target rental.\n    key: Walk-around position identifier.\n    file: The uploaded image file.\n    db: The active async database session.\n\nReturns:\n    An ``ApiResponse`` wrapping the stored URL.","operationId":"upload_photo_in_rental_rentals__rental_id__photos_in_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_photo_in_rental_rentals__rental_id__photos_in_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/damage-photos":{"post":{"tags":["rental"],"summary":"Upload Damage Photo","description":"Append a damage-documentation photo to the rental's damage_photos list.\n\nArgs:\n    rental_id: UUID of the target rental.\n    file: The uploaded image file.\n    db: The active async database session.\n\nReturns:\n    An ``ApiResponse`` wrapping a signed URL for immediate display.","operationId":"upload_damage_photo_rental_rentals__rental_id__damage_photos_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_damage_photo_rental_rentals__rental_id__damage_photos_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/signatures":{"post":{"tags":["rental"],"summary":"Capture Signatures","description":"Persist staff and renter e-signatures with capture metadata.\n\nDecodes the base64 PNG data URLs, stores both signature images, and\nrecords the geo-coordinates, client IP, and user-agent on the rental\nrow to satisfy legal audit requirements.\n\nArgs:\n    rental_id: UUID of the target rental.\n    body: Staff and renter signature data URLs plus optional geo-coords.\n    request: The FastAPI request object, used to extract IP and UA.\n    db: The active async database session.\n\nReturns:\n    An ``ApiResponse`` wrapping signed URLs for immediate display plus\n    the capture metadata.","operationId":"capture_signatures_rental_rentals__rental_id__signatures_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_SignatureResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/check-out":{"post":{"tags":["rental"],"summary":"Post Check Out","description":"Finalize the rental wizard — validate, snapshot insurance config, transition draft to out.\n\nReads signature URLs and geo-coordinates previously stored on the rental\nrow by the /signatures endpoint. Reads insurance rate and deductible from\napp_config at the moment of signing so later config changes do not alter\nthe legal record.\n\nSide effect: flips the assigned fleet bike's status to ``rented``.\n\nArgs:\n    rental_id: UUID of the rental to check out.\n    request: The FastAPI request object, used to extract IP and user-agent.\n    user_id: ID of the authenticated staff member performing the checkout.\n    db: Active async database session.\n\nReturns:\n    The updated rental with status=out.\n\nRaises:\n    HTTPException: 400 if required fields are missing; 409 if wrong state.","operationId":"post_check_out_rental_rentals__rental_id__check_out_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/check-in":{"post":{"tags":["rental"],"summary":"Post Check In","description":"Transition a rental from out to in (clean) or damage_open (damage noted).\n\nSide effect: when the rental lands in ``in`` status (no damage), the\nassigned fleet bike's status is flipped back to ``available``. Bikes\nthat land in ``damage_open`` remain ``rented`` until the rental is closed.\n\nArgs:\n    rental_id: UUID of the rental being returned.\n    body: Return inspection details including mileage, fuel, and damage info.\n    db: Active async database session.\n\nReturns:\n    The updated rental with status=in or damage_open.\n\nRaises:\n    HTTPException: 409 if the rental is not currently in out status.","operationId":"post_check_in_rental_rentals__rental_id__check_in_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckInRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/close":{"post":{"tags":["rental"],"summary":"Post Close","description":"Transition a rental from in or damage_open to closed.\n\nArgs:\n    rental_id: UUID of the rental to close.\n    body: Optional resolution notes (e.g., damage repaired, waiver signed).\n    db: Active async database session.\n\nReturns:\n    The updated rental with status=closed.\n\nRaises:\n    HTTPException: 409 if the rental is not in a closeable status.","operationId":"post_close_rental_rentals__rental_id__close_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/cancel":{"post":{"tags":["rental"],"summary":"Post Cancel","description":"Transition a rental from draft or out to cancelled.\n\nArgs:\n    rental_id: UUID of the rental to cancel.\n    body: Cancellation reason stored on the record.\n    db: Active async database session.\n\nReturns:\n    The updated rental with status=cancelled.\n\nRaises:\n    HTTPException: 409 if the rental is not in a cancellable status.","operationId":"post_cancel_rental_rentals__rental_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/packet.pdf":{"get":{"tags":["rental"],"summary":"Get Rental Packet Pdf","description":"Redirect to a short-lived signed URL for the stored packet PDF.\n\nArgs:\n    rental_id: UUID of the rental whose packet to retrieve.\n    db: Active async database session.\n\nReturns:\n    307 redirect to a signed URL resolved from packet_pdf_url.\n\nRaises:\n    HTTPException: 404 if packet_pdf_url is not yet set on the rental.","operationId":"get_rental_packet_pdf_rental_rentals__rental_id__packet_pdf_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/packet/regenerate":{"post":{"tags":["rental"],"summary":"Post Packet Regenerate","description":"Re-render the PDF at the next version and store the path on the rental row.\n\nIncrements the version number extracted from the current packet_pdf_url,\nor starts at v1 if no path exists yet.\n\nArgs:\n    rental_id: UUID of the rental to re-render.\n    db: Active async database session.\n\nReturns:\n    An ApiResponse wrapping a signed URL for immediate display.","operationId":"post_packet_regenerate_rental_rentals__rental_id__packet_regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__response__ApiResponse_UploadResponse___2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/packet/email":{"post":{"tags":["rental"],"summary":"Post Packet Email","description":"Manually re-trigger the signed-packet email.\n\nCalls send_manual_resend which logs the attempt to rental_email_log\nregardless of outcome.\n\nArgs:\n    rental_id: UUID of the rental to email.\n    db: Active async database session.\n\nReturns:\n    An ApiResponse confirming the send was triggered.","operationId":"post_packet_email_rental_rentals__rental_id__packet_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/waivers":{"post":{"tags":["rental"],"summary":"Post Waiver Acceptances","description":"Persist per-clause initials for a rental. Replaces any existing acceptances.\n\nUses a DELETE-then-INSERT pattern so calling this endpoint twice is safe\nand idempotent -- the second call wins (last-write-wins semantics).\n\nArgs:\n    rental_id: UUID of the rental to record acceptances against.\n    body: List of clause acceptances, one per active waiver clause.\n    db: Active async database session.\n\nReturns:\n    An ApiResponse with a count of persisted rows.\n\nRaises:\n    HTTPException: 404 if no rental with the given id exists.","operationId":"post_waiver_acceptances_rental_rentals__rental_id__waivers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaiverAcceptanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_dict_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/users/search":{"get":{"tags":["rental"],"summary":"Search Rental Users","description":"Search active users by name, email, or phone substring.\n\nReturns minimal payload — enough to identify in the dropdown.\nExcludes deactivated users.\n\nArgs:\n    q: Substring to match against first_name, last_name, email, or phone.\n    limit: Maximum number of results to return (1-50, default 10).\n    db: Active async database session.\n\nReturns:\n    An ApiResponse wrapping a list of UserSearchResult hits.","operationId":"search_rental_users_rental_users_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserSearchResult__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/rentals/{rental_id}/link-user":{"post":{"tags":["rental"],"summary":"Link Rental To User","description":"Copy snapshot fields from the selected user onto the rental.\n\nRejected with 409 once the rental's status is non-draft (snapshot\nimmutability — the legal packet is a moment-in-time record).\n\nArgs:\n    rental_id: UUID of the rental to link.\n    body: The user_id to link to this rental.\n    db: Active async database session.\n\nReturns:\n    The updated RentalResponse with user_id and snapshot fields populated.\n\nRaises:\n    HTTPException: 409 if the rental is not in draft status.\n    HTTPException: 404 if the user_id does not match any active user.","operationId":"link_rental_to_user_rental_rentals__rental_id__link_user_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_RentalResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rental/users/{user_id}/enrollments":{"get":{"tags":["rental"],"summary":"Get User Enrollments","description":"Return the user's upcoming and in-progress class enrollments.\n\nFiltered to classes whose ends_at is in the future (so currently\nin-progress and scheduled classes are both included). Ordered by\nclass start date, soonest first. Capped at 10 results.\n\nArgs:\n    user_id: UUID of the user whose enrollments to query.\n    db: Active async database session.\n\nReturns:\n    An ApiResponse wrapping a list of UserEnrollmentItem records.","operationId":"get_user_enrollments_rental_users__user_id__enrollments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_UserEnrollmentItem__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/crm/reconcile":{"post":{"tags":["integrations"],"summary":"Run Crm Reconciliation","description":"Run one CRM reconciliation pass on demand. Admin only.\n\nThe same pass runs on a schedule; this endpoint exists for\n\"I just fixed something in the CRM, converge now\" moments.\nAn email query param scopes the pass to that one customer.","operationId":"run_crm_reconciliation_integrations_crm_reconcile_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Crm Reconciliation Integrations Crm Reconcile Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/crm/pending-provisions":{"get":{"tags":["integrations"],"summary":"List Pending Provisions","description":"List qualifying CRM buyers who have no trailhead account. Admin only.","operationId":"list_pending_provisions_integrations_crm_pending_provisions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Pending Provisions Integrations Crm Pending Provisions Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/integrations/crm/unplaced-bookings":{"get":{"tags":["integrations"],"summary":"List Unplaced Bookings","description":"CRM buyers with an account but no class the sync can put them on.\n\nEach row says why: no date on the deal, a past date outside an alumni\nstage, no class on the date, or two classes on it. Admin only.","operationId":"list_unplaced_bookings_integrations_crm_unplaced_bookings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Unplaced Bookings Integrations Crm Unplaced Bookings Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/integrations/crm/provision":{"post":{"tags":["integrations"],"summary":"Provision Pending Account","description":"Manually provision one pending CRM buyer. Admin only.\n\nFollows the webhook flow — user, enrollment, invite URL — with the\nadmin recorded as the audit actor.","operationId":"provision_pending_account_integrations_crm_provision_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Provision Pending Account Integrations Crm Provision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/crm/provision-all":{"post":{"tags":["integrations"],"summary":"Provision All Pending Accounts","description":"Provision a batch of pending CRM buyers. Admin only.\n\nRuns the per-person flow (user, enrollment, invite email) for up to\n`limit` buyers and reports how many remain. The admin portal loops\nuntil nothing remains, so one click drains the whole pending list.\nRefused unless crm_bulk_provisioning_enabled is switched on.","operationId":"provision_all_pending_accounts_integrations_crm_provision_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Provision All Pending Accounts Integrations Crm Provision All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/crm/booking":{"post":{"tags":["integrations"],"summary":"Crm Booking","description":"Provision a rider from a CRM purchase event.\n\nIdempotent: existing users and enrollments are reused, so the CRM\nmay safely retry or replay events. Always returns a fresh invite\nURL for users who have not yet set a password.","operationId":"crm_booking_integrations_crm_booking_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmBookingEvent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmBookingResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit-events":{"get":{"tags":["audit"],"summary":"List Audit Events","description":"List audit events newest-first, optionally scoped to one subject.","operationId":"list_audit_events_audit_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse_list_AuditEventResponse__"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgreementAcceptRequest":{"properties":{"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}},"type":"object","title":"AgreementAcceptRequest","description":"Schema for accepting an agreement."},"AgreementCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"content":{"type":"string","title":"Content"},"version":{"type":"string","title":"Version"},"required":{"type":"boolean","title":"Required","default":true},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name","type","content","version"],"title":"AgreementCreate","description":"Schema for creating a new agreement."},"AgreementResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"content":{"type":"string","title":"Content"},"version":{"type":"string","title":"Version"},"required":{"type":"boolean","title":"Required"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","type","content","version","required","active","created_at","updated_at"],"title":"AgreementResponse","description":"Schema for an agreement returned to clients."},"AgreementUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"AgreementUpdate","description":"Schema for updating an agreement's editable fields."},"AllBadgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"category":{"type":"string","title":"Category"},"earned":{"type":"boolean","title":"Earned"},"awarded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Awarded At"},"requirement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement"}},"type":"object","required":["id","name","icon","category","earned","awarded_at","requirement"],"title":"AllBadgeResponse","description":"One badge entry on the full credentials wall, earned or locked.\n\nFields:\n    id:          Badge UUID.\n    name:        Display name.\n    icon:        Icon path or URL.\n    category:    Badge category (e.g. \"practice\", \"level\", \"gear\").\n    earned:      True if the rider has been awarded this badge.\n    awarded_at:  Timestamp of award; None when not yet earned.\n    requirement: Human-readable unlock hint for locked badges; None when\n                 earned or when no machine-readable threshold exists."},"ApiResponse_AgreementResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/AgreementResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[AgreementResponse]"},"ApiResponse_BadgeResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/BadgeResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[BadgeResponse]"},"ApiResponse_BadgeRuleResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/BadgeRuleResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[BadgeRuleResponse]"},"ApiResponse_ClassCoachResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ClassCoachResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ClassCoachResponse]"},"ApiResponse_ClassGearRequirementResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ClassGearRequirementResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ClassGearRequirementResponse]"},"ApiResponse_ClassResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ClassResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ClassResponse]"},"ApiResponse_ClassTypeMilestoneResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ClassTypeMilestoneResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ClassTypeMilestoneResponse]"},"ApiResponse_ClassTypeResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ClassTypeResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ClassTypeResponse]"},"ApiResponse_CoachClassResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachClassResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachClassResponse]"},"ApiResponse_CoachDaysResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachDaysResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachDaysResponse]"},"ApiResponse_CoachMessagesResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachMessagesResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachMessagesResponse]"},"ApiResponse_CoachNoteResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachNoteResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachNoteResponse]"},"ApiResponse_CoachResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachResponse]"},"ApiResponse_CoachRosterDetail_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CoachRosterDetail"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[CoachRosterDetail]"},"ApiResponse_ConfigResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/ConfigResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[ConfigResponse]"},"ApiResponse_DrillResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/DrillResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[DrillResponse]"},"ApiResponse_EnrollmentCompletionItem_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentCompletionItem"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[EnrollmentCompletionItem]"},"ApiResponse_EnrollmentResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[EnrollmentResponse]"},"ApiResponse_FleetBikeResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/FleetBikeResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[FleetBikeResponse]"},"ApiResponse_GarageResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/GarageResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[GarageResponse]"},"ApiResponse_GearCatalogResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/GearCatalogResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[GearCatalogResponse]"},"ApiResponse_GearItemResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/GearItemResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[GearItemResponse]"},"ApiResponse_IntakeStatusResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/IntakeStatusResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[IntakeStatusResponse]"},"ApiResponse_JournalEntryResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/JournalEntryResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[JournalEntryResponse]"},"ApiResponse_LocationResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/src__schemas__location__LocationResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[LocationResponse]"},"ApiResponse_MedicalInfoSummary_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/MedicalInfoSummary"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[MedicalInfoSummary]"},"ApiResponse_MedicalInfo_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/MedicalInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[MedicalInfo]"},"ApiResponse_PartnerDealResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PartnerDealResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PartnerDealResponse]"},"ApiResponse_PhaseOverrideResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PhaseOverrideResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PhaseOverrideResponse]"},"ApiResponse_PostResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PostResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PostResponse]"},"ApiResponse_PracticeLogResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PracticeLogResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PracticeLogResponse]"},"ApiResponse_PreClassEmailStatus_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PreClassEmailStatus"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PreClassEmailStatus]"},"ApiResponse_PreClassSendResult_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PreClassSendResult"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PreClassSendResult]"},"ApiResponse_PreClassTestResult_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/PreClassTestResult"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[PreClassTestResult]"},"ApiResponse_RentalResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/RentalResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[RentalResponse]"},"ApiResponse_RiderStatsResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/RiderStatsResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[RiderStatsResponse]"},"ApiResponse_RosterWaiverResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/RosterWaiverResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[RosterWaiverResponse]"},"ApiResponse_SignatureResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/SignatureResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[SignatureResponse]"},"ApiResponse_SignedUrlResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/SignedUrlResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[SignedUrlResponse]"},"ApiResponse_TrainingRosterStatus_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/TrainingRosterStatus"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[TrainingRosterStatus]"},"ApiResponse_Union_NextBadgeResponse__NoneType__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/NextBadgeResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[Union[NextBadgeResponse, NoneType]]"},"ApiResponse_UserAgreementResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserAgreementResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UserAgreementResponse]"},"ApiResponse_UserCreateResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserCreateResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UserCreateResponse]"},"ApiResponse_UserDetailResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserDetailResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UserDetailResponse]"},"ApiResponse_UserEnrollmentsResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserEnrollmentsResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UserEnrollmentsResponse]"},"ApiResponse_UserResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UserResponse]"},"ApiResponse_WaiverClauseResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/WaiverClauseResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[WaiverClauseResponse]"},"ApiResponse_WaiverStatusResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/WaiverStatusResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[WaiverStatusResponse]"},"ApiResponse_WeatherResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/WeatherResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[WeatherResponse]"},"ApiResponse_XpRuleResponse_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/XpRuleResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[XpRuleResponse]"},"ApiResponse_dict_":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[dict]"},"ApiResponse_dict_str__Any__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[dict[str, Any]]"},"ApiResponse_list_AgreementResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgreementResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[AgreementResponse]]"},"ApiResponse_list_AllBadgeResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AllBadgeResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[AllBadgeResponse]]"},"ApiResponse_list_AuditEventResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AuditEventResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[AuditEventResponse]]"},"ApiResponse_list_BadgeAwardStatsResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/BadgeAwardStatsResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[BadgeAwardStatsResponse]]"},"ApiResponse_list_BadgeResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/BadgeResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[BadgeResponse]]"},"ApiResponse_list_BadgeRuleResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/BadgeRuleResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[BadgeRuleResponse]]"},"ApiResponse_list_ClassCoachResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassCoachResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ClassCoachResponse]]"},"ApiResponse_list_ClassGearRequirementResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassGearRequirementResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ClassGearRequirementResponse]]"},"ApiResponse_list_ClassResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ClassResponse]]"},"ApiResponse_list_ClassTypeMilestoneResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassTypeMilestoneResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ClassTypeMilestoneResponse]]"},"ApiResponse_list_ClassTypeResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClassTypeResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ClassTypeResponse]]"},"ApiResponse_list_CoachCalendarEntry__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CoachCalendarEntry"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[CoachCalendarEntry]]"},"ApiResponse_list_CoachListResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CoachListResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[CoachListResponse]]"},"ApiResponse_list_CoachMessageItem__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CoachMessageItem"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[CoachMessageItem]]"},"ApiResponse_list_CoachNoteResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CoachNoteResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[CoachNoteResponse]]"},"ApiResponse_list_CoachResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CoachResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[CoachResponse]]"},"ApiResponse_list_ConfigResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConfigResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[ConfigResponse]]"},"ApiResponse_list_DealResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/DealResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[DealResponse]]"},"ApiResponse_list_DrillResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/DrillResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[DrillResponse]]"},"ApiResponse_list_EarnedBadgeResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/EarnedBadgeResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[EarnedBadgeResponse]]"},"ApiResponse_list_EnrollmentResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/EnrollmentResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[EnrollmentResponse]]"},"ApiResponse_list_FleetBikeResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/FleetBikeResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[FleetBikeResponse]]"},"ApiResponse_list_FoundRiderResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/FoundRiderResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[FoundRiderResponse]]"},"ApiResponse_list_GarageResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/GarageResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[GarageResponse]]"},"ApiResponse_list_GearCatalogResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/GearCatalogResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[GearCatalogResponse]]"},"ApiResponse_list_GearItemResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/GearItemResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[GearItemResponse]]"},"ApiResponse_list_JobResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/JobResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[JobResponse]]"},"ApiResponse_list_JournalEntryResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/JournalEntryResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[JournalEntryResponse]]"},"ApiResponse_list_MilestoneStopResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/MilestoneStopResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[MilestoneStopResponse]]"},"ApiResponse_list_PartnerDealResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PartnerDealResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[PartnerDealResponse]]"},"ApiResponse_list_PostResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PostResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[PostResponse]]"},"ApiResponse_list_PracticeLogResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PracticeLogResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[PracticeLogResponse]]"},"ApiResponse_list_RentalResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/RentalResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[RentalResponse]]"},"ApiResponse_list_RentalSummary__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/RentalSummary"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[RentalSummary]]"},"ApiResponse_list_RiderDrillResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/RiderDrillResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[RiderDrillResponse]]"},"ApiResponse_list_RiderEnrollmentResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/RiderEnrollmentResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[RiderEnrollmentResponse]]"},"ApiResponse_list_UserAgreementStatusResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserAgreementStatusResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserAgreementStatusResponse]]"},"ApiResponse_list_UserBadgeAwardResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserBadgeAwardResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserBadgeAwardResponse]]"},"ApiResponse_list_UserEnrollmentItem__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserEnrollmentItem"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserEnrollmentItem]]"},"ApiResponse_list_UserListItem__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserListItem"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserListItem]]"},"ApiResponse_list_UserRentalSummary__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserRentalSummary"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserRentalSummary]]"},"ApiResponse_list_UserSearchResult__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserSearchResult"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[UserSearchResult]]"},"ApiResponse_list_WaiverClauseResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/WaiverClauseResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[WaiverClauseResponse]]"},"ApiResponse_list_XpRuleResponse__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/XpRuleResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[XpRuleResponse]]"},"ApiResponse_list_dict__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[dict]]"},"ApiResponse_list_dict_str__Any___":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[dict[str, Any]]]"},"ApiResponse_list_str__":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[str]]"},"AuditEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"actor":{"type":"string","title":"Actor"},"action":{"type":"string","title":"Action"},"subject_type":{"type":"string","title":"Subject Type"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["id","occurred_at","actor","action","subject_type","subject_id","details"],"title":"AuditEventResponse","description":"One audit trail entry."},"BadgeAwardStatsResponse":{"properties":{"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"category":{"type":"string","title":"Category"},"total_awards":{"type":"integer","title":"Total Awards"},"last_awarded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Awarded At"}},"type":"object","required":["badge_id","name","icon","category","total_awards","last_awarded_at"],"title":"BadgeAwardStatsResponse","description":"Aggregate award statistics for a single badge.\n\nAttributes:\n    badge_id:        UUID of the badge.\n    name:            Display name of the badge.\n    icon:            Icon path or identifier.\n    category:        Badge category.\n    total_awards:    Total number of times the badge has been awarded.\n    last_awarded_at: Timestamp of the most recent award, or None if never awarded."},"BadgeCreate":{"properties":{"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"}},"type":"object","required":["name","icon","category"],"title":"BadgeCreate","description":"Schema for creating a badge."},"BadgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","icon","description","category","created_at","updated_at"],"title":"BadgeResponse","description":"Schema for badge data returned by the API."},"BadgeRuleCreate":{"properties":{"trigger":{"type":"string","title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["trigger","badge_id"],"title":"BadgeRuleCreate","description":"Schema for creating a badge rule."},"BadgeRuleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trigger":{"type":"string","title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"badge_name":{"type":"string","title":"Badge Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","trigger","reference_type","reference_id","badge_id","badge_name","description","created_at","updated_at"],"title":"BadgeRuleResponse","description":"Schema for badge rule data returned by the API."},"BadgeRuleUpdate":{"properties":{"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"badge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Badge Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"BadgeRuleUpdate","description":"Schema for updating a badge rule's editable fields."},"BadgeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"BadgeUpdate","description":"Schema for updating a badge's editable fields."},"Body_upload_coach_photo_uploads_coach_photo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_coach_photo_uploads_coach_photo_post"},"Body_upload_damage_photo_rental_rentals__rental_id__damage_photos_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_damage_photo_rental_rentals__rental_id__damage_photos_post"},"Body_upload_fleet_baseline_photo_rental_fleet__bike_id__baseline_photos_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_fleet_baseline_photo_rental_fleet__bike_id__baseline_photos_post"},"Body_upload_license_photo_rental_rentals__rental_id__license_photos_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_license_photo_rental_rentals__rental_id__license_photos_post"},"Body_upload_photo_in_rental_rentals__rental_id__photos_in_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_photo_in_rental_rentals__rental_id__photos_in_post"},"Body_upload_photo_out_rental_rentals__rental_id__photos_out_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_photo_out_rental_rentals__rental_id__photos_out_post"},"Body_upload_profile_photo_uploads_profile_photo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_profile_photo_uploads_profile_photo_post"},"CancelRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"CancelRequest","description":"Payload for the cancel transition endpoint."},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest","description":"Password change payload — requires proof of the current password."},"CheckInRequest":{"properties":{"mileage_in":{"type":"integer","title":"Mileage In"},"fuel_in":{"type":"string","title":"Fuel In"},"damage_observed":{"type":"boolean","title":"Damage Observed","default":false},"damage_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Severity"},"damage_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Description"},"fee_fuel":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Fee Fuel","default":"0"},"fee_cleaning":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Fee Cleaning","default":"0"},"fee_late":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Fee Late","default":"0"}},"type":"object","required":["mileage_in","fuel_in"],"title":"CheckInRequest","description":"Payload for the check-in transition endpoint."},"ClassAttention":{"properties":{"medical":{"type":"integer","title":"Medical","default":0},"food":{"type":"integer","title":"Food","default":0},"no_contact":{"type":"integer","title":"No Contact","default":0},"no_waiver":{"type":"integer","title":"No Waiver","default":0}},"type":"object","title":"ClassAttention","description":"How many riders on a class need a coach's eye, by reason (#258).\n\nShown as flags on the calendar row and the class header so a coach\nknows before opening a class whether anyone has disclosed something\nmedical, has food requirements, is missing an emergency contact, or\nhas no signed waiver in the CRM. ``no_waiver`` stays zero when the\nCRM cannot be read.\n\nIn-app agreements are deliberately not a flag: they are mandatory on\nfirst sign-in, so \"not accepted\" only means the rider has not opened\nthe app yet, which is nothing a coach can act on."},"ClassCoachCreate":{"properties":{"coach_id":{"type":"string","format":"uuid","title":"Coach Id"},"is_lead":{"type":"boolean","title":"Is Lead","default":false}},"type":"object","required":["coach_id"],"title":"ClassCoachCreate","description":"Schema for assigning a coach to a class."},"ClassCoachDaysUpdate":{"properties":{"days_on":{"items":{"type":"integer"},"type":"array","title":"Days On"}},"type":"object","required":["days_on"],"title":"ClassCoachDaysUpdate","description":"The days of a class a coach will coach, set by the office (#367)."},"ClassCoachItem":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role_title":{"type":"string","title":"Role Title"},"initials":{"type":"string","title":"Initials"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"is_lead":{"type":"boolean","title":"Is Lead"}},"type":"object","required":["first_name","last_name","role_title","initials","photo_url","is_lead"],"title":"ClassCoachItem","description":"A coach assigned to a class."},"ClassCoachResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_id":{"type":"string","format":"uuid","title":"Class Id"},"coach_id":{"type":"string","format":"uuid","title":"Coach Id"},"is_lead":{"type":"boolean","title":"Is Lead"},"initials":{"type":"string","title":"Initials"},"role_title":{"type":"string","title":"Role Title"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"signed_up_by_coach":{"type":"boolean","title":"Signed Up By Coach","default":false},"days_off":{"items":{"type":"integer"},"type":"array","title":"Days Off"}},"type":"object","required":["id","class_id","coach_id","is_lead","initials","role_title","first_name","last_name"],"title":"ClassCoachResponse","description":"Schema for a coach assignment row with display fields.\n\nIncludes the coach's initials and linked user name so clients can\nrender a roster card without additional joins."},"ClassCoachUpdate":{"properties":{"is_lead":{"type":"boolean","title":"Is Lead"}},"type":"object","required":["is_lead"],"title":"ClassCoachUpdate","description":"Schema for updating a coach assignment's lead flag."},"ClassCreate":{"properties":{"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"local_start_date":{"type":"string","format":"date","title":"Local Start Date"},"local_start_time":{"type":"string","format":"time","title":"Local Start Time"},"duration_days":{"type":"integer","maximum":14.0,"minimum":1.0,"title":"Duration Days"},"capacity":{"type":"integer","minimum":1.0,"title":"Capacity"}},"type":"object","required":["class_type_id","location_id","local_start_date","local_start_time","duration_days","capacity"],"title":"ClassCreate","description":"Schema for creating a scheduled class instance."},"ClassDayResponse":{"properties":{"number":{"type":"integer","title":"Number"},"label":{"type":"string","title":"Label"}},"type":"object","required":["number","label"],"title":"ClassDayResponse","description":"One day of a class: its number (1 = first day) and short weekday."},"ClassGearRequirementCreate":{"properties":{"gear_catalog_id":{"type":"string","format":"uuid","title":"Gear Catalog Id"},"required":{"type":"boolean","title":"Required","default":true},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["gear_catalog_id"],"title":"ClassGearRequirementCreate","description":"Schema for linking a gear item to a class type."},"ClassGearRequirementResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"gear_catalog_id":{"type":"string","format":"uuid","title":"Gear Catalog Id"},"gear_name":{"type":"string","title":"Gear Name"},"gear_category":{"type":"string","title":"Gear Category"},"required":{"type":"boolean","title":"Required"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","class_type_id","gear_catalog_id","gear_name","gear_category","required","notes","created_at","updated_at"],"title":"ClassGearRequirementResponse","description":"Schema for class gear requirement returned by the API."},"ClassGearRequirementUpdate":{"properties":{"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ClassGearRequirementUpdate","description":"Schema for updating a class gear requirement."},"ClassResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"location_name":{"type":"string","title":"Location Name"},"location_timezone":{"type":"string","title":"Location Timezone"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"capacity":{"type":"integer","title":"Capacity"},"status":{"type":"string","title":"Status"},"coach_count":{"type":"integer","title":"Coach Count"},"enrollment_count":{"type":"integer","title":"Enrollment Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","class_type_id","class_type_name","location_id","location_name","location_timezone","starts_at","ends_at","capacity","status","coach_count","enrollment_count","created_at","updated_at"],"title":"ClassResponse","description":"Schema for a single class row returned to clients.\n\nJoins in class_type name and location name/timezone so the admin UI\ncan render a row without follow-up requests."},"ClassTypeCreate":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"milestone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Milestone"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["name","category","sort_order"],"title":"ClassTypeCreate","description":"Schema for creating a class type."},"ClassTypeMilestoneCreate":{"properties":{"milestone_key":{"type":"string","title":"Milestone Key"},"day_offset":{"type":"integer","title":"Day Offset"},"local_time":{"type":"string","format":"time","title":"Local Time"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"xp_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Xp Rule Id"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["milestone_key","day_offset","local_time","badge_id","sort_order"],"title":"ClassTypeMilestoneCreate","description":"Schema for creating a graduation milestone template."},"ClassTypeMilestoneResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"milestone_key":{"type":"string","title":"Milestone Key"},"day_offset":{"type":"integer","title":"Day Offset"},"local_time":{"type":"string","format":"time","title":"Local Time"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"badge_name":{"type":"string","title":"Badge Name"},"xp_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Xp Rule Id"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","class_type_id","milestone_key","day_offset","local_time","badge_id","badge_name","xp_rule_id","sort_order","created_at","updated_at"],"title":"ClassTypeMilestoneResponse","description":"Schema for milestone template data returned by the API.\n\nIncludes the linked badge name for display without a second request."},"ClassTypeMilestoneUpdate":{"properties":{"milestone_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Milestone Key"},"day_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Day Offset"},"local_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Local Time"},"badge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Badge Id"},"xp_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Xp Rule Id"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"ClassTypeMilestoneUpdate","description":"Schema for updating a milestone template's editable fields."},"ClassTypeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"milestone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Milestone"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","category","milestone","level","description","sort_order","created_at","updated_at"],"title":"ClassTypeResponse","description":"Schema for class type data returned by the API."},"ClassTypeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"milestone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Milestone"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"ClassTypeUpdate","description":"Schema for updating a class type's editable fields."},"ClassUpdate":{"properties":{"class_type_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Type Id"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"local_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Local Start Date"},"local_start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Local Start Time"},"duration_days":{"anyOf":[{"type":"integer","maximum":14.0,"minimum":1.0},{"type":"null"}],"title":"Duration Days"},"capacity":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Capacity"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"ClassUpdate","description":"Schema for updating a class.\n\nAny subset of fields may be supplied. If any of the scheduling\ninputs (date, time, duration, location) change, the service layer\nrecomputes ``starts_at`` / ``ends_at``."},"CloseRequest":{"properties":{"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","title":"CloseRequest","description":"Payload for the close transition endpoint."},"CoachCalendarEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"location_name":{"type":"string","title":"Location Name"},"location_timezone":{"type":"string","title":"Location Timezone"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"capacity":{"type":"integer","title":"Capacity"},"status":{"type":"string","title":"Status"},"coach_count":{"type":"integer","title":"Coach Count"},"enrollment_count":{"type":"integer","title":"Enrollment Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_assigned":{"type":"boolean","title":"Is Assigned"},"can_open":{"type":"boolean","title":"Can Open","default":false},"attention":{"anyOf":[{"$ref":"#/components/schemas/ClassAttention"},{"type":"null"}]},"coach_names":{"items":{"type":"string"},"type":"array","title":"Coach Names"},"class_days":{"items":{"$ref":"#/components/schemas/ClassDayResponse"},"type":"array","title":"Class Days"},"my_days_off":{"items":{"type":"integer"},"type":"array","title":"My Days Off"}},"type":"object","required":["id","class_type_id","class_type_name","location_id","location_name","location_timezone","starts_at","ends_at","capacity","status","coach_count","enrollment_count","created_at","updated_at","is_assigned"],"title":"CoachCalendarEntry","description":"A class on the calendar, flagged when the caller is assigned to it.\n\n``attention`` is present only for assigned classes: unassigned rows\ncarry no rider information at all."},"CoachClassResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"location_name":{"type":"string","title":"Location Name"},"location_timezone":{"type":"string","title":"Location Timezone"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"capacity":{"type":"integer","title":"Capacity"},"status":{"type":"string","title":"Status"},"coach_count":{"type":"integer","title":"Coach Count"},"enrollment_count":{"type":"integer","title":"Enrollment Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"attention":{"$ref":"#/components/schemas/ClassAttention"},"is_assigned":{"type":"boolean","title":"Is Assigned","default":true}},"type":"object","required":["id","class_type_id","class_type_name","location_id","location_name","location_timezone","starts_at","ends_at","capacity","status","coach_count","enrollment_count","created_at","updated_at","attention"],"title":"CoachClassResponse","description":"A class the coach can open, with its attention counts.\n\n``is_assigned`` is false for a past class the coach was not on: the\nportal then leaves out the phases, milestone and post controls."},"CoachCreate":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role_title":{"type":"string","title":"Role Title"},"initials":{"type":"string","title":"Initials"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["user_id","role_title","initials"],"title":"CoachCreate","description":"Schema for creating a coach profile for an existing user."},"CoachDaysRequest":{"properties":{"days_on":{"items":{"type":"integer"},"type":"array","title":"Days On"}},"type":"object","required":["days_on"],"title":"CoachDaysRequest","description":"The days of a class the coach will coach (#367)."},"CoachDaysResponse":{"properties":{"days_off":{"items":{"type":"integer"},"type":"array","title":"Days Off"}},"type":"object","required":["days_off"],"title":"CoachDaysResponse","description":"The days off now stored."},"CoachListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role_title":{"type":"string","title":"Role Title"},"initials":{"type":"string","title":"Initials"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["id","first_name","last_name","role_title","initials","bio","photo_url"],"title":"CoachListResponse","description":"A coach profile visible to riders."},"CoachMessageItem":{"properties":{"kind":{"type":"string","enum":["post","note"],"title":"Kind"},"id":{"type":"string","format":"uuid","title":"Id"},"author_name":{"type":"string","title":"Author Name"},"body":{"type":"string","title":"Body"},"pinned":{"type":"boolean","title":"Pinned","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"class_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class Type Name"},"class_starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Class Starts At"},"rider_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rider Seen At"}},"type":"object","required":["kind","id","author_name","body","created_at"],"title":"CoachMessageItem","description":"One thing a coach said to this rider: a class post or a personal note."},"CoachMessagesResponse":{"properties":{"class_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Id"},"class_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class Type Name"},"items":{"items":{"$ref":"#/components/schemas/CoachMessageItem"},"type":"array","title":"Items"}},"type":"object","required":["class_id","class_type_name","items"],"title":"CoachMessagesResponse","description":"What the rider's coaches have said about their current class."},"CoachNoteCreate":{"properties":{"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body"},"visibility":{"type":"string","enum":["coaches","rider"],"title":"Visibility","default":"coaches"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["body"],"title":"CoachNoteCreate","description":"A new note on one rider's enrollment."},"CoachNoteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"author_name":{"type":"string","title":"Author Name"},"visibility":{"type":"string","enum":["coaches","rider"],"title":"Visibility"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mine":{"type":"boolean","title":"Mine"},"rider_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rider Seen At"}},"type":"object","required":["id","enrollment_id","author_name","visibility","body","created_at","updated_at","mine"],"title":"CoachNoteResponse","description":"A note as the coaching team sees it."},"CoachNoteUpdate":{"properties":{"body":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Body"},"visibility":{"anyOf":[{"type":"string","enum":["coaches","rider"]},{"type":"null"}],"title":"Visibility"}},"type":"object","title":"CoachNoteUpdate","description":"Edit a note's text or who may see it."},"CoachResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role_title":{"type":"string","title":"Role Title"},"initials":{"type":"string","title":"Initials"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","role_title","initials","bio","photo_url","first_name","last_name","email","created_at","updated_at"],"title":"CoachResponse","description":"Schema for coach profile data returned by the API.\n\nIncludes the linked user's name and email for display. Callers still\nhave the option to fetch the full user via the users endpoints."},"CoachRosterDetail":{"properties":{"class_id":{"type":"string","format":"uuid","title":"Class Id"},"class_ends_at":{"type":"string","format":"date-time","title":"Class Ends At"},"riders":{"items":{"$ref":"#/components/schemas/CoachRosterRider"},"type":"array","title":"Riders"}},"type":"object","required":["class_id","class_ends_at","riders"],"title":"CoachRosterDetail","description":"A class roster with rider detail, plus the class end instant.\n\n``class_ends_at`` travels with the payload so the offline client can\nexpire its cached copy when the class ends without a second fetch.\nCache lifetime is tied to the class, not to the coach's session."},"CoachRosterRider":{"properties":{"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"status":{"type":"string","title":"Status"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"dietary_info":{"$ref":"#/components/schemas/DietaryInfo"},"medical_info":{"$ref":"#/components/schemas/MedicalInfo"},"agreements_complete":{"type":"boolean","title":"Agreements Complete","default":true},"waiver":{"anyOf":[{"$ref":"#/components/schemas/WaiverState"},{"type":"null"}]}},"type":"object","required":["enrollment_id","user_id","first_name","last_name","email","status","dietary_info","medical_info"],"title":"CoachRosterRider","description":"One rider on a coach's class, with the detail needed in the field."},"CoachUpdate":{"properties":{"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title"},"initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initials"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","title":"CoachUpdate","description":"Schema for updating a coach profile's editable fields."},"CompletionExclusionUpdate":{"properties":{"excluded":{"type":"boolean","title":"Excluded"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["excluded"],"title":"CompletionExclusionUpdate","description":"Schema for the coach's \"not completing\" toggle on a single milestone.\n\n``excluded=True`` flips a pending completion into the excluded state\nso the graduation scheduler will skip it when its trigger time\narrives. ``excluded=False`` restores a previously excluded row back\nto pending. Rows that have already graduated cannot be touched\nthrough this endpoint — the state transition is strictly between\n``pending`` and ``excluded``."},"ConfigCreate":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["key","value"],"title":"ConfigCreate","description":"Schema for creating a new config entry."},"ConfigResponse":{"properties":{"key":{"type":"string","title":"Key"},"value":{"title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"updated_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By User Id"}},"type":"object","required":["key","value","description","updated_at","updated_by_user_id"],"title":"ConfigResponse","description":"Schema for config data returned by the API."},"ConfigUpdate":{"properties":{"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ConfigUpdate","description":"Schema for updating a config entry's value or description."},"CrmBookingEvent":{"properties":{"event":{"type":"string","title":"Event","default":"booking.purchased"},"deal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Id"},"customer":{"$ref":"#/components/schemas/CrmCustomer"},"class_":{"anyOf":[{"$ref":"#/components/schemas/CrmClassInfo"},{"type":"null"}]}},"type":"object","required":["customer"],"title":"CrmBookingEvent","description":"Payload the CRM workflow webhook sends on purchase."},"CrmBookingResult":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_created":{"type":"boolean","title":"User Created"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"},"enrollment_created":{"type":"boolean","title":"Enrollment Created"},"class_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Id"},"invite_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Url"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["user_id","user_created","enrollment_id","enrollment_created","class_id","invite_url","detail"],"title":"CrmBookingResult","description":"What the CRM gets back — including the invite URL to email."},"CrmClassInfo":{"properties":{"name":{"type":"string","title":"Name","default":""},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"}},"type":"object","title":"CrmClassInfo","description":"Which class was purchased.\n\nBoth fields tolerate blank or garbage input: the CRM workflow renders\nmerge tokens into this payload, and an unfilled field arrives as an\nempty string (or the literal unrendered token). A bad date must never\nreject the whole event — provisioning the user always comes first."},"CrmCustomer":{"properties":{"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"type":"string","title":"Last Name","default":""},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","title":"Phone","default":""}},"type":"object","required":["email"],"title":"CrmCustomer","description":"Buyer identity as sent by the CRM."},"DealResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"partner_name":{"type":"string","title":"Partner Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"expires_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"category":{"type":"string","title":"Category"}},"type":"object","required":["id","partner_name","description","code","expires_at","url","category"],"title":"DealResponse","description":"An active partner deal."},"DietaryInfo":{"properties":{"restrictions":{"items":{"type":"string"},"type":"array","title":"Restrictions"},"notes":{"type":"string","title":"Notes","default":""},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"DietaryInfo","description":"A rider's food requirements for camp meals.\n\nCatering logistics, not medical data — it is never redacted and never\nreached through the medical reveal endpoint. Keep it that way.\n\n``restrictions`` holds the labels the rider checked. The available\nlabels are business configuration under the app_config key\n``dietary_restriction_options``, so nothing here enumerates them.\n``notes`` covers anything the configured list cannot express."},"DrillCreate":{"properties":{"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"sort_order":{"type":"integer","title":"Sort Order"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"unlock_milestone_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock Milestone Key"}},"type":"object","required":["class_type_id","name","type","sort_order"],"title":"DrillCreate","description":"Schema for creating a drill."},"DrillResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"sort_order":{"type":"integer","title":"Sort Order"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"unlock_milestone_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock Milestone Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","class_type_id","class_type_name","name","description","type","sort_order","image_url","video_url","unlock_milestone_key","created_at","updated_at"],"title":"DrillResponse","description":"Schema for drill data returned by the API."},"DrillUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"unlock_milestone_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock Milestone Key"}},"type":"object","title":"DrillUpdate","description":"Schema for updating a drill's editable fields."},"EarnedBadgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"awarded_at":{"type":"string","format":"date-time","title":"Awarded At"}},"type":"object","required":["id","badge_id","name","icon","description","category","awarded_at"],"title":"EarnedBadgeResponse","description":"A badge the rider has earned."},"EnrollmentCompletionItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"milestone_key":{"type":"string","title":"Milestone Key"},"status":{"type":"string","title":"Status"},"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"exclusion_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclusion Reason"}},"type":"object","required":["id","milestone_key","status","scheduled_for","completed_at","exclusion_reason"],"title":"EnrollmentCompletionItem","description":"Per-milestone progress record attached to an enrollment.\n\nPre-seeded from ``class_type_milestones`` at enrollment time. The\ngraduation scheduler walks pending rows and flips them to completed\nwhen ``scheduled_for`` arrives."},"EnrollmentCreate":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"EnrollmentCreate","description":"Schema for enrolling a user into a class."},"EnrollmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_id":{"type":"string","format":"uuid","title":"Class Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status"},"agreements_complete":{"type":"boolean","title":"Agreements Complete"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"completions":{"items":{"$ref":"#/components/schemas/EnrollmentCompletionItem"},"type":"array","title":"Completions"}},"type":"object","required":["id","class_id","user_id","first_name","last_name","email","status","agreements_complete","personal_goal","emergency_contact_name","emergency_contact_phone","created_at","updated_at","completions"],"title":"EnrollmentResponse","description":"Schema for a single enrollment row with student display fields and completions."},"FleetBikeCreate":{"properties":{"identifier":{"type":"string","title":"Identifier"},"make":{"type":"string","title":"Make"},"model":{"type":"string","title":"Model"},"year":{"type":"integer","title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"vin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vin"},"plate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plate"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["identifier","make","model","year","location_id"],"title":"FleetBikeCreate","description":"Fields required to add a bike to the fleet."},"FleetBikeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"identifier":{"type":"string","title":"Identifier"},"make":{"type":"string","title":"Make"},"model":{"type":"string","title":"Model"},"year":{"type":"integer","title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"vin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vin"},"plate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plate"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"location_id":{"type":"string","format":"uuid","title":"Location Id"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"baseline_photos":{"additionalProperties":true,"type":"object","title":"Baseline Photos","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","identifier","make","model","year","color","vin","plate","photo_url","location_id","status","notes","created_at","updated_at"],"title":"FleetBikeResponse","description":"A bike in the rental fleet, as returned by the API."},"FleetBikeUpdate":{"properties":{"identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"},"make":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Make"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"vin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vin"},"plate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plate"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"location_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"FleetBikeUpdate","description":"Patchable fleet bike fields. All fields are optional."},"ForecastPeriod":{"properties":{"name":{"type":"string","title":"Name"},"temp_f":{"type":"integer","title":"Temp F"},"condition":{"type":"string","title":"Condition"},"is_daytime":{"type":"boolean","title":"Is Daytime"}},"type":"object","required":["name","temp_f","condition","is_daytime"],"title":"ForecastPeriod","description":"A single forecast period (day or night)."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Email for password reset request."},"FoundRiderResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"classes":{"items":{"$ref":"#/components/schemas/RiderClassResponse"},"type":"array","title":"Classes"}},"type":"object","required":["user_id","first_name","last_name","email","classes"],"title":"FoundRiderResponse","description":"A rider matching a coach's search, with the classes to open (#381)."},"GarageCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"make":{"type":"string","title":"Make"},"model":{"type":"string","title":"Model"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["make","model"],"title":"GarageCreate","description":"Schema for adding a bike."},"GarageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"make":{"type":"string","title":"Make"},"model":{"type":"string","title":"Model"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","required":["id","make","model","year","color","photo_url"],"title":"GarageResponse","description":"A bike in the rider's garage."},"GarageUpdate":{"properties":{"make":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Make"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"}},"type":"object","title":"GarageUpdate","description":"Schema for updating a bike."},"GearCatalogCreate":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["name","category"],"title":"GearCatalogCreate","description":"Schema for creating a gear catalog item."},"GearCatalogResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","category","description","icon","created_at","updated_at"],"title":"GearCatalogResponse","description":"Schema for gear catalog data returned by the API."},"GearCatalogUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","title":"GearCatalogUpdate","description":"Schema for updating a gear catalog item."},"GearItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"required":{"type":"boolean","title":"Required"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"owned":{"type":"boolean","title":"Owned"}},"type":"object","required":["id","name","category","description","icon","required","notes","owned"],"title":"GearItemResponse","description":"A gear item with ownership and requirement status."},"GearToggleRequest":{"properties":{"owned":{"type":"boolean","title":"Owned"}},"type":"object","required":["owned"],"title":"GearToggleRequest","description":"Toggle ownership of a gear item."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntakeStatusResponse":{"properties":{"has_goals":{"type":"boolean","title":"Has Goals"},"has_emergency_contact":{"type":"boolean","title":"Has Emergency Contact"},"emergency_contact_required":{"type":"boolean","title":"Emergency Contact Required"},"agreements_accepted":{"type":"boolean","title":"Agreements Accepted"},"pending_agreement_count":{"type":"integer","title":"Pending Agreement Count"},"complete":{"type":"boolean","title":"Complete"}},"type":"object","required":["has_goals","has_emergency_contact","emergency_contact_required","agreements_accepted","pending_agreement_count","complete"],"title":"IntakeStatusResponse","description":"Schema for the intake completeness check."},"IntakeUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Last Name"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"medical_info":{"anyOf":[{"$ref":"#/components/schemas/MedicalInfo"},{"type":"null"}]},"dietary_info":{"anyOf":[{"$ref":"#/components/schemas/DietaryInfo"},{"type":"null"}]},"email_opt_outs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Email Opt Outs"},"marketing_opt_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Opt Out"}},"type":"object","title":"IntakeUpdate","description":"Schema for the first-login intake form submission.\n\nAlso backs the rider's own profile edits, so anything a rider may\nchange about themselves belongs here. Collects goals, personal goal,\nemergency contact, medical disclosures, dietary restrictions, and\noptional profile fields. All fields are optional so partial saves\nwork.\n\n``medical_info`` is the rider's own copy of their disclosures. Admin\nreads go through the audited reveal endpoint instead; this field is\nthe rider writing to their own record."},"JobFieldResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"kind":{"type":"string","title":"Kind"},"help":{"type":"string","title":"Help"},"value":{"title":"Value"}},"type":"object","required":["key","label","kind","help","value"],"title":"JobFieldResponse","description":"One of a job's timings, editable on the Jobs screen (#375)."},"JobResponse":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"interval_seconds":{"type":"integer","title":"Interval Seconds"},"interval_choices":{"items":{"type":"integer"},"type":"array","title":"Interval Choices"},"paused":{"type":"boolean","title":"Paused"},"fields":{"items":{"$ref":"#/components/schemas/JobFieldResponse"},"type":"array","title":"Fields"},"scheduled":{"type":"boolean","title":"Scheduled"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"switch_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Switch Key"},"switch_on":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Switch On"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/JobRunResponse"},{"type":"null"}]},"history":{"items":{"$ref":"#/components/schemas/JobRunResponse"},"type":"array","title":"History"}},"type":"object","required":["name","label","description","interval_seconds","interval_choices","paused","fields","scheduled","next_run_at","switch_key","switch_on","last_run","history"],"title":"JobResponse","description":"A background job, its schedule and what it has done."},"JobRunResponse":{"properties":{"started_at":{"type":"string","format":"date-time","title":"Started At"},"duration_ms":{"type":"integer","title":"Duration Ms"},"outcome":{"type":"string","title":"Outcome"},"trigger":{"type":"string","title":"Trigger"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["started_at","duration_ms","outcome","trigger","summary"],"title":"JobRunResponse","description":"One run of a job."},"JobUpdate":{"properties":{"interval_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval Seconds"},"paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paused"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"JobUpdate","description":"What to change on a job. Every part is optional."},"JournalEntryCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"date":{"type":"string","format":"date","title":"Date"},"focus":{"type":"string","title":"Focus"},"difficulty":{"type":"integer","title":"Difficulty"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["date","focus","difficulty"],"title":"JournalEntryCreate","description":"Schema for creating a journal entry."},"JournalEntryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"date":{"type":"string","format":"date","title":"Date"},"focus":{"type":"string","title":"Focus"},"difficulty":{"type":"integer","title":"Difficulty"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","date","focus","difficulty","notes","created_at"],"title":"JournalEntryResponse","description":"A practice journal entry."},"LinkUserRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"LinkUserRequest","description":"POST body for linking an existing user to a rental draft."},"LocationCreate":{"properties":{"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"timezone":{"type":"string","title":"Timezone"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","address","lat","lng","timezone"],"title":"LocationCreate","description":"Schema for creating a training location."},"LocationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"LocationUpdate","description":"Schema for updating a location's editable fields."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Email and password for sign-in."},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"LoginResponse","description":"Access token and refresh token returned on successful login."},"MarketingOptOutUpdate":{"properties":{"marketing_opt_out":{"type":"boolean","title":"Marketing Opt Out"}},"type":"object","required":["marketing_opt_out"],"title":"MarketingOptOutUpdate","description":"Admin override of a rider's marketing email preference.\n\nUsed when a rider asks to be removed (or re-added) over the phone\nrather than through the portal. Backed by the reserved marketing\ncategory in ``users.email_opt_outs`` since the standalone column was\nretired; the request and audit shapes are unchanged."},"MedicalConditions":{"properties":{"high_blood_pressure":{"type":"boolean","title":"High Blood Pressure","default":false},"blood_thinners":{"type":"boolean","title":"Blood Thinners","default":false},"diabetes":{"type":"boolean","title":"Diabetes","default":false},"beta_blockers":{"type":"boolean","title":"Beta Blockers","default":false}},"type":"object","title":"MedicalConditions","description":"Binary condition flags relevant to riding safety.\n\nKept narrow on purpose — see the privacy notes in\ndocs/infrastructure.md. Add to this list only when a new condition\nmaterially changes how staff should respond in an emergency."},"MedicalInfo":{"properties":{"physical_limitations":{"type":"string","title":"Physical Limitations","default":""},"conditions":{"$ref":"#/components/schemas/MedicalConditions"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"MedicalInfo","description":"The full medical info blob stored on users.medical_info."},"MedicalInfoSummary":{"properties":{"has_medical_info":{"type":"boolean","title":"Has Medical Info"},"disclosed_item_count":{"type":"integer","title":"Disclosed Item Count"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["has_medical_info","disclosed_item_count"],"title":"MedicalInfoSummary","description":"Existence-only view of a rider's medical disclosures.\n\nCarries no medical detail on purpose: admin screens render this by\ndefault so sensitive text never sits on a screen unattended. The\ndetail itself comes from the audited reveal endpoint."},"MilestoneStopResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"status":{"type":"string","title":"Status"},"graduated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Graduated At"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"},"booking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Url"}},"type":"object","required":["key","name","level","status"],"title":"MilestoneStopResponse","description":"One stop on the rider's class path.\n\n``key`` is the class type name lowercased with spaces replaced by\nunderscores (e.g. \"Explorer\" -> \"explorer\").\n\n``status`` is one of: \"graduated\", \"enrolled\", \"next-to-book\", \"future\".\n``booking_url`` is populated only when status is \"next-to-book\"."},"NextBadgeResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"},"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"icon":{"type":"string","title":"Icon"},"current":{"type":"integer","title":"Current"},"target":{"type":"integer","title":"Target"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["kind","name","badge_id","icon","current","target","unit"],"title":"NextBadgeResponse","description":"The closest-to-earn badge for the current rider with progress info.\n\nFields:\n    kind:     Category of the progress metric.\n              One of: \"practice_count\", \"streak_days\", \"journal_count\",\n              \"gear_complete\".\n    name:     Display name of the badge.\n    badge_id: UUID of the badge.\n    icon:     Icon path or URL for the badge image.\n    current:  The rider's current value toward the target.\n    target:   The threshold value required to earn the badge.\n    unit:     Human-readable label for the metric\n              (\"practices\", \"days\", \"entries\", \"%\")."},"PartnerDealCreate":{"properties":{"partner_name":{"type":"string","title":"Partner Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"expires_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"category":{"type":"string","title":"Category"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["partner_name","category"],"title":"PartnerDealCreate","description":"Payload for creating a partner deal."},"PartnerDealResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"partner_name":{"type":"string","title":"Partner Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"expires_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"category":{"type":"string","title":"Category"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","partner_name","description","code","expires_at","url","category","active","created_at","updated_at"],"title":"PartnerDealResponse","description":"A partner deal as returned by the API."},"PartnerDealUpdate":{"properties":{"partner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"expires_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"PartnerDealUpdate","description":"Partial update; only supplied fields are applied."},"PhaseBatchRequest":{"properties":{"milestone_keys":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Milestone Keys"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["milestone_keys"],"title":"PhaseBatchRequest","description":"A whole phase: every milestone that fires at the same moment."},"PhaseCancelRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PhaseCancelRequest","description":"Optional reason supplied when canceling a phase."},"PhaseOverrideResponse":{"properties":{"milestone_key":{"type":"string","title":"Milestone Key"},"milestone_keys":{"items":{"type":"string"},"type":"array","title":"Milestone Keys"},"affected":{"type":"integer","title":"Affected"},"already_completed":{"type":"integer","title":"Already Completed"},"already_excluded":{"type":"integer","title":"Already Excluded"},"riders":{"type":"integer","title":"Riders"}},"type":"object","required":["milestone_key","milestone_keys","affected","already_completed","already_excluded","riders"],"title":"PhaseOverrideResponse","description":"Summary returned after a class-wide phase override.\n\n``milestone_key`` is the first key, kept for the single-key routes;\n``milestone_keys`` lists every key the phase covered. ``riders`` is\nthe number of distinct riders touched, the figure a coach is shown."},"PostCreate":{"properties":{"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["body"],"title":"PostCreate","description":"A new post to everyone on a class."},"PostResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Class Id"},"author_name":{"type":"string","title":"Author Name"},"body":{"type":"string","title":"Body"},"pinned":{"type":"boolean","title":"Pinned"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mine":{"type":"boolean","title":"Mine"}},"type":"object","required":["id","class_id","author_name","body","pinned","created_at","updated_at","mine"],"title":"PostResponse","description":"A class post as coaches see it."},"PostUpdate":{"properties":{"body":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Body"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},"type":"object","title":"PostUpdate","description":"Edit a post's text, or pin and unpin it."},"PracticeLogCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"drill_id":{"type":"string","format":"uuid","title":"Drill Id"},"practiced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Practiced At"}},"type":"object","required":["drill_id"],"title":"PracticeLogCreate","description":"Schema for logging a practice session."},"PracticeLogResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drill_id":{"type":"string","format":"uuid","title":"Drill Id"},"drill_name":{"type":"string","title":"Drill Name"},"practiced_at":{"type":"string","format":"date-time","title":"Practiced At"}},"type":"object","required":["id","drill_id","drill_name","practiced_at"],"title":"PracticeLogResponse","description":"A recorded practice session."},"PreClassEmailStatus":{"properties":{"riders":{"items":{"$ref":"#/components/schemas/PreClassRider"},"type":"array","title":"Riders"},"schedule_days":{"type":"integer","title":"Schedule Days"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","default":[]},"automatic":{"type":"boolean","title":"Automatic"},"lead_days":{"additionalProperties":{"type":"integer"},"type":"object","title":"Lead Days"}},"type":"object","required":["riders","schedule_days","missing","automatic","lead_days"],"title":"PreClassEmailStatus","description":"Who has had which email, what is missing, and whether sending is automatic."},"PreClassRider":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"sent":{"additionalProperties":{"type":"string","format":"date-time"},"type":"object","title":"Sent"}},"type":"object","required":["user_id","name","email","sent"],"title":"PreClassRider","description":"A rider on the class and when they got each email, keyed by email."},"PreClassSendResult":{"properties":{"sent":{"items":{"type":"string"},"type":"array","title":"Sent"},"already_sent":{"type":"integer","title":"Already Sent"},"failed":{"items":{"type":"string"},"type":"array","title":"Failed"}},"type":"object","required":["sent","already_sent","failed"],"title":"PreClassSendResult","description":"What Send to riders did."},"PreClassTestResult":{"properties":{"sent_to":{"type":"string","title":"Sent To"}},"type":"object","required":["sent_to"],"title":"PreClassTestResult","description":"Where the test went."},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest","description":"Refresh token for obtaining a new access token."},"RentalCreate":{"properties":{"source":{"type":"string","title":"Source"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"requested_bike_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Bike Type"},"expected_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Start Date"},"expected_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected End Date"},"renter_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Full Name"},"renter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Email"},"renter_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Phone"}},"type":"object","required":["source"],"title":"RentalCreate","description":"Fields accepted when creating a new rental draft."},"RentalResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"renter_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Full Name"},"renter_dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renter Dob"},"renter_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Phone"},"renter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Email"},"renter_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Address"},"renter_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter City"},"renter_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter State"},"renter_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Zip"},"renter_emergency_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Emergency Name"},"renter_emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Emergency Phone"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License State"},"license_expiration":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"License Expiration"},"license_endorsement_verified":{"type":"boolean","title":"License Endorsement Verified"},"license_front_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Front Url"},"license_back_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Back Url"},"insurance_decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Decision"},"insurance_initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Initials"},"insurance_daily_rate_snapshot":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Insurance Daily Rate Snapshot"},"insurance_deductible_snapshot":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Insurance Deductible Snapshot"},"fleet_bike_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Fleet Bike Id"},"requested_bike_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Bike Type"},"expected_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Start Date"},"expected_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected End Date"},"mileage_out":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mileage Out"},"fuel_out":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuel Out"},"photos_out":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos Out"},"staff_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff User Id"},"staff_signature_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staff Signature Url"},"renter_signature_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Signature Url"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"checked_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked Out At"},"checked_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked In At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"mileage_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mileage In"},"fuel_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuel In"},"photos_in":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos In"},"damage_observed":{"type":"boolean","title":"Damage Observed"},"damage_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Severity"},"damage_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Description"},"damage_photos":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Damage Photos"},"damage_estimate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Damage Estimate"},"fee_fuel":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Fee Fuel"},"fee_cleaning":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Fee Cleaning"},"fee_late":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Fee Late"},"packet_pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Packet Pdf Url"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","source","enrollment_id","user_id","renter_full_name","renter_dob","renter_phone","renter_email","renter_address","renter_city","renter_state","renter_zip","renter_emergency_name","renter_emergency_phone","license_number","license_state","license_expiration","license_endorsement_verified","license_front_url","license_back_url","insurance_decision","insurance_initials","insurance_daily_rate_snapshot","insurance_deductible_snapshot","fleet_bike_id","requested_bike_type","expected_start_date","expected_end_date","mileage_out","fuel_out","photos_out","staff_user_id","staff_signature_url","renter_signature_url","signed_at","checked_out_at","checked_in_at","closed_at","cancelled_at","cancel_reason","mileage_in","fuel_in","photos_in","damage_observed","damage_severity","damage_description","damage_photos","damage_estimate","fee_fuel","fee_cleaning","fee_late","packet_pdf_url","created_by_user_id","created_at","updated_at"],"title":"RentalResponse","description":"Full rental row returned by list, get, create, and patch endpoints."},"RentalSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"renter_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Full Name"},"checked_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked Out At"},"checked_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked In At"},"photos_out":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos Out"},"photos_in":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Photos In"}},"type":"object","required":["id","status","renter_full_name","checked_out_at","checked_in_at"],"title":"RentalSummary","description":"A rental row summarized for display in the bike history list.\n\nIncludes the photos_out / photos_in maps so the fleet bike detail screen\ncan render small thumbnail strips per history row without an extra\nper-rental fetch. The maps are JSON: {position: signed URL} -- resolved\nby ``_rental_summary_response``, never emitted as the raw ``legal/``\nobject paths the row stores."},"RentalUpdate":{"properties":{"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"},"renter_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Full Name"},"renter_dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renter Dob"},"renter_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Phone"},"renter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Email"},"renter_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Address"},"renter_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter City"},"renter_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter State"},"renter_zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Zip"},"renter_emergency_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Emergency Name"},"renter_emergency_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renter Emergency Phone"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"license_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License State"},"license_expiration":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"License Expiration"},"license_endorsement_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"License Endorsement Verified"},"insurance_decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Decision"},"insurance_initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Initials"},"fleet_bike_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Fleet Bike Id"},"requested_bike_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Bike Type"},"expected_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Start Date"},"expected_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected End Date"},"mileage_out":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mileage Out"},"fuel_out":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fuel Out"}},"type":"object","title":"RentalUpdate","description":"Fields patchable on a rental draft.\n\nOnly draft-state rentals accept edits to renter-snapshot fields.\nStatus and transition fields are excluded — use the dedicated\ntransition endpoints (Task 11) for those operations.\n\n``enrollment_id`` may be set to a UUID to link the rental to a class\nenrollment, or explicitly set to ``None`` to clear an existing link."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest","description":"Reset token and new password."},"RiderClassResponse":{"properties":{"class_id":{"type":"string","format":"uuid","title":"Class Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"}},"type":"object","required":["class_id","class_type_name","starts_at","ends_at"],"title":"RiderClassResponse","description":"One class a found rider was on."},"RiderDrillResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"sort_order":{"type":"integer","title":"Sort Order"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"unlock_milestone_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock Milestone Key"}},"type":"object","required":["id","class_type_id","class_type_name","name","description","type","sort_order","image_url","video_url","unlock_milestone_key"],"title":"RiderDrillResponse","description":"A drill available to the rider."},"RiderEnrollmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_id":{"type":"string","format":"uuid","title":"Class Id"},"class_type_id":{"type":"string","format":"uuid","title":"Class Type Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"location_name":{"type":"string","title":"Location Name"},"location_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Address"},"location_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lat"},"location_lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Location Lng"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"status":{"type":"string","title":"Status"},"coaches":{"items":{"$ref":"#/components/schemas/ClassCoachItem"},"type":"array","title":"Coaches"}},"type":"object","required":["id","class_id","class_type_id","class_type_name","location_name","starts_at","ends_at","status","coaches"],"title":"RiderEnrollmentResponse","description":"A class the rider is enrolled in."},"RiderStatsResponse":{"properties":{"total_xp":{"type":"integer","title":"Total Xp"},"current_streak":{"type":"integer","title":"Current Streak"},"longest_streak":{"type":"integer","title":"Longest Streak"},"total_practices":{"type":"integer","title":"Total Practices"},"badges_earned":{"type":"integer","title":"Badges Earned"},"classes_completed":{"type":"integer","title":"Classes Completed"},"xp_delta_7d":{"type":"integer","title":"Xp Delta 7D"}},"type":"object","required":["total_xp","current_streak","longest_streak","total_practices","badges_earned","classes_completed","xp_delta_7d"],"title":"RiderStatsResponse","description":"XP, streak, and practice stats for the current rider."},"RosterWaiverItem":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"state":{"$ref":"#/components/schemas/WaiverState"},"documents":{"items":{"$ref":"#/components/schemas/WaiverDocumentResponse"},"type":"array","title":"Documents"}},"type":"object","required":["user_id","email","state","documents"],"title":"RosterWaiverItem","description":"One rider's waiver state on a class roster."},"RosterWaiverResponse":{"properties":{"crm_available":{"type":"boolean","title":"Crm Available"},"riders":{"items":{"$ref":"#/components/schemas/RosterWaiverItem"},"type":"array","title":"Riders"}},"type":"object","required":["crm_available","riders"],"title":"RosterWaiverResponse","description":"Waiver states for every rider on a class roster."},"SetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"SetPasswordRequest","description":"Invite token and chosen password for first-time setup."},"SignatureRequest":{"properties":{"staff_b64":{"type":"string","title":"Staff B64"},"renter_b64":{"type":"string","title":"Renter B64"},"geo_lat":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Geo Lat"},"geo_lon":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Geo Lon"}},"type":"object","required":["staff_b64","renter_b64"],"title":"SignatureRequest","description":"Request body for the signature capture endpoint."},"SignatureResponse":{"properties":{"staff_signature_url":{"type":"string","title":"Staff Signature Url"},"renter_signature_url":{"type":"string","title":"Renter Signature Url"},"signed_geo_lat":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Signed Geo Lat"},"signed_geo_lon":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Signed Geo Lon"},"signed_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Ip"},"signed_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed User Agent"}},"type":"object","required":["staff_signature_url","renter_signature_url","signed_geo_lat","signed_geo_lon","signed_ip","signed_user_agent"],"title":"SignatureResponse","description":"Stored signature URLs and the associated capture metadata."},"SignedUrlResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"signed":{"type":"boolean","title":"Signed"}},"type":"object","required":["url","expires_at","signed"],"title":"SignedUrlResponse","description":"A short-lived URL for an authenticated read of a ``legal/`` object.\n\n``signed`` is False only on the local development adapter, which has no\nsigning primitive. Callers can use it to tell a genuinely protected URL\nfrom a plain dev media URL instead of guessing from the string."},"TrainingRosterStatus":{"properties":{"webhook_set":{"type":"boolean","title":"Webhook Set"},"automatic":{"type":"boolean","title":"Automatic"},"lead_days":{"items":{"type":"integer"},"type":"array","title":"Lead Days"},"last_posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Posted At"},"next_post_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Post On"}},"type":"object","required":["webhook_set","automatic","lead_days","last_posted_at","next_post_on"],"title":"TrainingRosterStatus","description":"Whether the class can be posted to #training, and when it last was (#339)."},"UserAgreementResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agreement_id":{"type":"string","format":"uuid","title":"Agreement Id"},"accepted_at":{"type":"string","format":"date-time","title":"Accepted At"}},"type":"object","required":["id","agreement_id","accepted_at"],"title":"UserAgreementResponse","description":"Schema for a recorded agreement acceptance."},"UserAgreementStatusResponse":{"properties":{"agreement_id":{"type":"string","format":"uuid","title":"Agreement Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"version":{"type":"string","title":"Version"},"required":{"type":"boolean","title":"Required"},"active":{"type":"boolean","title":"Active"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"}},"type":"object","required":["agreement_id","name","type","version","required","active"],"title":"UserAgreementStatusResponse","description":"Agreement with the user's acceptance status for admin views."},"UserBadgeAwardResponse":{"properties":{"badge_id":{"type":"string","format":"uuid","title":"Badge Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"category":{"type":"string","title":"Category"},"awarded_at":{"type":"string","format":"date-time","title":"Awarded At"}},"type":"object","required":["badge_id","name","icon","category","awarded_at"],"title":"UserBadgeAwardResponse","description":"A badge award entry for a specific user.\n\nAttributes:\n    badge_id:   UUID of the badge.\n    name:       Display name of the badge.\n    icon:       Icon path or identifier for the badge image.\n    category:   Badge category (e.g. \"level\", \"practice\", \"gear\").\n    awarded_at: Timestamp when the badge was awarded."},"UserCreate":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"send_invite":{"type":"boolean","title":"Send Invite","default":true}},"type":"object","required":["first_name","last_name","email","phone"],"title":"UserCreate","description":"Schema for creating a new user.\n\nThe admin portal sends this when onboarding a person. The API\ncreates a local user row and generates an invite token."},"UserCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"medical_info":{"additionalProperties":true,"type":"object","title":"Medical Info","default":{}},"dietary_info":{"additionalProperties":true,"type":"object","title":"Dietary Info","default":{}},"email_opt_outs":{"items":{"type":"string"},"type":"array","title":"Email Opt Outs"},"marketing_opt_out":{"type":"boolean","title":"Marketing Opt Out","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"active_roles":{"items":{"type":"string"},"type":"array","title":"Active Roles"},"is_coach":{"type":"boolean","title":"Is Coach"},"locked_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked Until"},"invite_emailed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Invite Emailed"}},"type":"object","required":["id","first_name","last_name","email","phone","city","state","country","occupation","goals","personal_goal","emergency_contact_name","emergency_contact_phone","avatar_url","deactivated_at","created_at","updated_at","active_roles","is_coach"],"title":"UserCreateResponse","description":"Result of creating a user, including whether the invite was sent.\n\nCreation and notification can succeed independently: a user is still\ncreated if the email provider is down. ``invite_emailed`` lets the\ncaller say which happened instead of assuming, so the admin portal\nnever reports an invite that did not go out.\n\n``None`` means no invite was requested."},"UserDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"medical_info":{"additionalProperties":true,"type":"object","title":"Medical Info","default":{}},"dietary_info":{"additionalProperties":true,"type":"object","title":"Dietary Info","default":{}},"email_opt_outs":{"items":{"type":"string"},"type":"array","title":"Email Opt Outs"},"marketing_opt_out":{"type":"boolean","title":"Marketing Opt Out","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"active_roles":{"items":{"type":"string"},"type":"array","title":"Active Roles"},"is_coach":{"type":"boolean","title":"Is Coach"},"locked_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked Until"}},"type":"object","required":["id","first_name","last_name","email","phone","city","state","country","occupation","goals","personal_goal","emergency_contact_name","emergency_contact_phone","avatar_url","deactivated_at","created_at","updated_at","active_roles","is_coach"],"title":"UserDetailResponse","description":"Extended user response with role assignments and coach profile flag."},"UserEmailUpdate":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"UserEmailUpdate","description":"Schema for changing a user's email address."},"UserEnrollmentItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"class_type_name":{"type":"string","title":"Class Type Name"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"location_name":{"type":"string","title":"Location Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","class_type_name","level","starts_at","ends_at","location_name","status"],"title":"UserEnrollmentItem","description":"One class enrollment for a user, surfaced for rental linking."},"UserEnrollmentsResponse":{"properties":{"classes":{"items":{"$ref":"#/components/schemas/RiderEnrollmentResponse"},"type":"array","title":"Classes"},"tours":{"items":{"$ref":"#/components/schemas/UserTourEnrollmentItem"},"type":"array","title":"Tours"}},"type":"object","required":["classes","tours"],"title":"UserEnrollmentsResponse","description":"Everything a user is (or was) signed up for — classes and tours."},"UserListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"medical_info":{"additionalProperties":true,"type":"object","title":"Medical Info","default":{}},"dietary_info":{"additionalProperties":true,"type":"object","title":"Dietary Info","default":{}},"email_opt_outs":{"items":{"type":"string"},"type":"array","title":"Email Opt Outs"},"marketing_opt_out":{"type":"boolean","title":"Marketing Opt Out","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"active_roles":{"items":{"type":"string"},"type":"array","title":"Active Roles"},"agreements_complete":{"type":"boolean","title":"Agreements Complete"},"account_status":{"type":"string","title":"Account Status"},"password_status":{"type":"string","title":"Password Status"}},"type":"object","required":["id","first_name","last_name","email","phone","city","state","country","occupation","goals","personal_goal","emergency_contact_name","emergency_contact_phone","avatar_url","deactivated_at","created_at","updated_at","active_roles","agreements_complete","account_status","password_status"],"title":"UserListItem","description":"User list row with active role assignments for quick display."},"UserRentalSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"bike_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bike Identifier"},"bike_make":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bike Make"},"bike_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bike Model"},"bike_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bike Year"},"expected_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Start Date"},"expected_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected End Date"},"checked_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked Out At"},"checked_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked In At"},"damage_observed":{"type":"boolean","title":"Damage Observed"},"damage_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Severity"},"damage_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damage Description"}},"type":"object","required":["id","status","bike_identifier","bike_make","bike_model","bike_year","expected_start_date","expected_end_date","checked_out_at","checked_in_at","damage_observed","damage_severity","damage_description"],"title":"UserRentalSummary","description":"One past rental of a user, for the admin user detail screen.\n\nBike identity is flattened from the linked fleet bike so the admin\nlist renders without a second fetch. Bike fields are null for\nrentals that never had a bike assigned (drafts, cancellations)."},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"medical_info":{"additionalProperties":true,"type":"object","title":"Medical Info","default":{}},"dietary_info":{"additionalProperties":true,"type":"object","title":"Dietary Info","default":{}},"email_opt_outs":{"items":{"type":"string"},"type":"array","title":"Email Opt Outs"},"marketing_opt_out":{"type":"boolean","title":"Marketing Opt Out","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","first_name","last_name","email","phone","city","state","country","occupation","goals","personal_goal","emergency_contact_name","emergency_contact_phone","avatar_url","deactivated_at","created_at","updated_at"],"title":"UserResponse","description":"Schema for user data returned by the API.\n\n``medical_info`` is populated only when a user reads their own\nrecord. Admin-facing endpoints redact it to an empty object; admins\nreach the detail through the audited medical reveal endpoint.\n\n``dietary_info`` is not sensitive and is never redacted — kitchen\nstaff read it straight off the admin user detail.\n\n``email_opt_outs`` lists the category keys the rider declined; the\ncategories themselves come from the ``email_categories`` app_config\nkey. ``marketing_opt_out`` is derived from that list and kept for\nthe admin marketing panel, which predates categories."},"UserSearchResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"}},"type":"object","required":["id","full_name","email","phone"],"title":"UserSearchResult","description":"A single hit from the user picker search."},"UserTourEnrollmentItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tour_id":{"type":"string","format":"uuid","title":"Tour Id"},"tour_name":{"type":"string","title":"Tour Name"},"location_name":{"type":"string","title":"Location Name"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","tour_id","tour_name","location_name","start_date","end_date","status"],"title":"UserTourEnrollmentItem","description":"A user's tour enrollment for the admin detail view."},"UserUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"goals":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Goals"},"personal_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Personal Goal"},"emergency_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Name"},"emergency_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emergency Contact Phone"},"medical_info":{"anyOf":[{"$ref":"#/components/schemas/MedicalInfo"},{"type":"null"}]},"marketing_opt_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Opt Out"}},"type":"object","title":"UserUpdate","description":"Schema for updating user profile fields.\n\nOnly fields provided in the request are updated. Email is not\nupdatable via this endpoint — use PATCH /users/{id}/email."},"ValidateInviteRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"ValidateInviteRequest","description":"Invite token to validate before showing the password form."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaiverAcceptanceItem":{"properties":{"clause_key":{"type":"string","title":"Clause Key"},"clause_version":{"type":"string","title":"Clause Version"},"initials":{"type":"string","title":"Initials"}},"type":"object","required":["clause_key","clause_version","initials"],"title":"WaiverAcceptanceItem","description":"One waiver-clause acceptance -- clause key + version + typed initials."},"WaiverAcceptanceRequest":{"properties":{"acceptances":{"items":{"$ref":"#/components/schemas/WaiverAcceptanceItem"},"type":"array","title":"Acceptances"}},"type":"object","required":["acceptances"],"title":"WaiverAcceptanceRequest","description":"POST body for replacing all acceptances on a rental."},"WaiverClauseCreate":{"properties":{"clause_key":{"type":"string","title":"Clause Key"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["clause_key","title","body","sort_order"],"title":"WaiverClauseCreate","description":"Fields required to create a new waiver clause."},"WaiverClauseResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"clause_key":{"type":"string","title":"Clause Key"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"sort_order":{"type":"integer","title":"Sort Order"},"version":{"type":"string","title":"Version"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","clause_key","title","body","sort_order","version","active","created_at","updated_at"],"title":"WaiverClauseResponse","description":"A versioned waiver clause, as returned by the API."},"WaiverClauseUpdate":{"properties":{"clause_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clause Key"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"WaiverClauseUpdate","description":"Patchable waiver clause fields. Submitting any field creates a new version."},"WaiverDocumentResponse":{"properties":{"document_type":{"type":"string","title":"Document Type"},"state":{"$ref":"#/components/schemas/WaiverState"},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["document_type","state","signed_at","sent_at"],"title":"WaiverDocumentResponse","description":"One legal document on file for a rider, as an indicator only."},"WaiverState":{"type":"string","enum":["signed","sent","missing"],"title":"WaiverState","description":"How far a rider's waiver has got in the CRM.\n\n``MISSING`` is the loud one: no contract row exists for the rider at\nall, so nobody has even sent them a document to sign."},"WaiverStatusResponse":{"properties":{"crm_available":{"type":"boolean","title":"Crm Available"},"state":{"anyOf":[{"$ref":"#/components/schemas/WaiverState"},{"type":"null"}]},"documents":{"items":{"$ref":"#/components/schemas/WaiverDocumentResponse"},"type":"array","title":"Documents"}},"type":"object","required":["crm_available","state","documents"],"title":"WaiverStatusResponse","description":"A rider's waiver standing, with the documents behind it.\n\n``crm_available`` is false when the CRM could not be read. Screens\nmust say \"unknown\" in that case rather than implying nothing was\never sent."},"WeatherResponse":{"properties":{"location_name":{"type":"string","title":"Location Name"},"temp_f":{"type":"integer","title":"Temp F"},"condition":{"type":"string","title":"Condition"},"icon":{"type":"string","title":"Icon"},"humidity":{"type":"integer","title":"Humidity"},"wind_mph":{"type":"integer","title":"Wind Mph"},"forecast":{"items":{"$ref":"#/components/schemas/ForecastPeriod"},"type":"array","title":"Forecast"}},"type":"object","required":["location_name","temp_f","condition","icon","humidity","wind_mph","forecast"],"title":"WeatherResponse","description":"Current weather at a location with 3-day forecast."},"XpRuleCreate":{"properties":{"trigger":{"type":"string","title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"xp_value":{"type":"integer","title":"Xp Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["trigger","xp_value"],"title":"XpRuleCreate","description":"Schema for creating an XP rule."},"XpRuleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trigger":{"type":"string","title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"xp_value":{"type":"integer","title":"Xp Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","trigger","reference_type","reference_id","xp_value","description","created_at","updated_at"],"title":"XpRuleResponse","description":"Schema for XP rule data returned by the API."},"XpRuleUpdate":{"properties":{"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reference Id"},"xp_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xp Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"XpRuleUpdate","description":"Schema for updating an XP rule's editable fields."},"src__routers__rental__UploadResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"UploadResponse","description":"Upload result containing the stored file's URL.\n\nNot always a public URL: the baseline-photo call site resolves with\n``url_for`` (public), but the four legal upload call sites -- license\nphotos, walk-around photos, damage photos, signatures -- resolve with\n``signed_url_for`` instead, since those objects live in the private\nbucket and have no public URL to return."},"src__routers__rider__LocationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","address","lat","lng","phone","description"],"title":"LocationResponse","description":"A training location visible to riders."},"src__routers__uploads__UploadResponse":{"properties":{"url":{"type":"string","title":"Url"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}},"type":"object","required":["url"],"title":"UploadResponse","description":"Typed response body for upload endpoints.\n\n``url`` is for immediate display. ``path`` is the backend-agnostic\nreference callers persist, so stored rows survive a storage backend\nswap."},"src__schemas__location__LocationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"timezone":{"type":"string","title":"Timezone"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","address","lat","lng","timezone","phone","description","created_at","updated_at"],"title":"LocationResponse","description":"Schema for location data returned by the API."},"src__schemas__response__ApiResponse_UploadResponse___1":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/src__routers__uploads__UploadResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UploadResponse]"},"src__schemas__response__ApiResponse_UploadResponse___2":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/src__routers__rental__UploadResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[UploadResponse]"},"src__schemas__response__ApiResponse_list_LocationResponse____1":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/src__schemas__location__LocationResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[LocationResponse]]"},"src__schemas__response__ApiResponse_list_LocationResponse____2":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/src__routers__rider__LocationResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ApiResponse[list[LocationResponse]]"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}