{"openapi":"3.0.0","paths":{"/api/auth/register":{"post":{"operationId":"AuthController_register","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"error: username_taken, email_taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create an account (Register screen)","tags":["Auth"]}},"/api/auth/login":{"post":{"operationId":"AuthController_login","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: invalid_credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Log in with email or username (Login screen)","tags":["Auth"]}},"/api/auth/username-available":{"get":{"description":"With a token, your own current username counts as available.","operationId":"AuthController_usernameAvailable","parameters":[{"name":"username","required":true,"in":"query","schema":{"example":"eva","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameAvailability"}}}}},"summary":"Check a username while typing (Register / Edit profile)","tags":["Auth"]}},"/api/auth/forgot-password":{"post":{"description":"Always answers `{ ok: true }` so it doesn’t reveal whether the email exists. The code is valid for 15 minutes; a new code can be requested after 60 s. In development (`EXPOSE_DEV_CODES=true`) the response contains `devCode`.","operationId":"AuthController_forgotPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"error: too_many_attempts (has retryAfterSeconds), too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Email a 6-digit reset code (Forgot password screen)","tags":["Auth"]}},"/api/auth/reset-password":{"post":{"description":"After 5 wrong codes the code is blocked — request a new one. Logs out every device.","operationId":"AuthController_resetPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"error: validation_error, invalid_code (has attemptsLeft), code_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"429":{"description":"error: too_many_attempts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Set a new password with the code (Reset password screen)","tags":["Auth"]}},"/api/auth/change-password":{"post":{"description":"Returns a fresh token for this device; every older token (other devices too) stops working.","operationId":"AuthController_changePassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: invalid_credentials (wrong current password), unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Change password while logged in (Profile → Change password)","tags":["Auth"]}},"/api/auth/logout":{"post":{"operationId":"AuthController_logout","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Log out this device (the token stops working)","tags":["Auth"]}},"/api/rooms/journey":{"post":{"description":"Start, up to 7 transit/rest stops, finish. You become the host. The room gets a 6-character code (0-9, A-Z) and a join link for the QR.","operationId":"RoomsController_createJourney","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJourneyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: schedule_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleConflictResponse"}}}}},"security":[{"bearer":[]}],"summary":"Create a journey (New event → Route → Create room)","tags":["Rooms"]}},"/api/rooms/monitoring":{"post":{"description":"No route. `endsAt` null = unlimited (runs until the host ends it). Optional meeting point.","operationId":"RoomsController_createMonitoring","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMonitoringDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: schedule_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleConflictResponse"}}}}},"security":[{"bearer":[]}],"summary":"Create a monitoring event (New event → Duration → Create room)","tags":["Rooms"]}},"/api/rooms":{"post":{"description":"Same as POST /rooms/journey or /rooms/monitoring, chosen by `type`.","operationId":"RoomsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/CreateJourneyDto"},{"properties":{"type":{"enum":["journey"]}}}]},{"allOf":[{"$ref":"#/components/schemas/CreateMonitoringDto"},{"properties":{"type":{"enum":["monitoring"]}}}]}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: schedule_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleConflictResponse"}}}}},"security":[{"bearer":[]}],"summary":"Create a room with `type` in the body (rutemu contract)","tags":["Rooms"]}},"/api/rooms/code/{code}":{"get":{"description":"Case-insensitive; spaces and dashes are ignored. `conflict` is your overlapping room, if any — show the “You can’t join this one” screen.","operationId":"RoomsController_preview","parameters":[{"name":"code","required":true,"in":"path","schema":{"example":"4KD9WP","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomPreviewResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"error: room_ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Look up a room by code, QR or link (Join preview / conflict screens)","tags":["Rooms"]}},"/api/rooms/code/{code}/join":{"post":{"description":"Joining a room you are already in just returns it. Re-joining after leaving a live room is allowed.","operationId":"RoomsController_join","parameters":[{"name":"code","required":true,"in":"path","schema":{"example":"4KD9WP","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRoomDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: removed_from_room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: schedule_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleConflictResponse"}}}},"410":{"description":"error: room_ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Join as a guest (Join as guest button)","tags":["Rooms"]}},"/api/rooms/{id}":{"get":{"description":"For anyone who is or was in the room.","operationId":"RoomsController_get","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden, removed_from_room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Room detail (lobby, live map)","tags":["Rooms"]},"patch":{"description":"`title` and `guestsCanTalk` any time before the end. Time, stops, route and meeting point only while scheduled; everyone in the room must still be free at the new time.","operationId":"RoomsController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoomDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state, schedule_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleConflictResponse"}}}}},"security":[{"bearer":[]}],"summary":"Edit a room (host)","tags":["Rooms"]},"delete":{"operationId":"RoomsController_cancel","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Cancel a scheduled room (host, Room options → Cancel event)","tags":["Rooms"]}},"/api/rooms/{id}/start":{"post":{"description":"Everyone subscribed gets `room:updated` with status `live`. 409 `other_room_live` has `conflict`.","operationId":"RoomsController_start","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state, other_room_live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Start tracking (host, lobby → live map)","tags":["Rooms"]}},"/api/rooms/{id}/end":{"post":{"description":"Ending a scheduled room cancels it (`room` is then null and `room:deleted` is sent).","operationId":"RoomsController_end","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"properties":{"room":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Room"}]}}}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"End the event for everyone (host)","tags":["Rooms"]}},"/api/rooms/{id}/leave":{"post":{"description":"Before the start this removes you entirely. While live it stops your tracking and the event goes to your History.","operationId":"RoomsController_leave","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: host_cannot_leave, invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Leave the room (guest)","tags":["Rooms"]}},"/api/rooms/{id}/members/{userId}":{"patch":{"operationId":"RoomsController_setMic","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberMicDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Turn a guest’s mic off / let them talk (host)","tags":["Rooms"]},"delete":{"description":"They get `member:removed` and can’t join this room again.","operationId":"RoomsController_removeMember","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Remove a guest from the room (host)","tags":["Rooms"]}},"/api/rooms/{id}/mute-all":{"post":{"operationId":"RoomsController_muteAll","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Mute all guests (host, People & voice → Mute all)","tags":["Rooms"]}},"/api/rooms/{id}/locations":{"post":{"description":"Same rules as the socket `location:update`. Use it when the socket is down or to flush fixes collected in the background.","operationId":"RoomsController_locations","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationBatchDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationBatchResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: invalid_state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Send positions over HTTP (fallback / background)","tags":["Rooms"]}},"/api/rooms/{id}/tracks":{"get":{"operationId":"RoomsController_tracks","parameters":[{"name":"id","required":true,"in":"path","description":"Room id","schema":{"format":"uuid","type":"string"}},{"name":"since","required":false,"in":"query","description":"Only points recorded after this time.","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracksResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Trails of everyone in the room (monitoring map, Show trails)","tags":["Rooms"]}},"/api/me/points":{"get":{"description":"Points have 2 decimals. You earn them when an event you were in ends (1 for taking part, plus distance × 60 % and duration × 40 %, see `rules`) and when a friend uses your code (+10). History is newest first; `direction` filters earned (in) or spent (out).","operationId":"PointsController_history","parameters":[{"name":"direction","required":false,"in":"query","description":"in = earned only, out = spent only.","schema":{"type":"string","enum":["in","out"]}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":30,"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointHistoryResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your points: balance and history (Profile → Points)","tags":["Points"]}},"/api/community-categories":{"get":{"description":"Managed in the database (`community_categories`); users can’t add their own.","operationId":"CommunityCategoriesController_list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityCategoryListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Categories to pick from (Create community)","tags":["Communities"]}},"/api/communities":{"get":{"description":"Members first (alphabetical), then pending requests (`myStatus: pending`, newest first).","operationId":"CommunitiesController_list","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your communities and your waiting join requests (Community tab)","tags":["Communities"]},"post":{"description":"You become its leader. It gets a 4-character code and a join link for the QR, plus two positions: Leader and Vice Leader (both can approve requests). Upload the picture afterwards with PUT …/image.","operationId":"CommunitiesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Create a community","tags":["Communities"]}},"/api/communities/search":{"get":{"description":"`q`: part of the name or description, or the exact 4-character code. `lat` + `lng`: only communities whose home base is within 10 km, nearest first, with `distanceMeters`. Both: text matches within 10 km. Public and private communities, yours included; at most 30. Join one with POST /communities/:id/join.","operationId":"CommunitiesController_search","parameters":[{"name":"q","required":false,"in":"query","description":"Part of the name or description, or the exact 4-character code.","schema":{"minLength":2,"maxLength":80,"example":"riders","type":"string"}},{"name":"lat","required":false,"in":"query","description":"Your position, with `lng`: only home bases within 10 km.","schema":{"example":-6.2,"type":"number"}},{"name":"lng","required":false,"in":"query","schema":{"example":106.82,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunitySearchResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Find communities by name, description or code, or near you (Community → Search)","tags":["Communities"]}},"/api/communities/code/{code}":{"get":{"operationId":"CommunitiesController_preview","parameters":[{"name":"code","required":true,"in":"path","description":"4 characters (0-9, A-Z); case, spaces and dashes are ignored.","schema":{"example":"SR48","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPreviewResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Look up a community by code or QR (Join preview)","tags":["Communities"]}},"/api/communities/code/{code}/join":{"post":{"description":"Public: you are a member right away (`status: joined`). Private: a join request the leader or a manager approves (`status: requested`; managers get socket `community:requests`). Already a member: joined.","operationId":"CommunitiesController_join","parameters":[{"name":"code","required":true,"in":"path","description":"4 characters (0-9, A-Z); case, spaces and dashes are ignored.","schema":{"example":"SR48","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinCommunityDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityJoinResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Join (public) or ask to join (private)","tags":["Communities"]}},"/api/communities/{id}/join":{"post":{"description":"Same as POST /communities/code/:code/join, for a search result (non-members don’t see the code). The join method is recorded as `search`.","operationId":"CommunitiesController_joinById","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityJoinResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"error: too_many_requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Join (public) or ask to join (private) a community found with search","tags":["Communities"]}},"/api/communities/{id}":{"get":{"description":"Members see everything. With a pending request you get the summary (`myStatus: pending`).","operationId":"CommunitiesController_get","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Community detail","tags":["Communities"]},"patch":{"operationId":"CommunitiesController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Edit the community (managers)","tags":["Communities"]},"delete":{"description":"Its upcoming events are cancelled; ended ones stay in everyone’s history. Refused while one is live.","operationId":"CommunitiesController_remove","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: community_has_live_event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Delete the community (leader)","tags":["Communities"]}},"/api/communities/{id}/image":{"put":{"description":"multipart/form-data with one `file` field (JPEG, PNG, WebP…, up to 8 MB). Cropped square.","operationId":"CommunitiesController_uploadImage","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: invalid_image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"error: payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Set the community picture (managers)","tags":["Communities"]},"delete":{"operationId":"CommunitiesController_removeImage","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Remove the community picture (managers)","tags":["Communities"]}},"/api/communities/{id}/code/regenerate":{"post":{"operationId":"CommunitiesController_regenerateCode","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"New code and QR (managers) — the old ones stop working","tags":["Communities"]}},"/api/communities/{id}/leave":{"post":{"description":"You also drop out of its upcoming events. The leader must hand over leadership first.","operationId":"CommunitiesController_leave","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: not_community_member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: leader_cannot_leave","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Leave the community","tags":["Communities"]}},"/api/communities/{id}/transfer":{"post":{"description":"You take over their previous position (a swap).","operationId":"CommunitiesController_transfer","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferLeadershipDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Hand the leadership to another member (leader)","tags":["Communities"]}},"/api/communities/{id}/members":{"get":{"description":"Leader first, then by position rank, then by name. `stats.community` counts this community’s events, `stats.overall` every event the member joined.","operationId":"CommunitiesController_members","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMembersResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: not_community_member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Members with positions and activity (Community detail → Members)","tags":["Communities"]}},"/api/communities/{id}/members/{userId}":{"patch":{"description":"Only the leader hands out or takes back positions that can manage.","operationId":"CommunitiesController_setPosition","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPositionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMembersResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: leader_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Give a member a position, or none (managers)","tags":["Communities"]},"delete":{"description":"They get socket `community:removed` and drop out of its upcoming events. Not the leader.","operationId":"CommunitiesController_removeMember","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMembersResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: leader_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Remove a member (managers)","tags":["Communities"]}},"/api/communities/{id}/positions":{"post":{"operationId":"CommunitiesController_createPosition","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePositionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Add a position (managers; only the leader can make one that manages)","tags":["Communities"]}},"/api/communities/{id}/positions/order":{"put":{"operationId":"CommunitiesController_reorderPositions","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderPositionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Reorder positions (managers) — the leader’s stays first","tags":["Communities"]}},"/api/communities/{id}/positions/{positionId}":{"patch":{"operationId":"CommunitiesController_updatePosition","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"positionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePositionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Rename a position or change whether it manages (managers)","tags":["Communities"]},"delete":{"operationId":"CommunitiesController_deletePosition","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"positionId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: leader_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Delete a position (managers) — its holders keep their membership","tags":["Communities"]}},"/api/communities/{id}/requests":{"get":{"operationId":"CommunitiesController_requests","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequestListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Waiting join requests (managers)","tags":["Communities"]}},"/api/communities/{id}/requests/{requestId}/approve":{"post":{"description":"The person becomes a member and gets socket `community:approved`. Returns the requests still waiting.","operationId":"CommunitiesController_approve","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"requestId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequestListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Approve a join request (managers)","tags":["Communities"]}},"/api/communities/{id}/requests/{requestId}/reject":{"post":{"operationId":"CommunitiesController_reject","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}},{"name":"requestId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequestListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Turn down a join request (managers)","tags":["Communities"]}},"/api/communities/{id}/request":{"delete":{"operationId":"CommunitiesController_cancelRequest","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Withdraw your own waiting request","tags":["Communities"]}},"/api/communities/{id}/events":{"get":{"description":"All upcoming and live events; past ones only if you took part (were in the room while it was live). Create one with `communityId` on POST /rooms/journey or /rooms/monitoring.","operationId":"CommunitiesController_events","parameters":[{"name":"id","required":true,"in":"path","description":"Community id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityEventsResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"error: not_community_member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"The community’s events (Community detail → Events)","tags":["Communities"]}},"/api/me":{"get":{"operationId":"MeController_get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your profile (Profile screen)","tags":["Me"]},"patch":{"operationId":"MeController_update","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: username_taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Edit name, username, avatar colour or language (Edit profile, language switch)","tags":["Me"]}},"/api/me/referral":{"post":{"description":"Typed, or scanned from their referral QR (`…/u/<code>`). Saved as your `refCode`; it can be set only once.","operationId":"MeController_applyReferral","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyReferralDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"error: validation_error, referral_own_code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"error: referral_already_set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Apply a friend’s referral code (Profile → Your code)","tags":["Me"]}},"/api/me/avatar":{"put":{"description":"multipart/form-data with one `file` field (JPEG, PNG, WebP…, up to 8 MB). The photo is cropped to a centred square and stored as 512 px and 160 px WebP without metadata. Replaces the previous photo. The photo URLs need no token.","operationId":"MeController_uploadAvatar","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"error: invalid_image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"error: payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Set your profile photo (Edit profile → tap the avatar)","tags":["Me"]},"delete":{"operationId":"MeController_removeAvatar","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Remove your profile photo (back to initials)","tags":["Me"]}},"/api/me/stats":{"get":{"operationId":"MeController_stats","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your activity: events, hosted/joined, distance, tracking time (Home, History)","tags":["Me"]}},"/api/me/rooms":{"get":{"description":"Live first, then by start time.","operationId":"MeController_rooms","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomListResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your scheduled and live rooms (Home: LIVE NOW, NEXT UP)","tags":["Me"]}},"/api/me/calendar":{"get":{"description":"Only rooms you are still in, as host or guest (rooms you left or were removed from are left out). Any status but cancelled (ended rooms link to History). Range up to 400 days. Send local month boundaries as UTC.","operationId":"MeController_calendar","parameters":[{"name":"from","required":true,"in":"query","description":"Start of the range (inclusive).","schema":{"format":"date-time","example":"2026-10-31T17:00:00.000Z","type":"string"}},{"name":"to","required":true,"in":"query","description":"End of the range (exclusive).","schema":{"format":"date-time","example":"2026-11-30T17:00:00.000Z","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomListResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Your rooms in a date range (Home calendar)","tags":["Me"]}},"/api/me/availability":{"get":{"description":"Checks the overlap rule without creating anything.","operationId":"MeController_availability","parameters":[{"name":"startsAt","required":true,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endsAt","required":false,"in":"query","description":"Omit for an unlimited monitoring event.","schema":{"format":"date-time","type":"string"}},{"name":"excludeRoomId","required":false,"in":"query","description":"Ignore this room (when editing it).","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Is a time free? (New event: “No overlap with your other events”)","tags":["Me"]}},"/api/me/history":{"get":{"description":"Rooms that went live and are over for you (ended, or you left while live). Newest first.","operationId":"MeController_history","parameters":[{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["journey","monitoring"]}},{"name":"role","required":false,"in":"query","schema":{"type":"string","enum":["host","guest"]}},{"name":"q","required":false,"in":"query","description":"Search by event name or room code.","schema":{"maxLength":80,"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":50,"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryListResponse"}}}},"400":{"description":"error: validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"Finished events (History list with filters and search)","tags":["Me"]}},"/api/me/history/{roomId}":{"get":{"description":"Guests see their own timeline entries plus start and end; the host sees everything.","operationId":"MeController_historyDetail","parameters":[{"name":"roomId","required":true,"in":"path","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryDetail"}}}},"401":{"description":"error: unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"error: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"summary":"One finished event (History detail: map, stats, people, timeline)","tags":["Me"]}},"/api/health":{"get":{"operationId":"HealthController_health","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"summary":"Is the API up? (`turn` tells whether a voice relay is configured)","tags":["Health"]}}},"info":{"title":"Rutemu API","description":"REST API of the Rutemu app — group live location for **journeys** and **monitoring** events.\n\n* All paths start with `/api`. JSON in camelCase; times are ISO-8601 in UTC.\n* Authenticated calls send `Authorization: Bearer <token>` (from login / register).\n* Errors: `{ \"error\": \"<code>\", \"message\": \"<text>\" }` — `message` follows `Accept-Language` (`id` or `en`).\n* Realtime (Socket.IO) events and the screen-by-screen guide: **[/guide](/guide)**.","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"http://localhost:4002"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"RegisterDto":{"type":"object","properties":{"displayName":{"type":"string","example":"Angga Nugraha","maxLength":80},"username":{"type":"string","example":"angganu","description":"3–20 chars: a–z 0–9 . _ (stored lowercase)"},"email":{"type":"string","example":"angga@example.com"},"password":{"type":"string","example":"gather-2026!","description":"8+ characters with a number and a symbol"},"language":{"type":"string","enum":["id","us"],"description":"Defaults to the Accept-Language header."}},"required":["displayName","username","email","password"]},"PointBalance":{"type":"object","properties":{"total":{"type":"number","example":128.45,"description":"Every point you ever earned (2 decimals)."},"used":{"type":"number","example":20,"description":"Points you spent."},"current":{"type":"number","example":108.45,"description":"total − used: what you can spend."}},"required":["total","used","current"]},"Me":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11"},"username":{"type":"string","example":"eva","description":"Lowercase, shown on map markers."},"displayName":{"type":"string","example":"Eva Wahyuni"},"avatarColor":{"type":"string","example":"#0B7F86","description":"Avatar / trail colour (also the ring around the photo)."},"avatarUrl":{"type":"string","nullable":true,"example":"/media/avatars/5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11-9f2c4e1a.webp","description":"Profile photo, 512 × 512 WebP. Path on the API host; null = show initials."},"avatarThumbUrl":{"type":"string","nullable":true,"example":"/media/avatars/5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11-9f2c4e1a-thumb.webp","description":"Same photo, 160 × 160, for map markers and lists."},"code":{"type":"string","example":"K7Q2M","description":"Your 5-character code (0-9, A-Z), given at sign-up. Friends enter it as their referral code."},"referralUrl":{"type":"string","example":"https://app.rutemu.com/u/K7Q2M","description":"Encoded in your referral QR."},"refCode":{"type":"string","nullable":true,"example":null,"description":"The referral code you applied (POST /me/referral). Null = none yet; it can be set once."},"email":{"type":"string","example":"angga@example.com"},"language":{"type":"string","enum":["id","us"],"example":"id","description":"App language: id (Indonesian) or us (English)."},"createdAt":{"type":"string","format":"date-time"},"points":{"description":"Your points (Profile → Points).","allOf":[{"$ref":"#/components/schemas/PointBalance"}]}},"required":["id","username","displayName","avatarColor","avatarUrl","avatarThumbUrl","code","referralUrl","refCode","email","language","createdAt","points"]},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","description":"JWT — send as `Authorization: Bearer <token>`."},"expiresAt":{"type":"string","format":"date-time","description":"When this login expires."},"user":{"$ref":"#/components/schemas/Me"}},"required":["token","expiresAt","user"]},"ValidationErrorResponse":{"type":"object","properties":{"error":{"type":"string","example":"not_found","description":"Stable machine-readable code."},"message":{"type":"string","example":"Not found.","description":"Text in the request’s Accept-Language (id / en)."},"fields":{"type":"object","additionalProperties":{"type":"string"},"example":{"username":"invalid_username","password":"weak_password","stops.1.name":"required"}}},"required":["error","message","fields"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","example":"not_found","description":"Stable machine-readable code."},"message":{"type":"string","example":"Not found.","description":"Text in the request’s Accept-Language (id / en)."}},"required":["error","message"]},"LoginDto":{"type":"object","properties":{"identifier":{"type":"string","example":"angganu","description":"Email or username"},"password":{"type":"string","example":"gather-2026!"}},"required":["identifier","password"]},"UsernameAvailability":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["taken","invalid"]}},"required":["available"]},"ForgotPasswordDto":{"type":"object","properties":{"email":{"type":"string","example":"angga@example.com"}},"required":["email"]},"ForgotPasswordResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"devCode":{"type":"string","example":"482917","description":"Only when EXPOSE_DEV_CODES=true (development)."}},"required":["ok"]},"ResetPasswordDto":{"type":"object","properties":{"email":{"type":"string","example":"angga@example.com"},"code":{"type":"string","example":"482917","description":"The 6-digit code from the email"},"newPassword":{"type":"string","example":"new-pass-2026!"}},"required":["email","code","newPassword"]},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":true}},"required":["ok"]},"ChangePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string","example":"gather-2026!"},"newPassword":{"type":"string","example":"new-pass-2026!"}},"required":["currentPassword","newPassword"]},"TokenResponse":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["token","expiresAt"]},"StopInput":{"type":"object","properties":{"kind":{"type":"string","enum":["start","transit","rest","finish"],"example":"rest"},"name":{"type":"string","example":"Rest Area KM 57","maxLength":120},"address":{"type":"string","nullable":true,"example":"Tol Jakarta–Cikampek","maxLength":255},"lat":{"type":"number","example":-6.3313},"lng":{"type":"number","example":107.1564},"restMinutes":{"type":"number","nullable":true,"example":20,"description":"Required for `rest` stops (1–240)."}},"required":["kind","name","lat","lng"]},"CreateJourneyDto":{"type":"object","properties":{"title":{"type":"string","example":"Jakarta → Bandung Ride","maxLength":80},"startsAt":{"type":"string","format":"date-time","example":"2026-11-07T23:00:00.000Z"},"guestsCanTalk":{"type":"boolean","default":true,"description":"New guests may talk; the host can mute anyone later."},"communityId":{"type":"string","format":"uuid","nullable":true,"description":"Make it an event of one of your communities: only its members can join (QR or code from anyone else is refused)."},"endsAt":{"type":"string","format":"date-time","example":"2026-11-08T07:00:00.000Z","description":"Required for journeys."},"stops":{"description":"First `start`, last `finish`, up to 7 `transit`/`rest` stops in between.","type":"array","items":{"$ref":"#/components/schemas/StopInput"}},"routeDistanceMeters":{"type":"object","example":152000,"description":"Route length from Google Routes."},"routeDurationSeconds":{"type":"object","example":13320,"description":"Driving time from Google Routes."},"routePolyline":{"type":"object","description":"Encoded polyline of the route (Google format)."}},"required":["title","startsAt","endsAt","stops"]},"PlaceInput":{"type":"object","properties":{"name":{"type":"string","example":"Gate","maxLength":120},"address":{"type":"string","nullable":true,"example":"Pintu Gerbang Ancol","maxLength":255},"lat":{"type":"number","example":-6.1251},"lng":{"type":"number","example":106.8411}},"required":["name","lat","lng"]},"CreateMonitoringDto":{"type":"object","properties":{"title":{"type":"string","example":"Jakarta → Bandung Ride","maxLength":80},"startsAt":{"type":"string","format":"date-time","example":"2026-11-07T23:00:00.000Z"},"guestsCanTalk":{"type":"boolean","default":true,"description":"New guests may talk; the host can mute anyone later."},"communityId":{"type":"string","format":"uuid","nullable":true,"description":"Make it an event of one of your communities: only its members can join (QR or code from anyone else is refused)."},"endsAt":{"type":"string","format":"date-time","nullable":true,"example":"2026-11-07T08:00:00.000Z","description":"Omit or null for an unlimited event (runs until the host ends it)."},"meetingPoint":{"nullable":true,"description":"Where people meet (\"Gate\").","type":"object","allOf":[{"$ref":"#/components/schemas/PlaceInput"}]}},"required":["title","startsAt"]},"PublicUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11"},"username":{"type":"string","example":"eva","description":"Lowercase, shown on map markers."},"displayName":{"type":"string","example":"Eva Wahyuni"},"avatarColor":{"type":"string","example":"#0B7F86","description":"Avatar / trail colour (also the ring around the photo)."},"avatarUrl":{"type":"string","nullable":true,"example":"/media/avatars/5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11-9f2c4e1a.webp","description":"Profile photo, 512 × 512 WebP. Path on the API host; null = show initials."},"avatarThumbUrl":{"type":"string","nullable":true,"example":"/media/avatars/5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11-9f2c4e1a-thumb.webp","description":"Same photo, 160 × 160, for map markers and lists."}},"required":["id","username","displayName","avatarColor","avatarUrl","avatarThumbUrl"]},"Place":{"type":"object","properties":{"name":{"type":"string","example":"Gate"},"address":{"type":"string","nullable":true,"example":"Ancol, Jakarta Utara"},"lat":{"type":"number","example":-6.1251},"lng":{"type":"number","example":106.8411}},"required":["name","address","lat","lng"]},"LocalizedName":{"type":"object","properties":{"id":{"type":"string","example":"Klub Motor","description":"Indonesian."},"us":{"type":"string","example":"Motorcycle Club","description":"English."}},"required":["id","us"]},"CommunityCategoryInfo":{"type":"object","properties":{"id":{"type":"number","example":1},"slug":{"type":"string","example":"motorcycle_club"},"icon":{"type":"string","example":"motorcycle","description":"Icon key: motorcycle, car, touring, running, cycling, hiking, backpack, other (unknown = generic)."},"name":{"$ref":"#/components/schemas/LocalizedName"}},"required":["id","slug","icon","name"]},"CommunityRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Rutemu Riders"},"category":{"$ref":"#/components/schemas/CommunityCategoryInfo"},"visibility":{"type":"string","enum":["public","private"]},"imageUrl":{"type":"string","nullable":true,"example":"/media/communities/9c1f…-4b2a.webp","description":"Picture, 512 × 512 WebP. Path on the API host; null = show the category icon."},"imageThumbUrl":{"type":"string","nullable":true,"description":"Same picture, 160 × 160."}},"required":["id","name","category","visibility","imageUrl","imageThumbUrl"]},"Stop":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"position":{"type":"number","example":0,"description":"Order of the stop, starting at 0."},"kind":{"type":"string","enum":["start","transit","rest","finish"],"example":"rest"},"name":{"type":"string","example":"Rest Area KM 57"},"address":{"type":"string","nullable":true,"example":"Tol Jakarta–Cikampek"},"lat":{"type":"number","example":-6.3313},"lng":{"type":"number","example":107.1564},"restMinutes":{"type":"number","nullable":true,"example":20,"description":"Break length, `rest` stops only."}},"required":["id","position","kind","name","address","lat","lng","restMinutes"]},"Position":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"lat":{"type":"number","example":-6.2001},"lng":{"type":"number","example":106.8167},"heading":{"type":"number","nullable":true,"example":90,"description":"Degrees, 0 = north."},"speed":{"type":"number","nullable":true,"example":12.5,"description":"m/s"},"accuracy":{"type":"number","nullable":true,"example":8,"description":"metres"},"at":{"type":"string","format":"date-time"},"distanceMeters":{"type":"number","example":41250,"description":"Running total for this room, metres."}},"required":["userId","lat","lng","heading","speed","accuracy","at","distanceMeters"]},"Member":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/PublicUser"},"role":{"type":"string","enum":["host","guest"]},"joinedAt":{"type":"string","format":"date-time"},"joinMethod":{"type":"string","enum":["host","qr","link","code","community"]},"leftAt":{"type":"string","format":"date-time","nullable":true,"description":"null = still in the room."},"leftReason":{"type":"string","enum":["left","removed"],"nullable":true},"micAllowed":{"type":"boolean","description":"Set by the host. The host can always talk."},"micOn":{"type":"boolean","nullable":true,"description":"Mic switched on in the app (null = unknown)."},"online":{"type":"boolean","description":"Has a socket subscribed to the room right now."},"locationEnabled":{"type":"boolean","nullable":true,"description":"Location sharing on (null = unknown)."},"lastPosition":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/Position"}]},"distanceMeters":{"type":"number","example":2400}},"required":["user","role","joinedAt","joinMethod","leftAt","leftReason","micAllowed","micOn","online","locationEnabled","lastPosition","distanceMeters"]},"Room":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"7Q4X2M","description":"6 characters (0-9, A-Z)."},"title":{"type":"string","example":"Jakarta → Bandung Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"status":{"type":"string","enum":["scheduled","live","ended"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true,"description":"null = unlimited monitoring."},"startedAt":{"type":"string","format":"date-time","nullable":true},"endedAt":{"type":"string","format":"date-time","nullable":true},"endReason":{"type":"string","enum":["host","schedule"],"nullable":true},"host":{"$ref":"#/components/schemas/PublicUser"},"myRole":{"type":"string","enum":["host","guest"],"nullable":true,"description":"Your role; null when you are not a member."},"memberCount":{"type":"number","example":5,"description":"Active members (host included)."},"memberPreview":{"description":"Up to 4 active members, host first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"routeDistanceMeters":{"type":"number","nullable":true,"example":152000,"description":"Journey only."},"routeDurationSeconds":{"type":"number","nullable":true,"example":11100,"description":"Journey only."},"stopCount":{"type":"number","example":5,"description":"All stops including start and finish (0 for monitoring)."},"meetingPoint":{"nullable":true,"description":"Monitoring meeting point.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"joinUrl":{"type":"string","example":"https://app.rutemu.com/j/7Q4X2M","description":"Encoded in the QR code."},"community":{"nullable":true,"description":"Set when the event is for one community: only its members can join.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityRef"}]},"guestsCanTalk":{"type":"boolean"},"routePolyline":{"type":"string","nullable":true,"description":"Encoded polyline of the route, if the app sent one."},"stops":{"type":"array","items":{"$ref":"#/components/schemas/Stop"}},"members":{"description":"Everyone who ever joined (check leftAt), host first.","type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["id","code","title","type","status","startsAt","endsAt","startedAt","endedAt","endReason","host","myRole","memberCount","memberPreview","routeDistanceMeters","routeDurationSeconds","stopCount","meetingPoint","joinUrl","community","guestsCanTalk","routePolyline","stops","members"]},"RoomResponse":{"type":"object","properties":{"room":{"$ref":"#/components/schemas/Room"}},"required":["room"]},"RoomSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"7Q4X2M","description":"6 characters (0-9, A-Z)."},"title":{"type":"string","example":"Jakarta → Bandung Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"status":{"type":"string","enum":["scheduled","live","ended"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true,"description":"null = unlimited monitoring."},"startedAt":{"type":"string","format":"date-time","nullable":true},"endedAt":{"type":"string","format":"date-time","nullable":true},"endReason":{"type":"string","enum":["host","schedule"],"nullable":true},"host":{"$ref":"#/components/schemas/PublicUser"},"myRole":{"type":"string","enum":["host","guest"],"nullable":true,"description":"Your role; null when you are not a member."},"memberCount":{"type":"number","example":5,"description":"Active members (host included)."},"memberPreview":{"description":"Up to 4 active members, host first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"routeDistanceMeters":{"type":"number","nullable":true,"example":152000,"description":"Journey only."},"routeDurationSeconds":{"type":"number","nullable":true,"example":11100,"description":"Journey only."},"stopCount":{"type":"number","example":5,"description":"All stops including start and finish (0 for monitoring)."},"meetingPoint":{"nullable":true,"description":"Monitoring meeting point.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"joinUrl":{"type":"string","example":"https://app.rutemu.com/j/7Q4X2M","description":"Encoded in the QR code."},"community":{"nullable":true,"description":"Set when the event is for one community: only its members can join.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityRef"}]}},"required":["id","code","title","type","status","startsAt","endsAt","startedAt","endedAt","endReason","host","myRole","memberCount","memberPreview","routeDistanceMeters","routeDurationSeconds","stopCount","meetingPoint","joinUrl","community"]},"ScheduleConflictResponse":{"type":"object","properties":{"error":{"type":"string","example":"not_found","description":"Stable machine-readable code."},"message":{"type":"string","example":"Not found.","description":"Text in the request’s Accept-Language (id / en)."},"conflict":{"$ref":"#/components/schemas/RoomSummary"},"overlapFrom":{"type":"string","format":"date-time"},"overlapTo":{"type":"string","format":"date-time","nullable":true},"user":{"description":"Whose calendar has the conflict (room edits only).","allOf":[{"$ref":"#/components/schemas/PublicUser"}]}},"required":["error","message","conflict","overlapFrom","overlapTo"]},"RoomPreview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"7Q4X2M","description":"6 characters (0-9, A-Z)."},"title":{"type":"string","example":"Jakarta → Bandung Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"status":{"type":"string","enum":["scheduled","live","ended"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true,"description":"null = unlimited monitoring."},"startedAt":{"type":"string","format":"date-time","nullable":true},"endedAt":{"type":"string","format":"date-time","nullable":true},"endReason":{"type":"string","enum":["host","schedule"],"nullable":true},"host":{"$ref":"#/components/schemas/PublicUser"},"myRole":{"type":"string","enum":["host","guest"],"nullable":true,"description":"Your role; null when you are not a member."},"memberCount":{"type":"number","example":5,"description":"Active members (host included)."},"memberPreview":{"description":"Up to 4 active members, host first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"routeDistanceMeters":{"type":"number","nullable":true,"example":152000,"description":"Journey only."},"routeDurationSeconds":{"type":"number","nullable":true,"example":11100,"description":"Journey only."},"stopCount":{"type":"number","example":5,"description":"All stops including start and finish (0 for monitoring)."},"meetingPoint":{"nullable":true,"description":"Monitoring meeting point.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"joinUrl":{"type":"string","example":"https://app.rutemu.com/j/7Q4X2M","description":"Encoded in the QR code."},"community":{"nullable":true,"description":"Set when the event is for one community: only its members can join.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityRef"}]},"guestsCanTalk":{"type":"boolean"},"routePolyline":{"type":"string","nullable":true,"description":"Encoded polyline of the route, if the app sent one."},"stops":{"type":"array","items":{"$ref":"#/components/schemas/Stop"}},"members":{"description":"Everyone who ever joined (check leftAt), host first.","type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["id","code","title","type","status","startsAt","endsAt","startedAt","endedAt","endReason","host","myRole","memberCount","memberPreview","routeDistanceMeters","routeDurationSeconds","stopCount","meetingPoint","joinUrl","community","guestsCanTalk","routePolyline","stops","members"]},"RoomPreviewResponse":{"type":"object","properties":{"room":{"description":"Members are limited to active ones; positions are hidden.","allOf":[{"$ref":"#/components/schemas/RoomPreview"}]},"alreadyMember":{"type":"boolean","description":"You are already an active member of this room."},"conflict":{"nullable":true,"description":"Your room that overlaps this one.","type":"object","allOf":[{"$ref":"#/components/schemas/RoomSummary"}]},"overlapFrom":{"type":"string","format":"date-time","nullable":true},"overlapTo":{"type":"string","format":"date-time","nullable":true}},"required":["room","alreadyMember","conflict","overlapFrom","overlapTo"]},"JoinRoomDto":{"type":"object","properties":{"method":{"type":"string","enum":["qr","link","code","community"],"example":"qr","description":"How the code was entered."}},"required":["method"]},"UpdateRoomDto":{"type":"object","properties":{"title":{"type":"string","maxLength":80},"guestsCanTalk":{"type":"boolean","description":"Also sets micAllowed of every current guest."},"startsAt":{"type":"string","format":"date-time","description":"Scheduled rooms only."},"endsAt":{"type":"string","format":"date-time","nullable":true,"description":"Scheduled rooms only. null = unlimited (monitoring)."},"stops":{"description":"Journey, scheduled only. Replaces all stops.","type":"array","items":{"$ref":"#/components/schemas/StopInput"}},"routeDistanceMeters":{"type":"number","nullable":true},"routeDurationSeconds":{"type":"number","nullable":true},"routePolyline":{"type":"string","nullable":true},"meetingPoint":{"nullable":true,"description":"Monitoring, scheduled only. null removes it.","type":"object","allOf":[{"$ref":"#/components/schemas/PlaceInput"}]}}},"MemberMicDto":{"type":"object","properties":{"micAllowed":{"type":"boolean","example":false}},"required":["micAllowed"]},"LocationInput":{"type":"object","properties":{"lat":{"type":"number","example":-6.2001},"lng":{"type":"number","example":106.8167},"heading":{"type":"number","nullable":true,"example":90},"speed":{"type":"number","nullable":true,"example":12.5,"description":"m/s"},"accuracy":{"type":"number","nullable":true,"example":8,"description":"metres"},"at":{"type":"string","format":"date-time","description":"When the fix was taken (defaults to now)."}},"required":["lat","lng"]},"LocationBatchDto":{"type":"object","properties":{"points":{"description":"1–100 points, any order (sorted by `at`).","type":"array","items":{"$ref":"#/components/schemas/LocationInput"}}},"required":["points"]},"LocationBatchResponse":{"type":"object","properties":{"accepted":{"type":"number","example":3,"description":"How many of the sent points were accepted."},"position":{"nullable":true,"description":"Your position after the batch.","type":"object","allOf":[{"$ref":"#/components/schemas/Position"}]}},"required":["accepted","position"]},"TracksResponse":{"type":"object","properties":{"tracks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"example":{"5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11":[[-6.2,106.8,1792104000000]]},"description":"[lat, lng, epochMillis] per stored point, oldest first."}},"required":["tracks"]},"PointEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string","example":"3RT8XQ"},"title":{"type":"string","example":"Jakarta → Puncak Ride"},"type":{"type":"string","enum":["journey","monitoring"]}},"required":["id","code","title","type"]},"EventPoints":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Your time in the live event: from the start or when you joined…"},"to":{"type":"string","format":"date-time","description":"…to the end or when you left."},"distanceMeters":{"type":"number","example":57000},"durationMinutes":{"type":"number","example":240,"description":"Your whole time in the live event."},"restMinutes":{"type":"number","example":30,"description":"Rest of the rest stops you reached; taken off durationMinutes for the duration score."},"averageSpeedKmh":{"type":"number","nullable":true,"example":14.25,"description":"null when the time was 0."},"participationPoints":{"type":"number","example":1},"distanceScore":{"type":"number","example":5.7,"description":"0–100: 1 per 10 km, counted from 10 km up to 1,000 km."},"distancePoints":{"type":"number","example":3.42,"description":"distanceScore × 60 %."},"durationScore":{"type":"number","example":11.67,"description":"0–100: ((durationMinutes − restMinutes) / 60 / 30) × 100 — 1 per 18 minutes of travel, counted from 18 minutes up to 30 hours."},"durationPoints":{"type":"number","example":5.33,"description":"durationScore × 40 %."},"totalPoints":{"type":"number","example":9.75,"description":"participation + distance + duration points."},"flags":{"type":"array","example":[],"description":"Why points were held back. short_stay, daily_limit: no participation point. solo (alone in the event), short_distance, too_fast, too_slow: no distance and duration points.","items":{"type":"string","enum":["short_stay","daily_limit","solo","short_distance","too_fast","too_slow"]}}},"required":["from","to","distanceMeters","durationMinutes","restMinutes","averageSpeedKmh","participationPoints","distanceScore","distancePoints","durationScore","durationPoints","totalPoints","flags"]},"PointEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["in","out"],"description":"in = earned, out = spent."},"type":{"type":"string","enum":["event","referral","buy","other","claim_money","hide_ads","feature"],"description":"in: event, referral, buy, other. out: claim_money, hide_ads, feature, other."},"amount":{"type":"number","example":9.75,"description":"Always positive; direction gives the sign."},"balanceAfter":{"type":"number","example":118.2,"description":"Your current points right after this."},"note":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"event":{"nullable":true,"description":"type event: the event.","type":"object","allOf":[{"$ref":"#/components/schemas/PointEvent"}]},"eventPoints":{"nullable":true,"description":"type event: how the points were made up.","type":"object","allOf":[{"$ref":"#/components/schemas/EventPoints"}]},"referredUser":{"nullable":true,"description":"type referral: the friend who used your code.","type":"object","allOf":[{"$ref":"#/components/schemas/PublicUser"}]}},"required":["id","direction","type","amount","balanceAfter","note","createdAt","event","eventPoints","referredUser"]},"PointRulesInfo":{"type":"object","properties":{"referralPoints":{"type":"number","example":25},"participationPoints":{"type":"number","example":1},"minStayMinutes":{"type":"number","example":18},"participationsPerDay":{"type":"number","example":3},"distanceMinKm":{"type":"number","example":10},"distanceMaxKm":{"type":"number","example":1000},"distanceKmPerScore":{"type":"number","example":10},"distanceWeightPercent":{"type":"number","example":60},"durationMinMinutes":{"type":"number","example":18},"durationMaxMinutes":{"type":"number","example":1800},"durationMinutesPerScore":{"type":"number","example":18},"durationWeightPercent":{"type":"number","example":40},"minAverageKmh":{"type":"number","example":1},"maxAverageKmh":{"type":"number","example":120},"minPeople":{"type":"number","example":2,"description":"Distance and duration count only with at least this many people."}},"required":["referralPoints","participationPoints","minStayMinutes","participationsPerDay","distanceMinKm","distanceMaxKm","distanceKmPerScore","distanceWeightPercent","durationMinMinutes","durationMaxMinutes","durationMinutesPerScore","durationWeightPercent","minAverageKmh","maxAverageKmh","minPeople"]},"PointHistoryResponse":{"type":"object","properties":{"balance":{"$ref":"#/components/schemas/PointBalance"},"items":{"description":"Newest first.","type":"array","items":{"$ref":"#/components/schemas/PointEntry"}},"total":{"type":"number","example":12,"description":"Matching items before limit/offset."},"rules":{"$ref":"#/components/schemas/PointRulesInfo"}},"required":["balance","items","total","rules"]},"CommunityCategoryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommunityCategoryInfo"}}},"required":["items"]},"CommunityPositionInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Road Captain"},"isLeader":{"type":"boolean","description":"The leader’s position (one per community, can’t be deleted)."},"canManage":{"type":"boolean","description":"Holders approve join requests, edit the community and manage members."},"rank":{"type":"number","example":2,"description":"Order in the member list (leader first)."},"memberCount":{"type":"number","example":2,"description":"Members holding it."}},"required":["id","name","isLeader","canManage","rank","memberCount"]},"CommunityEventTeaser":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","example":"Sunday Morning Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"status":{"type":"string","enum":["scheduled","live"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","title","type","status","startsAt","endsAt"]},"CommunitySummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Rutemu Riders"},"category":{"$ref":"#/components/schemas/CommunityCategoryInfo"},"visibility":{"type":"string","enum":["public","private"]},"imageUrl":{"type":"string","nullable":true,"example":"/media/communities/9c1f…-4b2a.webp","description":"Picture, 512 × 512 WebP. Path on the API host; null = show the category icon."},"imageThumbUrl":{"type":"string","nullable":true,"description":"Same picture, 160 × 160."},"description":{"type":"string","nullable":true,"example":"Weekend rides around Jabodetabek."},"address":{"type":"string","nullable":true,"example":"Jl. Sudirman No. 1, Jakarta"},"homeBase":{"nullable":true,"description":"Home base pinned on the map.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"memberCount":{"type":"number","example":24},"memberPreview":{"description":"Up to 4 members, leader first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"leader":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicUser"}]},"myStatus":{"type":"string","enum":["member","pending"],"nullable":true,"description":"member · pending (your join request waits for approval) · null (neither)."},"myPosition":{"nullable":true,"description":"Your position (members only).","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityPositionInfo"}]},"canManage":{"type":"boolean","description":"You are the leader or hold a position that can manage."},"pendingCount":{"type":"number","example":3,"description":"Join requests waiting for approval (0 unless canManage)."},"nextEvent":{"nullable":true,"description":"Members only.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityEventTeaser"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","category","visibility","imageUrl","imageThumbUrl","description","address","homeBase","memberCount","memberPreview","leader","myStatus","myPosition","canManage","pendingCount","nextEvent","createdAt"]},"CommunityListResponse":{"type":"object","properties":{"items":{"description":"Communities you are in (myStatus member) and your pending requests (myStatus pending).","type":"array","items":{"$ref":"#/components/schemas/CommunitySummary"}}},"required":["items"]},"CreateCommunityDto":{"type":"object","properties":{"name":{"type":"string","example":"Rutemu Riders","maxLength":80},"categoryId":{"type":"number","example":1,"description":"An active category id from GET /community-categories."},"description":{"type":"string","nullable":true,"maxLength":1000,"example":"Weekend rides around Jabodetabek."},"visibility":{"type":"string","enum":["public","private"],"default":"public","description":"public: the code joins you right away · private: the code sends a request the leader approves."},"address":{"type":"string","nullable":true,"maxLength":255,"example":"Jl. Sudirman No. 1, Jakarta"},"homeBase":{"nullable":true,"description":"Home base pinned on the map.","type":"object","allOf":[{"$ref":"#/components/schemas/PlaceInput"}]}},"required":["name","categoryId"]},"CommunityDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Rutemu Riders"},"category":{"$ref":"#/components/schemas/CommunityCategoryInfo"},"visibility":{"type":"string","enum":["public","private"]},"imageUrl":{"type":"string","nullable":true,"example":"/media/communities/9c1f…-4b2a.webp","description":"Picture, 512 × 512 WebP. Path on the API host; null = show the category icon."},"imageThumbUrl":{"type":"string","nullable":true,"description":"Same picture, 160 × 160."},"description":{"type":"string","nullable":true,"example":"Weekend rides around Jabodetabek."},"address":{"type":"string","nullable":true,"example":"Jl. Sudirman No. 1, Jakarta"},"homeBase":{"nullable":true,"description":"Home base pinned on the map.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"memberCount":{"type":"number","example":24},"memberPreview":{"description":"Up to 4 members, leader first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"leader":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicUser"}]},"myStatus":{"type":"string","enum":["member","pending"],"nullable":true,"description":"member · pending (your join request waits for approval) · null (neither)."},"myPosition":{"nullable":true,"description":"Your position (members only).","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityPositionInfo"}]},"canManage":{"type":"boolean","description":"You are the leader or hold a position that can manage."},"pendingCount":{"type":"number","example":3,"description":"Join requests waiting for approval (0 unless canManage)."},"nextEvent":{"nullable":true,"description":"Members only.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityEventTeaser"}]},"createdAt":{"type":"string","format":"date-time"},"code":{"type":"string","nullable":true,"example":"SR48","description":"4 characters (0-9, A-Z). Members only."},"joinUrl":{"type":"string","nullable":true,"example":"https://app.rutemu.com/c/SR48","description":"Encoded in the community QR. Members only."},"positions":{"description":"Leader first, then by rank. Members only.","type":"array","items":{"$ref":"#/components/schemas/CommunityPositionInfo"}},"isLeader":{"type":"boolean","description":"You hold the leader position."},"myJoinedAt":{"type":"string","format":"date-time","nullable":true},"requestedAt":{"type":"string","format":"date-time","nullable":true,"description":"When you asked to join (pending only)."}},"required":["id","name","category","visibility","imageUrl","imageThumbUrl","description","address","homeBase","memberCount","memberPreview","leader","myStatus","myPosition","canManage","pendingCount","nextEvent","createdAt","code","joinUrl","positions","isLeader","myJoinedAt","requestedAt"]},"CommunityResponse":{"type":"object","properties":{"community":{"$ref":"#/components/schemas/CommunityDetail"}},"required":["community"]},"CommunitySearchItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Rutemu Riders"},"category":{"$ref":"#/components/schemas/CommunityCategoryInfo"},"visibility":{"type":"string","enum":["public","private"]},"imageUrl":{"type":"string","nullable":true,"example":"/media/communities/9c1f…-4b2a.webp","description":"Picture, 512 × 512 WebP. Path on the API host; null = show the category icon."},"imageThumbUrl":{"type":"string","nullable":true,"description":"Same picture, 160 × 160."},"description":{"type":"string","nullable":true,"example":"Weekend rides around Jabodetabek."},"address":{"type":"string","nullable":true,"example":"Jl. Sudirman No. 1, Jakarta"},"homeBase":{"nullable":true,"description":"Home base pinned on the map.","type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"memberCount":{"type":"number","example":24},"memberPreview":{"description":"Up to 4 members, leader first.","type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"leader":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicUser"}]},"myStatus":{"type":"string","enum":["member","pending"],"nullable":true,"description":"member · pending (your join request waits for approval) · null (neither)."},"myPosition":{"nullable":true,"description":"Your position (members only).","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityPositionInfo"}]},"canManage":{"type":"boolean","description":"You are the leader or hold a position that can manage."},"pendingCount":{"type":"number","example":3,"description":"Join requests waiting for approval (0 unless canManage)."},"nextEvent":{"nullable":true,"description":"Members only.","type":"object","allOf":[{"$ref":"#/components/schemas/CommunityEventTeaser"}]},"createdAt":{"type":"string","format":"date-time"},"distanceMeters":{"type":"number","nullable":true,"example":2350,"description":"Metres from your position to the home base (searches with lat/lng), else null."}},"required":["id","name","category","visibility","imageUrl","imageThumbUrl","description","address","homeBase","memberCount","memberPreview","leader","myStatus","myPosition","canManage","pendingCount","nextEvent","createdAt","distanceMeters"]},"CommunitySearchResponse":{"type":"object","properties":{"items":{"description":"With lat/lng: nearest first. Text only: the code match, then names starting with q, other name matches, description matches. Your own communities are included (see myStatus).","type":"array","items":{"$ref":"#/components/schemas/CommunitySearchItem"}}},"required":["items"]},"CommunityPreviewResponse":{"type":"object","properties":{"community":{"description":"What the join screen shows (no code, no events).","allOf":[{"$ref":"#/components/schemas/CommunitySummary"}]}},"required":["community"]},"JoinCommunityDto":{"type":"object","properties":{"method":{"type":"string","enum":["qr","link","code"],"example":"qr","description":"How the code was entered."}},"required":["method"]},"CommunityJoinResponse":{"type":"object","properties":{"status":{"type":"string","enum":["joined","requested"],"description":"joined: you are a member now (public, or already in) · requested: waiting for approval."},"community":{"$ref":"#/components/schemas/CommunityDetail"}},"required":["status","community"]},"UpdateCommunityDto":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"categoryId":{"type":"number"},"description":{"type":"string","nullable":true,"description":"null or \"\" clears it."},"visibility":{"type":"string","enum":["public","private"],"description":"Switching to public does not approve waiting requests by itself."},"address":{"type":"string","nullable":true,"description":"null or \"\" clears it."},"homeBase":{"nullable":true,"description":"null removes the pin.","type":"object","allOf":[{"$ref":"#/components/schemas/PlaceInput"}]}}},"TransferLeadershipDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","description":"The member who becomes the leader."}},"required":["userId"]},"MemberStats":{"type":"object","properties":{"events":{"type":"number","example":12,"description":"Events that went live while the member was in them."},"distanceMeters":{"type":"number","example":845000},"trackedSeconds":{"type":"number","example":151200,"description":"Time tracked in those events."},"lastEventAt":{"type":"string","format":"date-time","nullable":true,"description":"Start of the latest one."}},"required":["events","distanceMeters","trackedSeconds","lastEventAt"]},"CommunityMemberStats":{"type":"object","properties":{"community":{"description":"Events of this community only.","allOf":[{"$ref":"#/components/schemas/MemberStats"}]},"overall":{"description":"Every event the member joined.","allOf":[{"$ref":"#/components/schemas/MemberStats"}]}},"required":["community","overall"]},"CommunityMemberInfo":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/PublicUser"},"position":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/CommunityPositionInfo"}]},"isLeader":{"type":"boolean","description":"Holds the leader position."},"canManage":{"type":"boolean","description":"Can approve requests and manage members."},"joinedAt":{"type":"string","format":"date-time"},"joinMethod":{"type":"string","enum":["creator","qr","link","code","search"]},"stats":{"$ref":"#/components/schemas/CommunityMemberStats"}},"required":["user","position","isLeader","canManage","joinedAt","joinMethod","stats"]},"CommunityMembersResponse":{"type":"object","properties":{"items":{"description":"Leader first, then by position rank, then by name.","type":"array","items":{"$ref":"#/components/schemas/CommunityMemberInfo"}}},"required":["items"]},"MemberPositionDto":{"type":"object","properties":{"positionId":{"type":"string","format":"uuid","nullable":true,"description":"A position of this community, or null for none. The leader position moves with POST …/transfer."}},"required":["positionId"]},"CreatePositionDto":{"type":"object","properties":{"name":{"type":"string","example":"Road Captain","maxLength":40},"canManage":{"type":"boolean","default":false,"description":"Holders can approve requests, edit the community and manage members (only the leader can grant it)."}},"required":["name"]},"ReorderPositionsDto":{"type":"object","properties":{"ids":{"description":"Every position id except the leader’s, in the new order.","type":"array","items":{"type":"string"}}},"required":["ids"]},"UpdatePositionDto":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"canManage":{"type":"boolean","description":"Not for the leader position (it always manages)."}}},"JoinRequestInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user":{"$ref":"#/components/schemas/PublicUser"},"method":{"type":"string","enum":["creator","qr","link","code","search"]},"requestedAt":{"type":"string","format":"date-time"}},"required":["id","user","method","requestedAt"]},"JoinRequestListResponse":{"type":"object","properties":{"items":{"description":"Oldest first.","type":"array","items":{"$ref":"#/components/schemas/JoinRequestInfo"}}},"required":["items"]},"CommunityEventsResponse":{"type":"object","properties":{"upcoming":{"description":"Live first, then scheduled by start time.","type":"array","items":{"$ref":"#/components/schemas/RoomSummary"}},"past":{"description":"Ended events you took part in (were in while live), newest first (up to 50).","type":"array","items":{"$ref":"#/components/schemas/RoomSummary"}}},"required":["upcoming","past"]},"MeResponse":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/Me"}},"required":["user"]},"UpdateMeDto":{"type":"object","properties":{"displayName":{"type":"string","example":"Angga Nugraha","maxLength":80},"username":{"type":"string","example":"angganu"},"avatarColor":{"type":"string","example":"#6D4AFF","description":"#RRGGBB — the app offers 8 colours."},"language":{"type":"string","enum":["id","us"]}}},"ApplyReferralDto":{"type":"object","properties":{"code":{"type":"string","example":"K7Q2M","description":"A friend’s 5-character code (their `code`); case, spaces and dashes are ignored."}},"required":["code"]},"Stats":{"type":"object","properties":{"events":{"type":"number","example":24,"description":"Rooms you are/were in (not cancelled)."},"hosted":{"type":"number","example":9},"joined":{"type":"number","example":15},"distanceMeters":{"type":"number","example":1284000},"trackedSeconds":{"type":"number","example":347400}},"required":["events","hosted","joined","distanceMeters","trackedSeconds"]},"RoomListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RoomSummary"}}},"required":["items"]},"Availability":{"type":"object","properties":{"available":{"type":"boolean","description":"true when nothing overlaps."},"conflict":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/RoomSummary"}]},"overlapFrom":{"type":"string","format":"date-time","nullable":true},"overlapTo":{"type":"string","format":"date-time","nullable":true,"description":"null = open-ended overlap."}},"required":["available","conflict","overlapFrom","overlapTo"]},"HistoryItem":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"code":{"type":"string","example":"3RT8XQ"},"title":{"type":"string","example":"Jakarta → Puncak Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"myRole":{"type":"string","enum":["host","guest"]},"status":{"type":"string","enum":["scheduled","live","ended"]},"startedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time","description":"When you left or the event ended, whichever came first."},"peopleCount":{"type":"number","example":8,"description":"People who were in the room while it was live."},"distanceMeters":{"type":"number","example":86200},"trackedSeconds":{"type":"number","example":20760}},"required":["roomId","code","title","type","myRole","status","startedAt","leftAt","peopleCount","distanceMeters","trackedSeconds"]},"HistoryListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"total":{"type":"number","example":24,"description":"Matching items before limit/offset."}},"required":["items","total"]},"HistoryPerson":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/PublicUser"},"role":{"type":"string","enum":["host","guest"]},"distanceMeters":{"type":"number","example":86100}},"required":["user","role","distanceMeters"]},"TimelineEntry":{"type":"object","properties":{"kind":{"type":"string","enum":["joined","started","stop_reached","left","ended"]},"at":{"type":"string","format":"date-time"},"user":{"nullable":true,"description":"null for started / ended.","type":"object","allOf":[{"$ref":"#/components/schemas/PublicUser"}]},"joinMethod":{"type":"string","enum":["host","qr","link","code","community"],"nullable":true,"description":"joined only."},"stop":{"nullable":true,"description":"stop_reached only.","type":"object","allOf":[{"$ref":"#/components/schemas/Stop"}]},"reason":{"type":"string","enum":["host","schedule","left","removed"],"nullable":true,"description":"ended: host | schedule; left: left | removed."}},"required":["kind","at","user","joinMethod","stop","reason"]},"HistoryDetail":{"type":"object","properties":{"roomId":{"type":"string","format":"uuid"},"code":{"type":"string","example":"3RT8XQ"},"title":{"type":"string","example":"Jakarta → Puncak Ride"},"type":{"type":"string","enum":["journey","monitoring"]},"myRole":{"type":"string","enum":["host","guest"]},"status":{"type":"string","enum":["scheduled","live","ended"]},"startedAt":{"type":"string","format":"date-time"},"leftAt":{"type":"string","format":"date-time","description":"When you left or the event ended, whichever came first."},"peopleCount":{"type":"number","example":8,"description":"People who were in the room while it was live."},"distanceMeters":{"type":"number","example":86200},"trackedSeconds":{"type":"number","example":20760},"host":{"$ref":"#/components/schemas/PublicUser"},"endedAt":{"type":"string","format":"date-time","nullable":true},"endReason":{"type":"string","enum":["host","schedule"],"nullable":true},"routeDistanceMeters":{"type":"number","nullable":true},"routePolyline":{"type":"string","nullable":true},"stops":{"type":"array","items":{"$ref":"#/components/schemas/Stop"}},"meetingPoint":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/Place"}]},"people":{"type":"array","items":{"$ref":"#/components/schemas/HistoryPerson"}},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEntry"}},"tracks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"example":{"5b0a7d1e-3a4f-4c47-9a57-0c9f6d1f2b11":[[-6.2,106.8],[-6.21,106.81]]},"description":"Each person’s trail as [lat, lng] pairs, at most 300 points per person."},"points":{"nullable":true,"description":"Your points for this event. null while it is live, or when you weren’t eligible.","type":"object","allOf":[{"$ref":"#/components/schemas/EventPoints"}]}},"required":["roomId","code","title","type","myRole","status","startedAt","leftAt","peopleCount","distanceMeters","trackedSeconds","host","endedAt","endReason","routeDistanceMeters","routePolyline","stops","meetingPoint","people","timeline","tracks","points"]},"HealthResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"db":{"type":"boolean","example":true,"description":"Database reachable."},"voice":{"type":"boolean","example":true,"description":"Group voice (WebRTC between the phones) is available."},"turn":{"type":"boolean","example":false,"description":"A TURN relay is configured, so voice also connects on networks that block direct connections."},"time":{"type":"string","format":"date-time"},"version":{"type":"string","example":"1.0.0"}},"required":["ok","db","voice","turn","time","version"]}}}}