{"openapi":"3.1.0","info":{"title":"Playpark API","description":"Playparks API dokumentation för externt bruk","license":{"name":""},"version":"1.0.0"},"paths":{"/api/v1/admin/coins/add":{"post":{"tags":["Admin Coins"],"operationId":"add_coins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCoinsRequest"}}},"required":true},"responses":{"200":{"description":"Coins added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminCoinAdjustmentResponse"}}}},"400":{"description":"Invalid request or validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/coins/remove":{"post":{"tags":["Admin Coins"],"operationId":"remove_coins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveCoinsRequest"}}},"required":true},"responses":{"200":{"description":"Coins removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminCoinAdjustmentResponse"}}}},"400":{"description":"Invalid request, validation error, or insufficient balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/coins/transactions":{"get":{"tags":["Admin Coins"],"operationId":"get_coin_transactions","parameters":[{"name":"page","in":"query","description":"Page number for pagination (default: 1)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"limit","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"user_id","in":"query","description":"Filter by specific user ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"transaction_type","in":"query","description":"Filter by transaction type (CREDIT, DEBIT)","required":false,"schema":{"type":["string","null"]}},{"name":"source","in":"query","description":"Filter by transaction source (ADMIN, SYSTEM, etc.)","required":false,"schema":{"type":["string","null"]}},{"name":"transaction_id","in":"query","description":"Filter by specific transaction ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"currency_code","in":"query","description":"Filter by currency code (e.g. `playpark_coins`, `midgard_goldcoin`)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminCoinTransactionsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/coins/users":{"get":{"tags":["Admin Coins"],"operationId":"get_users_with_balances","parameters":[{"name":"page","in":"query","description":"Page number for pagination (default: 1)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"limit","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"currency_code","in":"query","description":"Filter by currency code (e.g. `playpark_coins`, `midgard_goldcoin`).\nWhen omitted, returns one row per (user, currency) pair.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Users with balances retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminCoinUsersResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/emails":{"get":{"tags":["Admin Emails"],"summary":"List logged emails with delivery status (filtered + paginated).","operationId":"list_admin_emails","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","description":"Exact delivery status, e.g. `DELIVERED`, `BOUNCED`.","required":false,"schema":{"type":"string"}},{"name":"provider","in":"query","description":"Exact provider, e.g. `resend`.","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Exact recipient address.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Free-text search across recipient address and subject.","required":false,"schema":{"type":"string"}},{"name":"user_id","in":"query","description":"Restrict to emails sent to this member's current address.","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Emails retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminEmailListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/emails/{id}":{"get":{"tags":["Admin Emails"],"summary":"Get a single email plus its provider delivery timeline.","operationId":"get_admin_email","parameters":[{"name":"id","in":"path","description":"Email log ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Email retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminEmailDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/members/auth-diagnostics/reference/{request_id}":{"get":{"tags":["Admin Members"],"summary":"Resolve a server-generated support reference to its account for staff triage.","operationId":"find_auth_diagnostic_reference","parameters":[{"name":"request_id","in":"path","description":"Server-generated UUID support reference","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Audited reference lookup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AuthDiagnosticReferenceResponse"}}}},"400":{"description":"Invalid reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"admin.members.info.read required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"No retained conflict evidence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Diagnostics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/members/toggle_suspend_member_by_id":{"post":{"tags":["Admin Members"],"summary":"Explicit staff lockout. `users.active` remains the email-verification flag;\nthis endpoint changes only the suspension state and revokes live sessions\nand one-time authentication artifacts.","operationId":"toggle_suspend_member_by_id","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspendMemberById"}}},"required":true},"responses":{"200":{"description":"Account suspension state changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"admin.members.activate required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Suspension update failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/members/{user_id}/auth-diagnostics":{"get":{"tags":["Admin Members"],"summary":"Read a bounded account snapshot and recent membership-conflict evidence.","operationId":"get_auth_diagnostics","parameters":[{"name":"user_id","in":"path","description":"Account ID from members search","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Read-only, audited account diagnostics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AuthDiagnosticsResponse"}}}},"401":{"description":"Session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"admin.members.info.read required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Diagnostics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/members/{user_id}/auth-triage":{"get":{"tags":["Admin Members"],"summary":"Return a deterministic, read-only triage packet for an account.","description":"This endpoint intentionally uses the same member-info permission and\nevidence loader as the diagnostics screen. It is an extension seam for a\nfuture staff AI consumer: no model is called here, no prompt is persisted,\nand no account, payment, entitlement or outbound-message action is exposed.","operationId":"get_auth_triage","parameters":[{"name":"user_id","in":"path","description":"Account ID from members search","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Bounded read-only auth triage packet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AuthTriageResponse"}}}},"401":{"description":"Session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"admin.members.info.read required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Diagnostics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/payments/orders":{"get":{"tags":["Payments"],"summary":"GET /admin/payments/orders\nList all payment orders (paginated).","operationId":"get_all_orders","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Payment orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminPaymentOrdersResponse"}}}},"403":{"description":"Forbidden"}}}},"/api/v1/admin/payments/orders/{id}":{"get":{"tags":["Payments"],"summary":"GET /admin/payments/orders/{id}\nGet a specific payment order with its event log.","operationId":"get_order_detail","parameters":[{"name":"id","in":"path","description":"Payment order ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Payment order with events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminPaymentOrderDetailResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Order not found"}}}},"/api/v1/admin/payments/orders/{id}/refund":{"post":{"tags":["Payments"],"summary":"POST /admin/payments/orders/{id}/refund\nInitiate a refund for a payment order.","description":"Idempotent on `(payment_order_id, idempotency_key)`. The client should\nsupply a unique key for every intentional additional partial refund (e.g. a\nUUID generated when the admin opens the confirmation dialog). If omitted,\nthe server uses `auto-<id>`, allowing only one default refund attempt per\norder.","operationId":"refund_order","parameters":[{"name":"id","in":"path","description":"Payment order ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}},"required":true},"responses":{"200":{"description":"Refund initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_RefundOrderResponse"}}}},"400":{"description":"Cannot refund this order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden"},"404":{"description":"Order not found"},"409":{"description":"Refund already processed for this idempotency key"},"502":{"description":"Provider refund outcome is unknown or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/admin/payments/prices":{"get":{"tags":["Payments"],"summary":"GET /admin/payments/prices\nList subscription prices and their Polar product mappings.","operationId":"get_subscription_prices","responses":{"200":{"description":"Subscription prices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_SubscriptionPrice"}}}},"403":{"description":"Forbidden"}}}},"/api/v1/admin/payments/prices/{id}/polar-product":{"patch":{"tags":["Payments"],"summary":"PATCH /admin/payments/prices/{id}/polar-product\nUpdate the Polar product mapping for a subscription price.","operationId":"update_polar_product","parameters":[{"name":"id","in":"path","description":"Subscription price ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolarProductRequest"}}},"required":true},"responses":{"200":{"description":"Polar product mapping updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_UpdatePolarProductResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Subscription price not found"}}}},"/api/v1/admin/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"GET /admin/subscriptions","operationId":"get_all_subscriptions","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Subscriptions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionListResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/stats":{"get":{"tags":["Subscriptions"],"summary":"GET /admin/subscriptions/stats","operationId":"get_subscription_stats","parameters":[{"name":"days","in":"query","description":"Number of days to look back for statistics","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SubscriptionStats"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/transactions":{"get":{"tags":["Subscriptions"],"summary":"GET /admin/subscriptions/transactions","operationId":"get_subscription_transactions","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TransactionListResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/{subscription_id}":{"patch":{"tags":["Subscriptions"],"summary":"PATCH /admin/subscriptions/{subscription_id}","operationId":"update_subscription","parameters":[{"name":"subscription_id","in":"path","description":"Subscription ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Subscription updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Subscription not found"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/{subscription_id}/audit-log":{"get":{"tags":["Subscriptions"],"summary":"GET /admin/subscriptions/{subscription_id}/audit-log","operationId":"get_subscription_audit_log","parameters":[{"name":"subscription_id","in":"path","description":"Subscription ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Audit log retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Subscription not found"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/{user_id}/grant":{"post":{"tags":["Subscriptions"],"summary":"POST /admin/subscriptions/{user_id}/grant","operationId":"grant_subscription","parameters":[{"name":"user_id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Subscription granted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"session":[]}]}},"/api/v1/admin/subscriptions/{user_id}/revoke":{"post":{"tags":["Subscriptions"],"summary":"POST /admin/subscriptions/{user_id}/revoke","operationId":"revoke_subscription","parameters":[{"name":"user_id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Subscription revoked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Subscription not found"}},"security":[{"session":[]}]}},"/api/v1/admin/support/settings":{"get":{"tags":["Admin Support"],"summary":"Get support settings","description":"Returns the current support settings configuration.","operationId":"get_support_settings","responses":{"200":{"description":"Settings retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SupportSettingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"patch":{"tags":["Admin Support"],"summary":"Update support settings","description":"Updates the support settings configuration.","operationId":"update_support_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupportSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/templates":{"get":{"tags":["Admin Support"],"summary":"List all templates","operationId":"list_templates","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TemplateCategory"}}],"responses":{"200":{"description":"Templates retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TemplateListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"post":{"tags":["Admin Support"],"summary":"Create a new template","operationId":"create_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Template created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/templates/{template_id}":{"get":{"tags":["Admin Support"],"summary":"Get a specific template","operationId":"get_template","parameters":[{"name":"template_id","in":"path","description":"Template ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Template retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SupportTicketTemplateWithUser"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"put":{"tags":["Admin Support"],"summary":"Update an existing template","operationId":"update_template","parameters":[{"name":"template_id","in":"path","description":"Template ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Template updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_String"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"delete":{"tags":["Admin Support"],"summary":"Delete a template","operationId":"delete_template","parameters":[{"name":"template_id","in":"path","description":"Template ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Template deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_String"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets":{"get":{"tags":["Admin Support"],"summary":"Get all tickets for admin (filtered by permissions)","operationId":"list_admin_tickets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TicketCategory"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TicketStatus"}},{"name":"priority","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TicketPriority"}},{"name":"assigned_to","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"created_by","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Admin tickets retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminTicketListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}":{"get":{"tags":["Admin Support"],"summary":"Get a specific ticket for admin view","operationId":"get_admin_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Admin ticket details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_AdminTicketDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"put":{"tags":["Admin Support"],"summary":"Update a ticket (status, priority, assignment)","operationId":"update_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupportTicketRequest"}}},"required":true},"responses":{"200":{"description":"Ticket updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_String"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/ai-draft":{"post":{"tags":["Admin Support"],"summary":"Request an AI-drafted reply for a ticket (staff-only copilot).","description":"Authorizes exactly like a staff reply (session + `admin.support.respond` +\n`can_user_respond` + category visibility), loads the ticket server-side\n(never trusting ticket content from the request), then creates a durable\n`pending` draft request that the single-owner Hodor worker fulfils, and\nreturns 202 + a run id. It NEVER creates a support message, notification,\nstatus change, or realtime customer event — it is copilot-only.","operationId":"create_ai_draft","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"202":{"description":"Draft request accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/ai-draft/{run_id}":{"get":{"tags":["Admin Support"],"summary":"Read the result of an AI-draft request (staff-only).","operationId":"get_ai_draft","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"run_id","in":"path","description":"Draft run id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Draft result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Draft not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/close":{"put":{"tags":["Admin Support"],"summary":"Close a ticket","operationId":"close_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ticket closed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_String"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/mark-read":{"post":{"tags":["Admin Support"],"summary":"Mark a ticket as read in the admin support inbox","operationId":"mark_admin_ticket_read","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ticket marked as read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/messages":{"post":{"tags":["Admin Support"],"summary":"Add a staff response to a ticket","operationId":"add_staff_response","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketMessageRequest"}}},"required":true},"responses":{"201":{"description":"Staff response added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/tickets/{ticket_id}/notes":{"post":{"tags":["Admin Support"],"summary":"Add an internal staff note to a ticket (not visible to ticket creator)","operationId":"add_internal_note","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInternalNoteRequest"}}},"required":true},"responses":{"201":{"description":"Internal note added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/admin/support/user-context/{user_id}":{"get":{"tags":["Admin Support"],"summary":"Get aggregated user context for the support quick view panel.","description":"Looks up the user's Steam ID, then fetches punishments, playtime,\nand username history in parallel for efficient loading.","operationId":"get_user_context","parameters":[{"name":"user_id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Support user context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_UserContextResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/activate":{"post":{"tags":["Authentication"],"operationId":"accept_activate_account_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateAccountToken"}}},"required":true},"responses":{"200":{"description":"Account already activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"201":{"description":"Account activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/add_info":{"post":{"tags":["Authentication"],"operationId":"add_info","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Info"}}},"required":true},"responses":{"200":{"description":"Personal info saved","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid account state","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Account is not active","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"User info row missing","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/check_availability":{"post":{"tags":["Authentication"],"summary":"`POST /auth/check_availability`","description":"Step 1 of the auth-app register flow validates the basic fields against\nthe same rules `/auth/register` enforces, but without creating an\naccount. This lets us surface \"username/email already taken\" or \"password\ntoo weak\" errors before the user has had to pick a membership type, and\nkeeps the actual account creation gated on a deliberate later action\n(Sverok submit or Betalmedlem click).","operationId":"check_availability","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAvailability"}}},"required":true},"responses":{"200":{"description":"Availability checked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Already authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/connections":{"get":{"tags":["Authentication"],"summary":"Return all social connections for the current user, normalised into a\nuniform `{ username, avatar, unique_id, profile_url }` base shape with\nprovider-specific metadata where available.","operationId":"get_connections","responses":{"200":{"description":"Current social connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/connections/remove":{"post":{"tags":["Authentication"],"summary":"Generic connection removal using the universal auth system.","operationId":"remove_connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveConnection"}}},"required":true},"responses":{"200":{"description":"Connection removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid connection type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Impersonation cannot change account connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"Another login method is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"503":{"description":"Connection removal temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/country":{"put":{"tags":["Authentication"],"operationId":"set_country","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCountryRequest"}}},"required":true},"responses":{"200":{"description":"Country saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid account state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/deauth":{"put":{"tags":["Authentication"],"operationId":"deauth","responses":{"200":{"description":"Logged out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/email":{"get":{"tags":["Authentication"],"operationId":"get_email","responses":{"200":{"description":"Current user email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/exist":{"get":{"tags":["Authentication"],"operationId":"user_exist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"User existence check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExist"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Authentication"],"operationId":"accept_password_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLogin"}}},"required":true},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidCredentialsResponse"}}}},"429":{"description":"Too many login attempts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/login/passwordless":{"post":{"tags":["Authentication"],"operationId":"accept_passwordless","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordlessAccept"}}},"required":true},"responses":{"200":{"description":"Passwordless login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Already authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"503":{"description":"Login service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/login/passwordless/send":{"post":{"tags":["Authentication"],"operationId":"send_passwordless","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordlessRequest"}}},"required":true},"responses":{"200":{"description":"Passwordless send acknowledged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}}}}},"/api/v1/auth/password/reset":{"post":{"tags":["Authentication"],"operationId":"accept_password_reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetAccept"}}},"required":true},"responses":{"200":{"description":"Password reset accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Option_PasswordResetContinuationData"}}}},"400":{"description":"Invalid password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/password/reset/send":{"post":{"tags":["Authentication"],"operationId":"send_password_reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Password reset send acknowledged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/password/update":{"post":{"tags":["Authentication"],"operationId":"update_password","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordUpdate"}}},"required":true},"responses":{"200":{"description":"Password updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"No password set; use email recovery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"503":{"description":"Password change temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/permissions":{"get":{"tags":["Authentication"],"operationId":"get_permissions","responses":{"200":{"description":"Current permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/realtime/token":{"post":{"tags":["Authentication"],"summary":"Generate a one-time token for Socket.IO authentication\nRequires an authenticated session","operationId":"generate_realtime_token","responses":{"200":{"description":"Realtime token generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_RealtimeTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/register":{"post":{"tags":["Authentication"],"operationId":"initial_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Register"}}},"required":true},"responses":{"200":{"description":"User registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Already authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/register/start_paid":{"post":{"tags":["Authentication"],"operationId":"start_paid","responses":{"200":{"description":"Paid membership path started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid account state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Paid membership disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/renew":{"post":{"tags":["Authentication"],"operationId":"renew_membership","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRequest"}}},"required":true},"responses":{"202":{"description":"Renewal queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid renewal request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/renew_status":{"get":{"tags":["Authentication"],"operationId":"check_renew_status","responses":{"200":{"description":"Membership renewal status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/resend_activate":{"post":{"tags":["Authentication"],"operationId":"resend_activate","responses":{"201":{"description":"Activation email queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"User is already active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/resend_activate_token":{"post":{"tags":["Authentication"],"operationId":"resend_activate_account_email_by_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateAccountToken"}}},"required":true},"responses":{"201":{"description":"Activation email queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid token or already active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/auth/status":{"get":{"tags":["Authentication"],"operationId":"account_status","responses":{"200":{"description":"Account status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/user":{"get":{"tags":["Authentication"],"operationId":"get_curent_user","responses":{"200":{"description":"Current user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/user_info":{"get":{"tags":["Authentication"],"summary":"Get the current user's personal info","description":"Returns membership type, phone, and fullmedlem fields so the\nsettings form can pre-populate existing data.","operationId":"get_user_info","responses":{"200":{"description":"Current user personal info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_UserInfoResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"put":{"tags":["Authentication"],"summary":"Update the current user's personal details and optionally retry Sverok renewal","description":"This is the self-service endpoint for users who need to fill in their\nfullmedlem info after a SPAR lookup failure. It:\n1. Validates input (non-empty, reasonable lengths)\n2. Updates user_info with name and address fields\n3. Ensures membership_type is set to \"fullmedlem\"\n4. Optionally queues a new RenewMembershipJob if retry_renewal is true","operationId":"update_user_info","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonalInfo"}}},"required":true},"responses":{"200":{"description":"Personal info updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"202":{"description":"Personal info updated and renewal queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid personal info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/verify-code":{"post":{"tags":["Authentication"],"summary":"Verify account activation using 6-character code (requires authentication)","operationId":"verify_code","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeRequest"}}},"required":true},"responses":{"200":{"description":"Account already activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"201":{"description":"Account activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid or expired code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/auth/vip/unlock/sverok":{"post":{"tags":["Authentication"],"summary":"`POST /auth/vip/unlock/sverok`","description":"Föreningsmedlem commit step. Validates input, updates `user_info`,\nrecords consent and a durable membership intent. Unverified users receive\nan activation email; active users can dispatch the renewal worker now.","operationId":"sverok_unlock","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SverokUnlockRequest"}}},"required":true},"responses":{"202":{"description":"Sverok unlock data saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid unlock request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/ads":{"get":{"tags":["CS2 Public"],"operationId":"get_all_ads","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Ads retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}},"post":{"tags":["CS2 Public"],"operationId":"create_ad","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCoreAd"}}},"required":true},"responses":{"200":{"description":"Ad created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/ads/server/{server_id}":{"get":{"tags":["CS2 Public"],"operationId":"get_ads_by_server","parameters":[{"name":"server_id","in":"path","description":"Server ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Server ads retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/ads/{id}":{"get":{"tags":["CS2 Public"],"operationId":"get_ad_by_id","parameters":[{"name":"id","in":"path","description":"Ad ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ad retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"500":{"description":"Database error"}}},"put":{"tags":["CS2 Public"],"operationId":"update_ad","parameters":[{"name":"id","in":"path","description":"Ad ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCoreAd"}}},"required":true},"responses":{"200":{"description":"Ad updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"500":{"description":"Database error"}}},"delete":{"tags":["CS2 Public"],"operationId":"delete_ad","parameters":[{"name":"id","in":"path","description":"Ad ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ad deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"500":{"description":"Database error"}}}},"/api/v1/cs2/chatlogs":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/chatlogs","operationId":"get_filtered_chatlogs","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return (1-200)","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Number of results to skip for pagination","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","description":"Filter by server ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","description":"Filter by Steam ID","required":false,"schema":{"type":["string","null"]}},{"name":"player_name","in":"query","description":"Filter by player name","required":false,"schema":{"type":["string","null"]}},{"name":"map","in":"query","description":"Filter by map name","required":false,"schema":{"type":["string","null"]}},{"name":"team","in":"query","description":"Filter by team ('t', 'ct', 'spec')","required":false,"schema":{"type":["string","null"]}},{"name":"message_contains","in":"query","description":"Filter by message content","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","description":"Start date filter (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","description":"End date filter (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"/cs2/chatlogs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/chatlogs/metadata":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/chatlogs/metadata","operationId":"get_chatlog_metadata","responses":{"200":{"description":"/cs2/chatlogs/metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/chatlogs/server/{server_id}/recent":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/chatlogs/server/:server_id/recent","operationId":"get_recent_server_chatlogs","parameters":[{"name":"server_id","in":"path","description":"Server ID to get recent chatlogs from","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"/cs2/chatlogs/server/{server_id}/recent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/chatlogs/steamid/{steamid}":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/chatlogs/steamid/:steamid","operationId":"get_chatlogs_by_steamid","parameters":[{"name":"steamid","in":"path","description":"Steam ID to filter by","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"/cs2/chatlogs/steamid/{steamid}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/playtime":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/playtime","operationId":"get_filtered_playtime","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return (1-200)","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Number of results to skip for pagination","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","description":"Filter by server ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steam_id","in":"query","description":"Filter by Steam ID","required":false,"schema":{"type":["string","null"]}},{"name":"player_name","in":"query","description":"Filter by player name","required":false,"schema":{"type":["string","null"]}},{"name":"min_playtime","in":"query","description":"Minimum playtime in hours","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"lastseen_after","in":"query","description":"Last seen after date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}},{"name":"lastseen_before","in":"query","description":"Last seen before date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"/cs2/playtime","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/playtime-rewards/playtime-reward":{"post":{"tags":["CS2 Internal"],"summary":"Check and grant playtime rewards","description":"This endpoint is called by the CS2 server plugin to check if a player\nhas earned playtime rewards and grant them if applicable.","operationId":"check_playtime_reward","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaytimeRewardRequest"}}},"required":true},"responses":{"200":{"description":"Reward check successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PlaytimeRewardResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized - invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/cs2/playtime-rewards/playtime-reward/{steam_id}/{server_id}/status":{"get":{"tags":["CS2 Internal"],"summary":"Get playtime reward status without granting","description":"This endpoint returns the current playtime reward status for a player\nwithout actually granting any rewards.","operationId":"get_playtime_reward_status","parameters":[{"name":"steam_id","in":"path","description":"Steam ID of the player","required":true,"schema":{"type":"string"}},{"name":"server_id","in":"path","description":"Server ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PlaytimeRewardResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized - invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/cs2/playtime/metadata":{"get":{"tags":["CS2 Public"],"operationId":"get_playtime_metadata","responses":{"200":{"description":"Playtime metadata retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/playtime/recent/{hours}":{"get":{"tags":["CS2 Public"],"operationId":"get_recent_activity","parameters":[{"name":"hours","in":"path","description":"Number of hours to look back","required":true,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Recent activity retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/playtime/stats":{"get":{"tags":["CS2 Public"],"operationId":"get_playtime_stats","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return (1-200)","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Number of results to skip for pagination","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","description":"Filter by server ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steam_id","in":"query","description":"Filter by Steam ID","required":false,"schema":{"type":["string","null"]}},{"name":"player_name","in":"query","description":"Filter by player name","required":false,"schema":{"type":["string","null"]}},{"name":"min_playtime","in":"query","description":"Minimum playtime in hours","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"lastseen_after","in":"query","description":"Last seen after date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}},{"name":"lastseen_before","in":"query","description":"Last seen before date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Playtime stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/playtime/steam/{steam_id}/server/{server_id}":{"get":{"tags":["CS2 Public"],"summary":"GET /cs2/playtime/steam/:steam_id/server/:server_id","operationId":"get_playtime_by_steam_and_server","parameters":[{"name":"steam_id","in":"path","description":"Steam ID","required":true,"schema":{"type":"string"}},{"name":"server_id","in":"path","description":"Server ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"/cs2/playtime/steam/{steam_id}/server/{server_id}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}},"security":[{"session":[]}]}},"/api/v1/cs2/playtime/top":{"get":{"tags":["CS2 Public"],"operationId":"get_top_players","parameters":[{"name":"limit","in":"query","description":"Maximum number of results to return (1-200)","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Number of results to skip for pagination","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","description":"Filter by server ID","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steam_id","in":"query","description":"Filter by Steam ID","required":false,"schema":{"type":["string","null"]}},{"name":"player_name","in":"query","description":"Filter by player name","required":false,"schema":{"type":["string","null"]}},{"name":"min_playtime","in":"query","description":"Minimum playtime in hours","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"lastseen_after","in":"query","description":"Last seen after date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}},{"name":"lastseen_before","in":"query","description":"Last seen before date (YYYY-MM-DD HH:MM:SS)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Top players retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity":{"get":{"tags":["CS2 Public"],"operationId":"get_filtered_activity","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Filtered activity retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/metadata":{"get":{"tags":["CS2 Public"],"operationId":"get_activity_metadata","responses":{"200":{"description":"Activity metadata retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/online":{"get":{"tags":["CS2 Public"],"operationId":"get_online_players","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Online players retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/server/{server_id}/recent":{"get":{"tags":["CS2 Public"],"operationId":"get_recent_server_activity","parameters":[{"name":"server_id","in":"path","description":"Server ID to get recent activity for","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Recent server activity retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/sessions/{steamid}":{"get":{"tags":["CS2 Public"],"operationId":"get_player_sessions","parameters":[{"name":"steamid","in":"path","description":"Steam ID to get sessions for","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Player sessions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/stats":{"get":{"tags":["CS2 Public"],"operationId":"get_activity_stats","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Activity stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-activity/steamid/{steamid}":{"get":{"tags":["CS2 Public"],"operationId":"get_activity_by_steamid","parameters":[{"name":"steamid","in":"path","description":"Steam ID to get activity for","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"server_id","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ip","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"event_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Activity retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username":{"get":{"tags":["CS2 Public"],"operationId":"get_filtered_usernames","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username_contains","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Filtered usernames retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/duplicates":{"get":{"tags":["CS2 Public"],"operationId":"get_duplicate_usernames","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username_contains","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Duplicate usernames retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/metadata":{"get":{"tags":["CS2 Public"],"operationId":"get_username_metadata","responses":{"200":{"description":"Username metadata retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/recent/{days}":{"get":{"tags":["CS2 Public"],"operationId":"get_recent_username_changers","parameters":[{"name":"days","in":"path","description":"Number of days to look back","required":true,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username_contains","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Recent username changers retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/search":{"get":{"tags":["CS2 Public"],"operationId":"search_similar_usernames","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username_contains","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Similar usernames retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Bad request - search term required"},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/stats":{"get":{"tags":["CS2 Public"],"operationId":"get_username_stats","responses":{"200":{"description":"Username stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/steamid/{steamid}":{"get":{"tags":["CS2 Public"],"operationId":"get_usernames_by_steamid","parameters":[{"name":"steamid","in":"path","description":"Steam ID to get usernames for","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"steamid","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"username_contains","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"start_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"end_date","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Usernames retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/steamid/{steamid}/current":{"get":{"tags":["CS2 Public"],"operationId":"get_current_username","parameters":[{"name":"steamid","in":"path","description":"Steam ID to get current username for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current username retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"404":{"description":"Not found"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/steamid/{steamid}/history":{"get":{"tags":["CS2 Public"],"operationId":"get_player_username_history","parameters":[{"name":"steamid","in":"path","description":"Steam ID to get username history for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Username history retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/cs2/track-username/username/{username}/steamids":{"get":{"tags":["CS2 Public"],"operationId":"get_steamids_by_username","parameters":[{"name":"username","in":"path","description":"Username to get Steam IDs for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Steam IDs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Database error"}}}},"/api/v1/health":{"get":{"tags":["Health"],"operationId":"health_status_endpoint","responses":{"200":{"description":"All services are healthy"},"503":{"description":"One or more services are unhealthy"}}}},"/api/v1/health/json":{"get":{"tags":["Health"],"operationId":"health_check_endpoint","responses":{"200":{"description":"Health received"}}}},"/api/v1/ladders":{"get":{"tags":["Ladders"],"summary":"List active ladder definitions for the UI nav.","operationId":"list_ladders","responses":{"200":{"description":"Active ladder definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LaddersListResponse"}}}}}}},"/api/v1/ladders/hub":{"get":{"tags":["Ladders"],"summary":"The redesigned hub: active ladders grouped into category sections for one status bucket, with\na top-N peek per card and global status counts for the tab badges.","operationId":"ladders_hub","parameters":[{"name":"status","in":"query","description":"Status bucket: `live` (default) | `upcoming` | `completed`. The Swedish URL tokens\n`aktuella`/`kommande`/`tidigare` are accepted too.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Ladder hub","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LaddersHubResponse"}}}}}}},"/api/v1/ladders/metrics":{"get":{"tags":["Ladders"],"summary":"List every available ladder metric (for the UI metric picker).","operationId":"list_metrics","responses":{"200":{"description":"Ladder metric catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_MetricsResponse"}}}}}}},"/api/v1/ladders/query":{"get":{"tags":["Ladders"],"summary":"Run an ad-hoc ladder query: rank players by `metric` over `period`, scoped to `mode`.","description":"Example — \"Most headshots on Retakes during July 2026\":\n`GET /api/v1/ladders/query?metric=headshots&mode=retakes&period=2026-07`.","operationId":"query_ladder","parameters":[{"name":"metric","in":"query","description":"Metric key (e.g. `headshots`, `points`, `kills`). See `GET /ladders/metrics`.","required":true,"schema":{"type":"string"}},{"name":"mode","in":"query","description":"Game mode to scope to (e.g. `retakes`). Omit to span all modes (incl. `dev`).","required":false,"schema":{"type":["string","null"]}},{"name":"period","in":"query","description":"`alltime` (default) | `YYYY-MM` | `rolling:<days>` | `week` | `week:YYYY-Www` | `range`.","required":false,"schema":{"type":["string","null"]}},{"name":"from","in":"query","description":"Range start (RFC3339); required when `period=range`.","required":false,"schema":{"type":["string","null"]}},{"name":"to","in":"query","description":"Range end (RFC3339); required when `period=range`.","required":false,"schema":{"type":["string","null"]}},{"name":"exclude_warmup","in":"query","description":"Exclude warmup rounds (default `true`).","required":false,"schema":{"type":["boolean","null"]}},{"name":"exclude_bots","in":"query","description":"Exclude bot subjects (default `true`).","required":false,"schema":{"type":["boolean","null"]}},{"name":"limit","in":"query","description":"Page size (default 25, clamped to 1..=500).","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","description":"Page offset (default 0).","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"Ladder standings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LadderResponse"}}}},"400":{"description":"Invalid metric or period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/ladders/seasons/{season_slug}/players/{steam_id}":{"get":{"tags":["Ladders"],"summary":"A single player's rank/value within a specific season.","operationId":"get_season_player","parameters":[{"name":"season_slug","in":"path","description":"Season slug","required":true,"schema":{"type":"string"}},{"name":"steam_id","in":"path","description":"Player Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player season standing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SeasonPlayerResponse"}}}},"400":{"description":"Invalid steam_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"No such season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/ladders/seasons/{season_slug}/standings":{"get":{"tags":["Ladders"],"summary":"A specific season's standings. Live seasons compute from ClickHouse (cached); completed seasons\nserve their frozen snapshot (raw events may be past their ClickHouse TTL).","operationId":"get_season_standings","parameters":[{"name":"season_slug","in":"path","description":"Season slug","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"Season standings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SeasonStandingsResponse"}}}},"404":{"description":"No such season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/ladders/status-counts":{"get":{"tags":["Ladders"],"summary":"Cheap variant of the hub status counts for tab-badge polling.","operationId":"status_counts","responses":{"200":{"description":"Season status counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SeasonStatusCountsDto"}}}}}}},"/api/v1/ladders/{slug}":{"get":{"tags":["Ladders"],"summary":"A named ladder's definition plus its current standings, in one call.","operationId":"get_ladder","parameters":[{"name":"slug","in":"path","description":"Ladder definition slug","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Override the definition's default page size (clamped 1..=500).","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32","minimum":0}}],"responses":{"200":{"description":"Ladder standings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LadderStandingsResponse"}}}},"404":{"description":"No such ladder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/ladders/{slug}/players/{steam_id}":{"get":{"tags":["Ladders"],"summary":"A single player's rank and value within a named ladder.","operationId":"get_ladder_player","parameters":[{"name":"slug","in":"path","description":"Ladder definition slug","required":true,"schema":{"type":"string"}},{"name":"steam_id","in":"path","description":"Player Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player standing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PlayerStandingResponse"}}}},"400":{"description":"Invalid steam_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"No such ladder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/ladders/{slug}/seasons":{"get":{"tags":["Ladders"],"summary":"All seasons of a definition (for the detail-page season selector), newest first.","operationId":"list_ladder_seasons","parameters":[{"name":"slug","in":"path","description":"Ladder definition slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Seasons of a ladder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LadderSeasonsResponse"}}}},"404":{"description":"No such ladder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches":{"get":{"tags":["Matches"],"operationId":"list_public_lobbies","parameters":[{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"game_type","in":"query","description":"Filter by game type","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of public lobbies with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Matches"],"operationId":"create_match_session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMatchSessionRequest"}}},"required":true},"responses":{"200":{"description":"Match session created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/available-maps":{"get":{"tags":["Matches"],"summary":"Get available maps for a specific game type, mode, and format","operationId":"get_available_maps","parameters":[{"name":"game_type","in":"query","description":"Game type (cs2, valorant, etc.)","required":true,"schema":{"type":"string"}},{"name":"game_mode","in":"query","description":"Game mode (casual, ranked, etc.)","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Format (5v5, 3v3, etc.)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Available maps retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/dathost/webhooks/events":{"post":{"tags":["Webhooks"],"summary":"Main event-driven webhook endpoint (recommended by dathost)\nThis receives all types of events in a single webhook","operationId":"dathost_webhook_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDrivenWebhook"}}},"required":true},"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid webhook payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Invalid webhook authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/dathost/webhooks/match-end":{"post":{"tags":["Webhooks"],"summary":"Legacy match end webhook endpoint (for DatHost match_end_url)\nThis receives match end events without the events array structure","operationId":"dathost_legacy_match_end_handler","requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Legacy match end webhook processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid webhook payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Invalid webhook authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/matches/dathost/servers":{"get":{"tags":["Matches"],"operationId":"list_dathost_servers","responses":{"200":{"description":"List of Dathost servers"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/matches/dathost/servers/{server_id}":{"get":{"tags":["Matches"],"operationId":"get_dathost_server","parameters":[{"name":"server_id","in":"path","description":"The Dathost server ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Dathost server details"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/matches/{match_id}/launch":{"post":{"tags":["Matches"],"operationId":"launch_match_server","parameters":[{"name":"match_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match server launched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/my":{"get":{"tags":["Matches"],"operationId":"get_my_sessions","parameters":[{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"User's match sessions with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/recent-finished":{"get":{"tags":["Matches"],"operationId":"list_recent_finished_matches","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Recent finished matches with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/search":{"get":{"tags":["Matches"],"operationId":"search_lobbies","parameters":[{"name":"search","in":"query","description":"Search term","required":false,"schema":{"type":"string"}},{"name":"game_type","in":"query","description":"Filter by game type","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Search results with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid search parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/webhooks/dathost/health":{"get":{"tags":["Webhooks"],"summary":"Health check endpoint for webhook system","operationId":"webhook_health_check","responses":{"200":{"description":"Webhook system is healthy","content":{"application/json":{"schema":{}}}}}}},"/api/v1/matches/{match_id}":{"get":{"tags":["Matches"],"operationId":"get_match_session","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match session details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"put":{"tags":["Matches"],"operationId":"update_match_session","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchSessionRequest"}}},"required":true},"responses":{"200":{"description":"Match session updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"delete":{"tags":["Matches"],"operationId":"delete_match_session","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match session deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/autobalance":{"post":{"tags":["Matches"],"operationId":"trigger_autobalance","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoBalanceRequest"}}},"required":true},"responses":{"200":{"description":"Teams balanced successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid balance strategy or cannot balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/balance-status":{"get":{"tags":["Matches"],"operationId":"get_balance_status","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Balance status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/{match_id}/captain":{"post":{"tags":["Matches"],"operationId":"set_captain","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCaptainRequest"}}},"required":true},"responses":{"200":{"description":"Captain set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid captain assignment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/chat":{"post":{"tags":["Matches"],"operationId":"send_chat_message","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequest"}}},"required":true},"responses":{"200":{"description":"Chat message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"User not in match or match not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/check-in":{"post":{"tags":["Matches"],"operationId":"check_in_to_match","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checked in successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request or already checked in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Not eligible for this match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/join":{"post":{"tags":["Matches"],"operationId":"join_match","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successfully joined match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot join match or invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/leave":{"post":{"tags":["Matches"],"operationId":"leave_match","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully left match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot leave match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/lobby-events":{"get":{"tags":["Matches"],"operationId":"get_lobby_events","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"ISO 8601 timestamp to get events since","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of events to return (default: 50)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of lobby events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid timestamp format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/{match_id}/match-events":{"get":{"tags":["Matches"],"operationId":"get_match_events","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}},{"name":"event_type","in":"query","description":"Filter by event type","required":false,"schema":{"type":"string"}},{"name":"round_number","in":"query","description":"Filter by round number","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","description":"Maximum number of events to return (default: 50)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of match events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/{match_id}/participants":{"get":{"tags":["Matches"],"operationId":"get_participants","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}},{"name":"team_side","in":"query","description":"Filter by team side","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of match participants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/matches/{match_id}/participants/{user_id}/team":{"put":{"tags":["Matches"],"operationId":"update_team_assignment","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}},{"name":"user_id","in":"path","description":"User ID to assign team","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamAssignmentRequest"}}},"required":true},"responses":{"200":{"description":"Team assignment updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid team assignment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session or participant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/pick-phase/pick-player":{"post":{"tags":["Matches"],"operationId":"pick_team_player","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickTeamPlayerRequest"}}},"required":true},"responses":{"200":{"description":"Player picked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot pick player","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/pick-player":{"post":{"tags":["Matches"],"operationId":"pick_player","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickPlayerRequest"}}},"required":true},"responses":{"200":{"description":"Player picked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot pick player","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/ready":{"put":{"tags":["Matches"],"operationId":"set_ready_status","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetReadyStatusRequest"}}},"required":true},"responses":{"200":{"description":"Ready status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session or participant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/ready-check/restart":{"post":{"tags":["Matches"],"operationId":"restart_ready_check","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ready check restarted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot restart ready check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/results":{"get":{"tags":["Matches"],"operationId":"get_match_results","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match session not found or no results available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"put":{"tags":["Matches"],"operationId":"update_match_results","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchResultsRequest"}}},"required":true},"responses":{"200":{"description":"Match results updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/server":{"get":{"tags":["Matches"],"operationId":"get_match_server","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match server connection details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"User not an active participant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match or server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/start-match":{"post":{"tags":["Matches"],"summary":"Unified start match function that begins with ready_check and handles conditional flow","operationId":"startMatch","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match started successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Cannot start match - lobby not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/status":{"put":{"tags":["Matches"],"operationId":"update_match_status","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchStatusRequest"}}},"required":true},"responses":{"200":{"description":"Match status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data or status transition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/veto":{"get":{"tags":["Matches"],"operationId":"get_veto_status","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Veto process status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match session or veto process not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Matches"],"operationId":"start_veto","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVetoRequest"}}},"required":true},"responses":{"200":{"description":"Veto process started successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid veto request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/matches/{match_id}/veto/action":{"post":{"tags":["Matches"],"operationId":"perform_veto_action","parameters":[{"name":"match_id","in":"path","description":"Match session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VetoActionRequest"}}},"required":true},"responses":{"200":{"description":"Veto action performed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid veto action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match session or veto process not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/news":{"get":{"tags":["News"],"summary":"List news posts with filters (management view)","operationId":"list_news_posts","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NewsStatus"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"author_id","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"platform","in":"query","description":"Filter to posts assigned to this platform code (e.g. `midgard`).","required":false,"schema":{"type":"string"}},{"name":"featured_on_platform","in":"query","description":"Filter to posts featured on the specified platform (requires `platform`).","required":false,"schema":{"type":"boolean"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"News posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PaginatedResponse_Vec_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"post":{"tags":["News"],"summary":"Create a new news post","operationId":"create_news_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNewsPostRequest"}}},"required":true},"responses":{"201":{"description":"News post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/activity":{"get":{"tags":["News"],"summary":"Get recent news activity across all posts","operationId":"get_recent_news_activity","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Recent news activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_NewsAuditLogWithUserAndPost"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/preview/{slug}":{"get":{"tags":["News"],"summary":"Preview any news post by slug (including unpublished - requires authentication)","operationId":"get_news_post_preview","parameters":[{"name":"slug","in":"path","description":"News post slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"News post preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/public":{"get":{"tags":["News"],"summary":"Get published news posts (public endpoint)","operationId":"get_published_news_posts","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"platform","in":"query","description":"Scope to a single platform code (e.g. `playpark`, `midgard`).\nWhen omitted, defaults to `playpark` for backwards compatibility while\nstill preventing cross-platform leakage on legacy public callers.","required":false,"schema":{"type":["string","null"]}},{"name":"featured_on_platform","in":"query","description":"When `true`, only posts featured on the requested platform are returned.\nRequires `platform` to be set to be meaningful.","required":false,"schema":{"type":["boolean","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"page","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}}],"responses":{"200":{"description":"Published news posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PublicNewsResponse_Vec_NewsPostSummary"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/public/categories":{"get":{"tags":["News"],"summary":"Get available news categories (public endpoint)","operationId":"get_news_categories","parameters":[{"name":"platform","in":"query","description":"Optional platform code to scope the lookup. When set, the post must be\nassigned to that platform or the lookup returns 404.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"News categories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_String"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/public/featured":{"get":{"tags":["News"],"summary":"Get featured news posts for a specific platform (public endpoint).\n`platform` query param is required since per-platform featured is the only\nsource of truth after the multi-platform migration.","operationId":"get_featured_news_posts","parameters":[{"name":"platform","in":"query","description":"Required: platform code to fetch featured posts for.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}}],"responses":{"200":{"description":"Featured news posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_NewsPostSummary"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/public/stats":{"get":{"tags":["News"],"operationId":"get_news_stats","parameters":[{"name":"platform","in":"query","description":"Optional platform code to scope the lookup. When set, the post must be\nassigned to that platform or the lookup returns 404.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"News statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsStats"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/public/{short_code}/{slug}":{"get":{"tags":["News"],"summary":"Get a published news post by immutable short code and title slug.\nThe slug segment is decorative; clients should redirect to the returned\n`canonical_path` when it differs from the requested URL.","operationId":"get_published_news_post_by_short_code","parameters":[{"name":"short_code","in":"path","description":"Immutable news short code","required":true,"schema":{"type":"string"}},{"name":"slug","in":"path","description":"Decorative news slug","required":true,"schema":{"type":"string"}},{"name":"platform","in":"query","description":"Optional platform code to scope the lookup. When set, the post must be\nassigned to that platform or the lookup returns 404.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Published news post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/public/{slug}":{"get":{"tags":["News"],"summary":"Get a published news post by slug (public endpoint)","operationId":"get_published_news_post_by_slug","parameters":[{"name":"slug","in":"path","description":"News post slug","required":true,"schema":{"type":"string"}},{"name":"platform","in":"query","description":"Optional platform code to scope the lookup. When set, the post must be\nassigned to that platform or the lookup returns 404.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Published news post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/news/{id}":{"get":{"tags":["News"],"summary":"Get a news post by ID (management view)","operationId":"get_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"put":{"tags":["News"],"summary":"Update a news post","operationId":"update_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNewsPostRequest"}}},"required":true},"responses":{"200":{"description":"News post updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"delete":{"tags":["News"],"summary":"Delete a news post (soft delete)","operationId":"delete_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"News post deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/audit":{"get":{"tags":["News"],"summary":"Get audit log for a specific news post","operationId":"get_news_post_audit_log","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"News post audit log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_NewsAuditLogWithUser"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/duplicate":{"post":{"tags":["News"],"summary":"Duplicate a news post","operationId":"duplicate_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/publish":{"post":{"tags":["News"],"summary":"Publish a news post","operationId":"publish_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/restore":{"post":{"tags":["News"],"summary":"Restore a deleted news post","operationId":"restore_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPost"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/schedule":{"post":{"tags":["News"],"summary":"Schedule a news post for future publication.","operationId":"schedule_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRequest"}}},"required":true},"responses":{"200":{"description":"News post scheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"400":{"description":"Invalid schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/social":{"get":{"tags":["News"],"summary":"List social media posts for a specific news article.","operationId":"list_social_posts_for_news","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Social posts for news article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_SocialMediaPost"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"post":{"tags":["News"],"summary":"Create a new social media post for a news article (manual).","operationId":"create_social_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSocialPostRequest"}}},"required":true},"responses":{"200":{"description":"Social post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_SocialMediaPost"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/unpublish":{"post":{"tags":["News"],"summary":"Unpublish a news post","operationId":"unpublish_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post unpublished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"News post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/news/{id}/unschedule":{"post":{"tags":["News"],"summary":"Cancel a scheduled news post (revert to draft).","operationId":"unschedule_news_post","parameters":[{"name":"id","in":"path","description":"News post ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"News post unscheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_NewsPostWithAuthor"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/payments/checkout":{"post":{"tags":["Payments"],"summary":"POST /payments/checkout\nCreates a payment order and returns a redirect URL for the provider's checkout page.","operationId":"create_checkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Checkout created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_CheckoutResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/payments/orders":{"get":{"tags":["Payments"],"summary":"GET /payments/orders\nList the user's payment orders.","operationId":"get_user_orders","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Payment orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_OrderStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/payments/orders/{id}":{"get":{"tags":["Payments"],"summary":"GET /payments/orders/{id}\nGet the status of a payment order (own orders only).","operationId":"get_order_status","parameters":[{"name":"id","in":"path","description":"Payment order ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Order status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_OrderStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/payments/prices":{"get":{"tags":["Payments"],"summary":"GET /payments/prices\nGet active subscription prices.","description":"Public endpoint — returns a sanitized projection that omits provider\nproduct mappings (`polar_product_id`). Those mappings are an internal\nconfiguration detail; exposing them publicly would let any visitor\nobserve which Polar products back which tier before paid VIP is even\nopen. The full row, including `polar_product_id`, is reachable via\n`/admin/payments/prices` for operators with `admin.payments.read`.","operationId":"get_prices","responses":{"200":{"description":"Active prices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_PublicSubscriptionPrice"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/payments/provider-subscriptions/me":{"get":{"tags":["Payments"],"summary":"GET /payments/provider-subscriptions/me","description":"Returns active provider-side subscription mappings for the authenticated\nuser. Used by the billing settings page to surface\n`cancel_at_period_end` / `current_period_end` alongside the local\nsubscription record.","operationId":"get_my_provider_subscriptions","responses":{"200":{"description":"Active provider subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_PaymentProviderSubscription"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/punishments/bans":{"get":{"tags":["Punishments"],"operationId":"get_bans","parameters":[{"name":"page","in":"query","description":"Page number, defaults to 1","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Items per page, defaults to 30 and is capped at 100","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","description":"Optional player, Steam ID, admin, or reason search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public read list of server bans. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"500":{"description":"Database error"}}}},"/api/v1/punishments/bans/{id}":{"get":{"tags":["Punishments"],"operationId":"get_ban_by_id","parameters":[{"name":"id","in":"path","description":"Ban ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Public read details for a server ban. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"404":{"description":"Ban not found"},"500":{"description":"Database error"}}}},"/api/v1/punishments/comms":{"get":{"tags":["Punishments"],"operationId":"get_comms","parameters":[{"name":"page","in":"query","description":"Page number, defaults to 1","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Items per page, defaults to 30 and is capped at 100","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","description":"Optional player, Steam ID, admin, or reason search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public read list of communication bans. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"500":{"description":"Database error"}}}},"/api/v1/punishments/comms/{id}":{"get":{"tags":["Punishments"],"operationId":"get_comm_by_id","parameters":[{"name":"id","in":"path","description":"Communication ban ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Public read details for a communication ban. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"404":{"description":"Communication ban not found"},"500":{"description":"Database error"}}}},"/api/v1/punishments/ctbans":{"get":{"tags":["Punishments"],"operationId":"get_ctbans","parameters":[{"name":"page","in":"query","description":"Page number, defaults to 1","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Items per page, defaults to 30 and is capped at 100","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","description":"Optional player, Steam ID, admin, or reason search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public read list of CT bans. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"500":{"description":"Database error"}}}},"/api/v1/punishments/ctbans/{id}":{"get":{"tags":["Punishments"],"operationId":"get_ctban_by_id","parameters":[{"name":"id","in":"path","description":"CT ban ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Public read details for a CT ban. No authentication or admin permission is required.","content":{"application/json":{"schema":{}}}},"404":{"description":"CT ban not found"},"500":{"description":"Database error"}}}},"/api/v1/records/players/{identifier}/summaries":{"get":{"tags":["Records"],"operationId":"get_player_summaries","parameters":[{"name":"identifier","in":"path","description":"Steam ID or username","required":true,"schema":{"type":"string"}},{"name":"modes","in":"query","description":"Comma-separated list of modes (surf,bhop,minigames)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player summaries retrieved successfully"},"400":{"description":"Invalid game mode"},"404":{"description":"Player not found"},"500":{"description":"Internal server error"}}}},"/api/v1/records/{mode}/leaderboard":{"get":{"tags":["Records"],"operationId":"get_leaderboard","parameters":[{"name":"mode","in":"path","description":"Game mode (surf, bhop, or minigames)","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of results (default: 50, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Offset for pagination (default: 0)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Leaderboard retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardEntry"}}}}},"400":{"description":"Invalid game mode"},"500":{"description":"Internal server error"}}}},"/api/v1/records/{mode}/maps/best":{"get":{"tags":["Records"],"operationId":"get_maps_best","parameters":[{"name":"mode","in":"path","description":"Game mode (surf, bhop, or minigames)","required":true,"schema":{"type":"string"}},{"name":"style","in":"query","description":"Style filter","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","description":"Number of results (default: 50, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Offset for pagination (default: 0)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Best records per map retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MapBestRecord"}}}}},"400":{"description":"Invalid game mode"},"500":{"description":"Internal server error"}}}},"/api/v1/records/{mode}/maps/{map_name}/top":{"get":{"tags":["Records"],"operationId":"get_map_top","parameters":[{"name":"mode","in":"path","description":"Game mode (surf, bhop, or minigames)","required":true,"schema":{"type":"string"}},{"name":"map_name","in":"path","description":"Map name","required":true,"schema":{"type":"string"}},{"name":"style","in":"query","description":"Style filter","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","description":"Number of results (default: 50, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Offset for pagination (default: 0)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Top records for map retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MapBestRecord"}}}}},"400":{"description":"Invalid game mode"},"500":{"description":"Internal server error"}}}},"/api/v1/records/{mode}/players/{identifier}":{"get":{"tags":["Records"],"operationId":"get_player_summary","parameters":[{"name":"mode","in":"path","description":"Game mode (surf, bhop, or minigames)","required":true,"schema":{"type":"string"}},{"name":"identifier","in":"path","description":"Steam ID or username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player summary retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerSummary"}}}},"400":{"description":"Invalid game mode"},"404":{"description":"Player not found"},"500":{"description":"Internal server error"}}}},"/api/v1/records/{mode}/records/search":{"get":{"tags":["Records"],"operationId":"search_records_handler","parameters":[{"name":"mode","in":"path","description":"Game mode (surf, bhop, or minigames)","required":true,"schema":{"type":"string"}},{"name":"username","in":"query","description":"Username to search for (partial, case-insensitive)","required":false,"schema":{"type":"string"}},{"name":"steamid","in":"query","description":"Steam ID to search for (exact)","required":false,"schema":{"type":"string"}},{"name":"map","in":"query","description":"Map name to filter by (partial, case-insensitive)","required":false,"schema":{"type":"string"}},{"name":"style","in":"query","description":"Style filter","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"best_per_map","in":"query","description":"Return best record per map (default: true if username/steamid present)","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Number of results (default: 50, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Offset for pagination (default: 0)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Records retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MapBestRecord"}}}}},"400":{"description":"Invalid game mode"},"500":{"description":"Internal server error"}}}},"/api/v1/search/global/{query}":{"get":{"tags":["Search"],"operationId":"global_search","parameters":[{"name":"query","in":"path","description":"Search query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Global search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalSearchResponse"}}}},"400":{"description":"Invalid search query"},"500":{"description":"Internal server error"}}}},"/api/v1/skins/data/agents":{"get":{"tags":["Skins"],"operationId":"get_agents_catalog","responses":{"200":{"description":"Agent catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_AgentEntry"}}}}}}},"/api/v1/skins/data/collectibles":{"get":{"tags":["Skins"],"operationId":"get_collectibles_catalog","responses":{"200":{"description":"Collectibles catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_PinEntry"}}}}}}},"/api/v1/skins/data/gloves":{"get":{"tags":["Skins"],"operationId":"get_gloves_catalog","responses":{"200":{"description":"Glove catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_GloveEntry"}}}}}}},"/api/v1/skins/data/keychains":{"get":{"tags":["Skins"],"operationId":"get_keychains_catalog","responses":{"200":{"description":"Keychain catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_KeychainEntry"}}}}}}},"/api/v1/skins/data/music":{"get":{"tags":["Skins"],"operationId":"get_music_catalog","responses":{"200":{"description":"Music kit catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_MusicEntry"}}}}}}},"/api/v1/skins/data/pins":{"get":{"tags":["Skins"],"operationId":"get_pins_catalog","responses":{"200":{"description":"Pin catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_PinEntry"}}}}}}},"/api/v1/skins/data/registry":{"get":{"tags":["Skins"],"operationId":"get_registry_info","responses":{"200":{"description":"Skins registry metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}}}}},"/api/v1/skins/data/skins/{weapon_name}":{"get":{"tags":["Skins"],"operationId":"get_skins_for_weapon","parameters":[{"name":"weapon_name","in":"path","description":"Weapon name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Skins for weapon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_SkinEntry"}}}},"404":{"description":"No skins found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/skins/data/stickers":{"get":{"tags":["Skins"],"operationId":"get_stickers_catalog","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Sticker catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}}}}},"/api/v1/skins/data/weapons":{"get":{"tags":["Skins"],"operationId":"get_weapons_catalog","responses":{"200":{"description":"Weapon catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}}}}},"/api/v1/skins/loadouts":{"get":{"tags":["Skins"],"operationId":"list_loadouts","responses":{"200":{"description":"Skin loadouts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_LoadoutListResponse"}}}},"400":{"description":"Missing linked Steam account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"post":{"tags":["Skins"],"operationId":"create_loadout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLoadoutRequest"}}},"required":true},"responses":{"201":{"description":"Loadout created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/loadouts/reorder":{"put":{"tags":["Skins"],"operationId":"reorder_loadouts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderLoadoutsRequest"}}},"required":true},"responses":{"200":{"description":"Loadouts reordered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/loadouts/{loadout_id}":{"put":{"tags":["Skins"],"operationId":"rename_loadout","parameters":[{"name":"loadout_id","in":"path","description":"Loadout ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameLoadoutRequest"}}},"required":true},"responses":{"200":{"description":"Loadout renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Loadout not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"delete":{"tags":["Skins"],"operationId":"delete_loadout","parameters":[{"name":"loadout_id","in":"path","description":"Loadout ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Loadout deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Cannot delete loadout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Loadout not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/loadouts/{loadout_id}/activate":{"post":{"tags":["Skins"],"operationId":"activate_loadout","parameters":[{"name":"loadout_id","in":"path","description":"Loadout ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Loadout activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Missing linked Steam account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Loadout not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player":{"get":{"tags":["Skins"],"operationId":"get_player_loadout","responses":{"200":{"description":"Player skin loadout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PlayerLoadout"}}}},"400":{"description":"Missing linked Steam account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/agents":{"put":{"tags":["Skins"],"operationId":"save_agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAgentRequest"}}},"required":true},"responses":{"200":{"description":"Agent saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/gloves":{"put":{"tags":["Skins"],"operationId":"save_gloves","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveGlovesRequest"}}},"required":true},"responses":{"200":{"description":"Gloves saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/gloves/{team}":{"delete":{"tags":["Skins"],"operationId":"delete_gloves","parameters":[{"name":"team","in":"path","description":"Weapon team","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Gloves reset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/knife":{"put":{"tags":["Skins"],"operationId":"save_knife","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveKnifeRequest"}}},"required":true},"responses":{"200":{"description":"Knife saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/music":{"put":{"tags":["Skins"],"operationId":"save_music","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMusicRequest"}}},"required":true},"responses":{"200":{"description":"Music kit saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/weapon":{"put":{"tags":["Skins"],"operationId":"save_weapon_skin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveWeaponSkinRequest"}}},"required":true},"responses":{"200":{"description":"Weapon skin saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid skin request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/player/weapon/{team}/{defindex}":{"delete":{"tags":["Skins"],"operationId":"delete_weapon_skin","parameters":[{"name":"team","in":"path","description":"Weapon team","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"defindex","in":"path","description":"Weapon definition index","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Weapon skin reset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/skins/settings":{"put":{"tags":["Skins"],"operationId":"update_skin_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkinSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Skin settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Active membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store":{"get":{"tags":["Store"],"operationId":"get_case_data","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"item_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"item_types","in":"query","required":false,"schema":{"type":"string"}},{"name":"storefront","in":"query","description":"Optional storefront code (`playpark`, `midgard`, ...). When set, the\nadmin items list scopes to items published on that storefront.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Store case data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/add-item-to-case":{"post":{"tags":["Store"],"operationId":"add_item_to_case","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddItemToCaseRequest"}}},"required":true},"responses":{"201":{"description":"Item added to case","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/circulation-check":{"get":{"tags":["Store"],"operationId":"check_circulation","responses":{"200":{"description":"Circulation check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_CirculationCheck"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/create_item":{"post":{"tags":["Store"],"operationId":"create_item","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateItemRequest"}}},"required":true},"responses":{"201":{"description":"Item created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/get_single_item":{"get":{"tags":["Store"],"operationId":"get_single_item","parameters":[{"name":"item_id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Store item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/give-drop":{"post":{"tags":["Store"],"operationId":"give_drop","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiveDropRequest"}}},"required":true},"responses":{"201":{"description":"Drop given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/latest":{"get":{"tags":["Store"],"operationId":"get_latest_drops","responses":{"200":{"description":"Latest drops","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/store/open":{"get":{"tags":["Store"],"operationId":"get_open_drop","parameters":[{"name":"drop_id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"test","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Open drop result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"400":{"description":"Invalid drop","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/recent-openings":{"get":{"tags":["Store"],"operationId":"get_recent_case_openings","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"source_types","in":"query","required":false,"schema":{"type":"string"}},{"name":"show_unused","in":"query","required":false,"schema":{"type":"string"}},{"name":"drop_id","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Recent case openings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/store/remove-item-from-case":{"delete":{"tags":["Store"],"operationId":"remove_item_from_case","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveItemFromCaseRequest"}}},"required":true},"responses":{"200":{"description":"Item removed from case","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/shop":{"get":{"tags":["Store"],"summary":"List shop items scoped to a storefront. The displayed `price` is the\nstorefront-specific price, in the storefront's currency.","operationId":"get_shop_items","parameters":[{"name":"storefront","in":"query","description":"Storefront `code` to scope the response to. Defaults to `playpark`.","required":false,"schema":{"type":["string","null"]}},{"name":"item_type","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"sort","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Shop items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_ShopItem"}}}},"400":{"description":"Invalid storefront","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/store/shop/categories":{"get":{"tags":["Store"],"summary":"List the distinct `item_type` categories available on a storefront.","operationId":"get_shop_categories","parameters":[{"name":"storefront","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Shop categories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Vec_ShopCategory"}}}},"400":{"description":"Invalid storefront","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/store/shop/purchase":{"post":{"tags":["Store"],"summary":"Purchase an item from a specific storefront, charging the storefront's\ncurrency.","operationId":"purchase_item","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseRequest"}}},"required":true},"responses":{"200":{"description":"Purchase completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_PurchaseResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/stats":{"get":{"tags":["Store"],"operationId":"get_drop_stats","responses":{"200":{"description":"Drop statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_Value"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/store/update-case-item-drop-rate":{"put":{"tags":["Store"],"operationId":"update_case_item_drop_rate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCaseItemDropRateRequest"}}},"required":true},"responses":{"200":{"description":"Drop rate updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/update_item":{"put":{"tags":["Store"],"operationId":"update_item","parameters":[{"name":"item_id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateItemRequest"}}},"required":true},"responses":{"200":{"description":"Item updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_ApiNull"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/store/users-with-unused-item":{"get":{"tags":["Store"],"operationId":"get_users_with_unused_item","parameters":[{"name":"item_id","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"include_used","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Users with unused item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_UsersWithUnusedItemResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"GET /subscriptions","operationId":"get_user_subscriptions","responses":{"200":{"description":"User subscriptions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"}},"security":[{"session":[]}]},"post":{"tags":["Subscriptions"],"summary":"POST /subscriptions","operationId":"purchase_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Subscription purchased successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request or insufficient funds"},"401":{"description":"Unauthorized"}},"security":[{"session":[]}]}},"/api/v1/subscriptions/transactions":{"get":{"tags":["Subscriptions"],"summary":"GET /subscriptions/transactions","operationId":"get_transaction_history","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}}],"responses":{"200":{"description":"Transaction history retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"}},"security":[{"session":[]}]}},"/api/v1/subscriptions/{subscription_type}":{"get":{"tags":["Subscriptions"],"summary":"GET /subscriptions/{subscription_type}","operationId":"get_subscription_status","parameters":[{"name":"subscription_type","in":"path","description":"Subscription type (premium, vip, pro)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Subscription status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User or subscription not found"}},"security":[{"session":[]}]},"delete":{"tags":["Subscriptions"],"summary":"DELETE /subscriptions/{subscription_type}","operationId":"cancel_subscription","parameters":[{"name":"subscription_type","in":"path","description":"Subscription type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Subscription cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid subscription type"},"401":{"description":"Unauthorized"},"404":{"description":"Subscription not found"}},"security":[{"session":[]}]}},"/api/v1/subscriptions/{subscription_type}/auto-renew":{"patch":{"tags":["Subscriptions"],"summary":"PATCH /subscriptions/{subscription_type}/auto-renew","operationId":"toggle_auto_renew","parameters":[{"name":"subscription_type","in":"path","description":"Subscription type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleAutoRenewRequest"}}},"required":true},"responses":{"200":{"description":"Auto-renewal setting updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid subscription type"},"401":{"description":"Unauthorized"},"404":{"description":"Subscription not found"}},"security":[{"session":[]}]}},"/api/v1/subscriptions/{subscription_type}/resume":{"post":{"tags":["Subscriptions"],"summary":"POST /subscriptions/{subscription_type}/resume","description":"Reverse a previously-scheduled cancellation so the subscription continues\nto renew. Inverse of [`cancel_subscription`]. Idempotent: a fully-active\nsubscription returns 200 with the existing record.","operationId":"resume_subscription","parameters":[{"name":"subscription_type","in":"path","description":"Subscription type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Renewal resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid subscription type"},"401":{"description":"Unauthorized"},"404":{"description":"Subscription not found"},"502":{"description":"Payment provider rejected the request"}},"security":[{"session":[]}]}},"/api/v1/teams":{"get":{"tags":["Teams"],"operationId":"list_teams","parameters":[{"name":"search","in":"query","description":"Search by team name, description, or tag","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of teams with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Teams"],"operationId":"create_team","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"200":{"description":"Team created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/invitations":{"get":{"tags":["Teams"],"operationId":"get_my_invitations","responses":{"200":{"description":"List of user's pending invitations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/invitations/{invitation_id}/respond":{"post":{"tags":["Teams"],"operationId":"respond_to_invitation","parameters":[{"name":"invitation_id","in":"path","description":"Invitation ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondInvitationRequest"}}},"required":true},"responses":{"200":{"description":"Invitation response recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/join-requests":{"get":{"tags":["Teams"],"operationId":"get_my_join_requests","responses":{"200":{"description":"List of user's join requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/join-requests/{request_id}/respond":{"post":{"tags":["Teams"],"operationId":"respond_to_join_request","parameters":[{"name":"request_id","in":"path","description":"Join request ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondJoinRequestRequest"}}},"required":true},"responses":{"200":{"description":"Join request response recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Join request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/my-history":{"get":{"tags":["Teams"],"operationId":"get_my_team_history","parameters":[{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"User's team history with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/my-teams":{"get":{"tags":["Teams"],"operationId":"get_my_teams","responses":{"200":{"description":"List of user's teams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/search":{"get":{"tags":["Teams"],"operationId":"search_teams","parameters":[{"name":"search","in":"query","description":"Search term","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Search results with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/teams/user/{user_id}":{"get":{"tags":["Teams"],"operationId":"get_user_teams","parameters":[{"name":"user_id","in":"path","description":"User ID to get teams for","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of user's teams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/teams/{team_id}":{"get":{"tags":["Teams"],"operationId":"get_team","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Team details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"delete":{"tags":["Teams"],"operationId":"delete_team","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Team deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"patch":{"tags":["Teams"],"operationId":"update_team","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}},"required":true},"responses":{"200":{"description":"Team updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/history":{"get":{"tags":["Teams"],"operationId":"get_team_history","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Team history with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Must be a team member to view history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/invitations":{"get":{"tags":["Teams"],"operationId":"get_team_invitations","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of team invitations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/invite":{"post":{"tags":["Teams"],"operationId":"invite_user","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}},"required":true},"responses":{"200":{"description":"Invitation sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"User is already a team member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/join-request":{"post":{"tags":["Teams"],"operationId":"create_join_request","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequestRequest"}}},"required":true},"responses":{"200":{"description":"Join request created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"User is already a team member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/join-requests":{"get":{"tags":["Teams"],"operationId":"get_team_join_requests","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of pending join requests for team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/leave":{"post":{"tags":["Teams"],"operationId":"leave_team","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Left team successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Team owner cannot leave team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/members":{"get":{"tags":["Teams"],"operationId":"get_team_members","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of team members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/teams/{team_id}/members/{user_id}/kick":{"post":{"tags":["Teams"],"operationId":"kick_member","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"user_id","in":"path","description":"User ID to kick","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KickMemberRequest"}}},"required":true},"responses":{"200":{"description":"Member kicked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions or cannot kick owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/members/{user_id}/role":{"put":{"tags":["Teams"],"operationId":"change_member_role","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"user_id","in":"path","description":"User ID to change role","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeRoleRequest"}}},"required":true},"responses":{"200":{"description":"Role updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid role specified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Only team owner can change roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/teams/{team_id}/transfer-ownership":{"post":{"tags":["Teams"],"operationId":"transfer_ownership","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipRequest"}}},"required":true},"responses":{"200":{"description":"Ownership transferred successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"New owner must be a team member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Only team owner can transfer ownership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tickets":{"get":{"tags":["Support"],"summary":"Get all tickets for the current user","operationId":"list_user_tickets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"platform","in":"query","description":"Optional platform filter — when set, only tickets scoped to this\nplatform code (e.g. `midgard`) are returned. Tickets with no\nplatform (legacy or generic) are excluded from a filtered listing.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"User tickets retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TicketListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]},"post":{"tags":["Support"],"summary":"Create a new support ticket","operationId":"create_ticket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportTicketRequest"}}},"required":true},"responses":{"201":{"description":"Ticket created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TicketCreatedResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/tickets/{ticket_id}":{"get":{"tags":["Support"],"summary":"Get a specific ticket and its messages","operationId":"get_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ticket details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TicketDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/tickets/{ticket_id}/close":{"put":{"tags":["Support"],"summary":"Close user's own ticket","operationId":"close_user_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ticket closed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_String"}}}},"400":{"description":"Ticket already closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden - Not your ticket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/tickets/{ticket_id}/mark-read":{"post":{"tags":["Support"],"summary":"Upsert the viewer's `last_read_at` for a ticket they own.","description":"Called by the user-facing ticket detail page on mount and whenever a new\nrealtime reply arrives, so the list-view `unread_count` accurately reflects\nwhat the user has actually seen.","operationId":"mark_ticket_read","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Ticket marked as read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TicketReadResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Not your ticket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/tickets/{ticket_id}/reply":{"post":{"tags":["Support"],"summary":"Add a message to a ticket","operationId":"add_message_to_ticket","parameters":[{"name":"ticket_id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketMessageRequest"}}},"required":true},"responses":{"201":{"description":"Message added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccessEnvelope_TicketReplyCreatedResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Ticket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/api/v1/tournaments":{"get":{"tags":["Tournaments"],"operationId":"list_tournaments","parameters":[{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of tournaments with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Tournaments"],"operationId":"create_tournament","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTournamentRequest"}}},"required":true},"responses":{"200":{"description":"Tournament created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/map-pools":{"get":{"tags":["Tournaments"],"summary":"Get available map pools for tournament creation/editing","operationId":"get_available_map_pools","parameters":[{"name":"game","in":"query","description":"Filter by game type (e.g., 'cs2')","required":false,"schema":{"type":"string"}},{"name":"game_format","in":"query","description":"Filter by game format (e.g., '5v5')","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of available map pools","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/my-active-checkins":{"get":{"tags":["Tournaments"],"operationId":"get_my_active_checkins","responses":{"200":{"description":"List of tournaments requiring check-in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/search":{"get":{"tags":["Tournaments"],"operationId":"search_tournaments","parameters":[{"name":"search","in":"query","description":"Search term","required":false,"schema":{"type":"string"}},{"name":"game_type","in":"query","description":"Filter by game type","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"sort_by","in":"query","description":"Sort field (scheduled_start, registration_deadline, created_at, updated_at)","required":false,"schema":{"type":"string"}},{"name":"sort_order","in":"query","description":"Sort order (asc or desc)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search results with pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/slug/{slug}":{"get":{"tags":["Tournaments"],"operationId":"get_tournament_by_slug","parameters":[{"name":"slug","in":"path","description":"Tournament slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tournament details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/team/{team_id}/registrations":{"get":{"tags":["Tournaments"],"operationId":"get_team_registrations","parameters":[{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of team tournament registrations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/{tournament_id}":{"get":{"tags":["Tournaments"],"operationId":"get_tournament","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Tournament details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"delete":{"tags":["Tournaments"],"operationId":"delete_tournament","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Tournament deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"patch":{"tags":["Tournaments"],"operationId":"update_tournament","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTournamentRequest"}}},"required":true},"responses":{"200":{"description":"Tournament updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/admin-register":{"post":{"tags":["Tournaments"],"summary":"POST /{tournament_id}/admin-register - Admin adds a team or player to a tournament.\nBypasses status, deadline, and start time checks. Auto-confirms the registration.","operationId":"admin_register_participant","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Registration added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"Already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/admins":{"get":{"tags":["Tournaments"],"operationId":"get_tournament_admins","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of tournament admins","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"post":{"tags":["Tournaments"],"operationId":"add_tournament_admin","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTournamentAdminRequest"}}},"required":true},"responses":{"200":{"description":"Tournament admin added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/admins/{admin_user_id}":{"put":{"tags":["Tournaments"],"operationId":"update_admin_role","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"admin_user_id","in":"path","description":"Admin user ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminRoleRequest"}}},"required":true},"responses":{"200":{"description":"Admin role updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament or admin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"delete":{"tags":["Tournaments"],"operationId":"remove_tournament_admin","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"admin_user_id","in":"path","description":"Admin user ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Tournament admin removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament or admin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/brackets":{"get":{"tags":["Tournaments"],"operationId":"get_tournament_brackets","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of tournament brackets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Tournaments"],"operationId":"create_bracket","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBracketRequest"}}},"required":true},"responses":{"200":{"description":"Bracket created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/brackets/{bracket_id}":{"get":{"tags":["Tournaments"],"operationId":"get_bracket","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"bracket_id","in":"path","description":"Bracket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Bracket details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Bracket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"put":{"tags":["Tournaments"],"operationId":"update_bracket_data","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"bracket_id","in":"path","description":"Bracket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBracketDataRequest"}}},"required":true},"responses":{"200":{"description":"Bracket data updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Bracket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]},"delete":{"tags":["Tournaments"],"operationId":"delete_bracket","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"bracket_id","in":"path","description":"Bracket ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Bracket deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Bracket not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/brackets/{bracket_id}/matches/{match_number}":{"patch":{"tags":["Tournaments"],"summary":"PATCH /{tournament_id}/brackets/{bracket_id}/matches/{match_number}\nPatch a single match within a bracket. Applies changes to the current\nbracket state atomically — safe to use while matches are in progress.","operationId":"patch_bracket_match","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"bracket_id","in":"path","description":"Bracket ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"match_number","in":"path","description":"Match number within the bracket","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchBracketMatchRequest"}}},"required":true},"responses":{"200":{"description":"Match updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/check-in":{"post":{"tags":["Tournaments"],"operationId":"check_in_to_tournament","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Check-in successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Check-in not allowed at this time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Registration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"Already checked in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/generate-brackets":{"post":{"tags":["Tournaments"],"operationId":"generate_tournament_brackets","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Brackets generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request or tournament state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/maps":{"get":{"tags":["Tournaments"],"summary":"Get maps for a specific tournament (from its map pool)","operationId":"get_tournament_maps","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Tournament maps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/{tournament_id}/matches":{"get":{"tags":["Tournaments"],"operationId":"get_tournament_matches","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of tournament matches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"post":{"tags":["Tournaments"],"operationId":"create_match","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMatchRequest"}}},"required":true},"responses":{"200":{"description":"Match created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/matches/{match_id}":{"get":{"tags":["Tournaments"],"operationId":"get_match","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"match_id","in":"path","description":"Match ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Match details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}},"delete":{"tags":["Tournaments"],"operationId":"delete_match","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"match_id","in":"path","description":"Match ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Match deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/matches/{match_id}/external-match":{"put":{"tags":["Tournaments"],"operationId":"update_match_external_id","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"match_id","in":"path","description":"Match ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchIdRequest"}}},"required":true},"responses":{"200":{"description":"External match ID updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Match not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/register":{"post":{"tags":["Tournaments"],"operationId":"register_for_tournament","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterTournamentRequest"}}},"required":true},"responses":{"200":{"description":"Registration successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"Already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/registrations":{"get":{"tags":["Tournaments"],"operationId":"get_tournament_registrations","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number (default: 1)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page_size","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of tournament registrations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/v1/tournaments/{tournament_id}/registrations/{participant_id}/manual-checkin":{"post":{"tags":["Tournaments"],"operationId":"manual_check_in_participant","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"participant_id","in":"path","description":"Participant ID (team_id for team tournaments, user_id for 1v1)","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Manual check-in successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Check-in not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Registration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"409":{"description":"Already checked in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/registrations/{team_id}":{"delete":{"tags":["Tournaments"],"operationId":"cancel_registration","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Registration cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Registration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/registrations/{team_id}/status":{"patch":{"tags":["Tournaments"],"operationId":"update_registration_status","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"team_id","in":"path","description":"Team ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRegistrationStatusRequest"}}},"required":true},"responses":{"200":{"description":"Registration status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Registration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/tournaments/{tournament_id}/status":{"patch":{"tags":["Tournaments"],"operationId":"update_tournament_status","parameters":[{"name":"tournament_id","in":"path","description":"Tournament ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTournamentStatusRequest"}}},"required":true},"responses":{"200":{"description":"Tournament status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Tournament not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"authorization":[]}]}},"/api/v1/users/{user_id}/transactions":{"get":{"tags":["Coins"],"operationId":"get_user_transactions","parameters":[{"name":"user_id","in":"path","description":"User ID to get transactions for","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"Page number for pagination (default: 1)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"limit","in":"query","description":"Number of items per page (default: 20, max: 100)","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"currency_code","in":"query","description":"Filter by currency code (e.g. `playpark_coins`, `midgard_goldcoin`)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"403":{"description":"Access denied - can only view own transactions or need admin permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}},"security":[{"session":[]}]}},"/external/emails/resend":{"post":{"tags":["Webhooks"],"summary":"POST /external/emails/resend\nReceives Resend email events relayed and re-signed by the `resend-router`\nservice. The request body is the original Resend event JSON; the signature\nheaders belong to the relay, not Resend/Svix.","operationId":"resend_webhook","requestBody":{"description":"Raw webhook payload","content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Webhook received"},"400":{"description":"Invalid webhook payload"},"401":{"description":"Invalid webhook signature"},"500":{"description":"Transient processing failure"}}}},"/external/esplay":{"post":{"tags":["Esplay"],"summary":"Primary esplay webhook endpoint.","operationId":"esplay_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsplayEvent"}}},"required":true},"responses":{"200":{"description":"Created"}}}},"/external/esplay/test":{"post":{"tags":["Esplay"],"summary":"Legacy endpoint kept for backward compatibility.","operationId":"esplay_logger","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EsplayEvent"}}},"required":true},"responses":{"200":{"description":"Created"}}}},"/external/payments/polar":{"post":{"tags":["Webhooks"],"summary":"POST /external/payments/polar\nReceives signed Polar webhook notifications.","description":"The handler is built around the `payment_webhook_receipts` state machine:\n`received -> resolved -> enqueued -> processed`, with `failed` as a\nrecoverable side state. A retry from Polar resumes from the current\nstate instead of being silently acked, which prevents transient enqueue\nor provider-fetch failures from permanently dropping a payment.","operationId":"polar_webhook","requestBody":{"description":"Raw webhook payload","content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"Webhook received"},"400":{"description":"Invalid webhook payload"},"401":{"description":"Invalid webhook signature"},"500":{"description":"Transient processing failure"}}}},"/internal/ip_verdict":{"post":{"tags":["Platform"],"operationId":"ip_verdict","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpVerdictResponse"}}}}}}},"/internal/minecraft_user_info":{"post":{"tags":["Platform"],"operationId":"minecraft_info_route","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinecraftInfoBody"}}},"required":true},"responses":{"200":{"description":"Minecraft user info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinecraftInfoResponse"}}}}}}},"/internal/server/bans":{"post":{"tags":["Server"],"summary":"Create a new ban.","description":"The `server_id` is automatically derived from the authenticated server token.","operationId":"create_ban","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBanRequest"}}},"required":true},"responses":{"200":{"description":"Ban created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBanResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/bans/{ban_id}/unban":{"post":{"tags":["Server"],"summary":"Unban a player by ban ID.","operationId":"unban","parameters":[{"name":"ban_id","in":"path","description":"Ban ID to revoke","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnbanRequest"}}},"required":true},"responses":{"200":{"description":"Player unbanned successfully"},"401":{"description":"Invalid or missing server token"},"404":{"description":"Ban not found for this server"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/bans/{steamid}":{"get":{"tags":["Server"],"summary":"Check if a player has an active ban.","operationId":"check_ban","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ban status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBanResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/coins/balance/{user_id}":{"get":{"tags":["Server"],"summary":"Get a user's coin balances visible to this token.","description":"Returns a `currency_code -> balance` map. If the token has a currency scope,\nthe response is filtered to that scope (so a Midgård token can't read a\nuser's `playpark_coins` balance). Missing currencies should be treated as 0.","operationId":"get_balance","parameters":[{"name":"user_id","in":"path","description":"PlayPark user id to look up","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Balances retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"400":{"description":"Invalid user_id"},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/coins/deduct":{"post":{"tags":["Server"],"summary":"Deduct coins from a user from this server.","description":"Same scope rules as `grant`. Returns 400 if the user lacks sufficient balance.","operationId":"deduct_coins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeductCoinsRequest"}}},"required":true},"responses":{"200":{"description":"Coins deducted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoinMutationResponse"}}}},"400":{"description":"Invalid request or insufficient balance"},"401":{"description":"Invalid or missing server token"},"403":{"description":"Token not allowed to deduct this currency or use this endpoint"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/coins/grant":{"post":{"tags":["Server"],"summary":"Grant coins to a user from this server.","description":"The acting `server_id` is derived from the bearer token, and the token's\n`allowed_currencies` scope is enforced against the requested currency.","operationId":"grant_coins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCoinsRequest"}}},"required":true},"responses":{"200":{"description":"Coins granted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoinMutationResponse"}}}},"400":{"description":"Invalid request"},"401":{"description":"Invalid or missing server token"},"403":{"description":"Token not allowed to grant this currency or use this endpoint"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/comms":{"post":{"tags":["Server"],"summary":"Create a new communication ban (mute or gag).","description":"Use `type: \"MUTE\"` to block voice chat, or `type: \"GAG\"` to block text chat.","operationId":"create_comm","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommRequest"}}},"required":true},"responses":{"200":{"description":"Comm ban created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/comms/{comm_id}/unmute":{"post":{"tags":["Server"],"summary":"Remove a communication ban by ID.","operationId":"unmute","parameters":[{"name":"comm_id","in":"path","description":"Communication ban ID to remove","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnmuteRequest"}}},"required":true},"responses":{"200":{"description":"Comm ban removed successfully"},"401":{"description":"Invalid or missing server token"},"404":{"description":"Comm ban not found for this server"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/comms/{steamid}":{"get":{"tags":["Server"],"summary":"Check all active communication bans for a player.","description":"Returns separate `muted` and `gagged` booleans for quick checking,\nplus the full list of active comm bans.","operationId":"check_comms","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Comm status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCommsResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/ctbans":{"post":{"tags":["Server"],"summary":"Create a new CT (Counter-Terrorist) team ban.","description":"Prevents the player from playing on the CT side.","operationId":"create_ctban","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCtbanRequest"}}},"required":true},"responses":{"200":{"description":"CT ban created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCtbanResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/ctbans/{ctban_id}/remove":{"post":{"tags":["Server"],"summary":"Remove a CT ban by ID (soft deactivation).","operationId":"remove_ctban","parameters":[{"name":"ctban_id","in":"path","description":"CT ban ID to remove","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"CT ban removed successfully"},"401":{"description":"Invalid or missing server token"},"404":{"description":"CT ban not found"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/ctbans/{steamid}":{"get":{"tags":["Server"],"summary":"Check if a player has an active CT ban.","operationId":"check_ctban","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CT ban status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCtbanResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/players/{steamid}/groups":{"get":{"tags":["Server"],"summary":"Get a player's permission groups and permission nodes.","description":"Resolves the Steam ID to a Playpark account, then returns all\npermission groups and resolved permission nodes. Returns empty\narrays if the player has no linked account.","operationId":"get_groups","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player groups and permissions retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerGroupsResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/players/{steamid}/status":{"get":{"tags":["Server"],"summary":"Get full punishment status for a player.","description":"This is the primary endpoint called on every player connect. It checks\nbans, communication bans, CT bans, and warnings concurrently in a single\nrequest, replacing what was previously 4+ separate MySQL queries.","operationId":"player_status","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Full player status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerStatusResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/rewards/playtime":{"post":{"tags":["Server"],"summary":"Grant a playtime reward to a user.","description":"The currency is determined by the bearer token's scope. The amount is fixed\nat 1 for now.","operationId":"grant_playtime_reward","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaytimeRewardRequest"}}},"required":true},"responses":{"200":{"description":"Reward granted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaytimeRewardResponse"}}}},"400":{"description":"Token must be scoped to exactly one currency"},"401":{"description":"Invalid or missing server token"},"403":{"description":"Token not allowed to use this endpoint"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/warns":{"post":{"tags":["Server"],"summary":"Create a new warning.","description":"Warnings can be used to track player infractions. When a threshold\nis reached, the game server can automatically escalate to a ban.","operationId":"create_warn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWarnRequest"}}},"required":true},"responses":{"200":{"description":"Warning created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWarnResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/warns/{steamid}":{"get":{"tags":["Server"],"summary":"Get all active warnings for a player.","operationId":"get_warns","parameters":[{"name":"steamid","in":"path","description":"Player's Steam ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Warnings retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWarnsResponse"}}}},"401":{"description":"Invalid or missing server token"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/server/warns/{warn_id}/remove":{"post":{"tags":["Server"],"summary":"Remove a warning by ID (sets status to EXPIRED).","operationId":"remove_warn","parameters":[{"name":"warn_id","in":"path","description":"Warning ID to remove","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Warning removed successfully"},"401":{"description":"Invalid or missing server token"},"404":{"description":"Warning not found for this server"},"500":{"description":"Internal server error"}},"security":[{"authorization":[]}]}},"/internal/user_info":{"post":{"tags":["Platform"],"operationId":"info_route","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponse"}}}}}}}},"components":{"schemas":{"AccountConflictDiagnostic":{"type":"object","required":["request_id","event_code","observed_at","conflicting_account"],"properties":{"conflicting_account":{"$ref":"#/components/schemas/DiagnosticAccount"},"event_code":{"type":"string"},"observed_at":{"type":"integer","format":"int64"},"request_id":{"type":"string"}}},"ActivateAccountToken":{"type":"object","required":["email","token"],"properties":{"email":{"type":"string"},"token":{"type":"string"}}},"ActivePunishmentCounts":{"type":"object","description":"Counts of active punishments for inline status chips","required":["bans","comms","ctbans","warns"],"properties":{"bans":{"type":"integer","minimum":0},"comms":{"type":"integer","minimum":0},"ctbans":{"type":"integer","minimum":0},"warns":{"type":"integer","minimum":0}}},"ActiveSubscriptionCounts":{"type":"object","required":["premium","vip","pro"],"properties":{"premium":{"type":"integer","format":"int32"},"pro":{"type":"integer","format":"int32"},"vip":{"type":"integer","format":"int32"}}},"AddCoinsRequest":{"type":"object","required":["user_id","amount"],"properties":{"amount":{"type":"integer","format":"int32","description":"Amount of coins to add (1-10000)"},"currency_code":{"type":["string","null"],"description":"Currency to credit. Defaults to `playpark_coins`."},"description":{"type":["string","null"],"description":"Optional description for the transaction"},"user_id":{"type":"integer","format":"int32","description":"User ID to add coins to"}}},"AddItemToCaseRequest":{"type":"object","required":["case_id","item_id"],"properties":{"case_id":{"type":"integer","format":"int32","minimum":1},"item_id":{"type":"integer","format":"int32","minimum":1}}},"AddTournamentAdminRequest":{"type":"object","required":["username","role"],"properties":{"permissions":{},"role":{"type":"string"},"username":{"type":"string"}}},"AdminCoinAdjustmentResponse":{"type":"object","required":["transaction_id","user_id","amount","new_balance"],"properties":{"amount":{"type":"integer","format":"int32"},"new_balance":{"type":"integer","format":"int32"},"transaction_id":{"type":"integer","format":"int32"},"user_id":{"type":"integer","format":"int32"}}},"AdminCoinTransactionsResponse":{"type":"object","required":["transactions","page","limit"],"properties":{"limit":{"type":"integer","format":"int32"},"page":{"type":"integer","format":"int32"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/AdminTransactionResponse"}}}},"AdminCoinUsersResponse":{"type":"object","required":["users","page","limit"],"properties":{"limit":{"type":"integer","format":"int32"},"page":{"type":"integer","format":"int32"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserBalanceInfo"}}}},"AdminEmailDetailResponse":{"type":"object","required":["email","events"],"properties":{"email":{"$ref":"#/components/schemas/AdminEmailDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/AdminEmailEventDto"}}}},"AdminEmailDto":{"type":"object","required":["id","to","subject","status","provider","created_at"],"properties":{"avatar":{"type":["string","null"]},"created_at":{"type":"integer","format":"int64","description":"Unix seconds."},"delivered_at":{"type":["integer","null"],"format":"int64"},"failed_at":{"type":["integer","null"],"format":"int64"},"id":{"type":"integer","format":"int64","minimum":0},"last_error":{"type":["string","null"]},"last_event":{"type":["string","null"]},"provider":{"type":"string"},"provider_message_id":{"type":["string","null"]},"sent_at":{"type":["integer","null"],"format":"int64"},"status":{"type":"string"},"subject":{"type":"string"},"to":{"type":"string"},"user_id":{"type":["integer","null"],"format":"int32"},"username":{"type":["string","null"]}}},"AdminEmailEventDto":{"type":"object","required":["id","event_type","provider","provider_event_id","received_at"],"properties":{"event_type":{"type":"string"},"id":{"type":"integer","format":"int64","minimum":0},"last_error":{"type":["string","null"]},"processed_at":{"type":["integer","null"],"format":"int64"},"provider":{"type":"string"},"provider_event_id":{"type":"string"},"provider_message_id":{"type":["string","null"]},"received_at":{"type":"integer","format":"int64","description":"Unix seconds."}}},"AdminEmailListResponse":{"type":"object","required":["emails","total","limit","offset"],"properties":{"emails":{"type":"array","items":{"$ref":"#/components/schemas/AdminEmailDto"}},"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"AdminPaymentOrderDetailResponse":{"type":"object","required":["order","events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/PaymentEvent"}},"order":{"$ref":"#/components/schemas/PaymentOrder"}}},"AdminPaymentOrdersResponse":{"type":"object","required":["orders","total"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/PaymentOrder"}},"total":{"type":"integer","format":"int64"}}},"AdminRegisterRequest":{"type":"object","properties":{"registration_data":{},"team_id":{"type":["integer","null"],"format":"int32"},"user_id":{"type":["integer","null"],"format":"int32"}}},"AdminTicketDetailResponse":{"type":"object","required":["ticket","messages","can_respond","can_manage","sla"],"properties":{"can_manage":{"type":"boolean"},"can_respond":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketMessageWithUser"}},"sla":{"$ref":"#/components/schemas/TicketSlaInfo"},"ticket":{"$ref":"#/components/schemas/SupportTicketWithUser"}}},"AdminTicketListResponse":{"type":"object","required":["tickets","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketWithUser"}},"total":{"type":"integer","format":"int64"}}},"AdminTransactionResponse":{"type":"object","required":["id","user_id","username","currency_code","transaction_type","amount","balance_before","balance_after","source","created_at","has_premium","premium_auto_renew"],"properties":{"amount":{"type":"integer","format":"int32","description":"Amount of coins in the transaction"},"avatar":{"type":["string","null"],"description":"User's avatar URL"},"balance_after":{"type":"integer","format":"int32","description":"Balance after this transaction"},"balance_before":{"type":"integer","format":"int32","description":"Balance before this transaction"},"case_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CaseReference","description":"Case information if reference_type is CASE"}]},"created_at":{"type":"string","description":"Transaction timestamp"},"currency_code":{"type":"string","description":"Currency code for this transaction"},"description":{"type":["string","null"],"description":"Optional transaction description"},"has_premium":{"type":"boolean","description":"Whether user has active premium subscription"},"id":{"type":"integer","format":"int32","description":"Transaction ID"},"initiated_by":{"type":["integer","null"],"format":"int32","description":"User ID who initiated the transaction (if admin)"},"initiated_by_username":{"type":["string","null"],"description":"Username of who initiated the transaction"},"premium_auto_renew":{"type":"boolean","description":"Premium subscription auto renewal setting"},"premium_expires_at":{"type":["string","null"],"format":"date-time","description":"Premium subscription expiry date"},"reference_id":{"type":["string","null"],"description":"Reference ID (drop ID for cases)"},"reference_type":{"type":["string","null"],"description":"Reference type (CASE, MANUAL, etc.)"},"source":{"type":"string","description":"Source of the transaction (ADMIN, SYSTEM, etc.)"},"transaction_type":{"type":"string","description":"Type of transaction (CREDIT or DEBIT)"},"user_id":{"type":"integer","format":"int32","description":"User ID for this transaction"},"username":{"type":"string","description":"Username of the user"}}},"AgentEntry":{"type":"object","description":"A player agent entry from the catalog.","required":["team","image","model","agent_name"],"properties":{"agent_name":{"type":"string"},"image":{"type":"string"},"model":{"type":"string"},"team":{"type":"integer","format":"int32"}}},"ApiErrorBody":{"type":"object","description":"Stable public error body nested under `ApiResponse.error`.","required":["code","message"],"properties":{"code":{"type":"string"},"details":{},"message":{"type":"string"},"request_id":{"type":["string","null"]}}},"ApiErrorEnvelope":{"type":"object","description":"OpenAPI schema for standardized error response envelopes.","required":["status","message","data","error"],"properties":{"data":{"type":"null"},"error":{"$ref":"#/components/schemas/ApiErrorBody"},"message":{"type":"string"},"status":{"type":"string"}}},"ApiNull":{"type":"null"},"ApiResponse":{"type":"object","description":"Standard API response wrapper.\n\nAll API responses are wrapped in this structure for consistency.","required":["status","message","data","error"],"properties":{"data":{},"error":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ApiErrorBody"}]},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminCoinAdjustmentResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["transaction_id","user_id","amount","new_balance"],"properties":{"amount":{"type":"integer","format":"int32"},"new_balance":{"type":"integer","format":"int32"},"transaction_id":{"type":"integer","format":"int32"},"user_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminCoinTransactionsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["transactions","page","limit"],"properties":{"limit":{"type":"integer","format":"int32"},"page":{"type":"integer","format":"int32"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/AdminTransactionResponse"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminCoinUsersResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["users","page","limit"],"properties":{"limit":{"type":"integer","format":"int32"},"page":{"type":"integer","format":"int32"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserBalanceInfo"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminEmailDetailResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["email","events"],"properties":{"email":{"$ref":"#/components/schemas/AdminEmailDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/AdminEmailEventDto"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminEmailListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["emails","total","limit","offset"],"properties":{"emails":{"type":"array","items":{"$ref":"#/components/schemas/AdminEmailDto"}},"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminPaymentOrderDetailResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["order","events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/PaymentEvent"}},"order":{"$ref":"#/components/schemas/PaymentOrder"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminPaymentOrdersResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["orders","total"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/PaymentOrder"}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminTicketDetailResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["ticket","messages","can_respond","can_manage","sla"],"properties":{"can_manage":{"type":"boolean"},"can_respond":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketMessageWithUser"}},"sla":{"$ref":"#/components/schemas/TicketSlaInfo"},"ticket":{"$ref":"#/components/schemas/SupportTicketWithUser"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AdminTicketListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["tickets","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketWithUser"}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_ApiNull":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"null"},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AuthDiagnosticReferenceResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["user_id","request_id"],"properties":{"request_id":{"type":"string"},"user_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AuthDiagnosticsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["observed_at","account","login_methods","renewed","payment_evidence","email_evidence"],"properties":{"account":{"$ref":"#/components/schemas/DiagnosticAccount"},"email_evidence":{"$ref":"#/components/schemas/DiagnosticEmailEvidence","description":"Requires the existing admin.emails.view permission independently."},"latest_conflict":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AccountConflictDiagnostic","description":"A historical attempt; this does not assert the account is still blocked."}]},"login_methods":{"$ref":"#/components/schemas/DiagnosticLoginMethods","description":"Credential availability for the current target only, never hashes or IDs."},"observed_at":{"type":"integer","format":"int64","description":"When this bounded evidence read began; source timestamps remain distinct."},"payment_evidence":{"$ref":"#/components/schemas/DiagnosticPaymentEvidence","description":"Requires the existing admin.payments.read permission independently."},"renewed":{"type":"boolean"},"sverok_processing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SverokProcessing"}]}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_AuthTriageResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["schema_version","observed_at","target_user_id","confirmed_facts","possible_explanations","missing_evidence","supported_actions","actions_are_suggestions","staff_escalation","evidence"],"properties":{"actions_are_suggestions":{"type":"boolean","description":"Always true: this packet grants no tool authority to act."},"confirmed_facts":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"evidence":{"$ref":"#/components/schemas/AuthDiagnosticsResponse","description":"The same bounded evidence shown by the diagnostics screen. Consumers\nmust preserve its source/permission distinctions and no-store policy."},"missing_evidence":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"observed_at":{"type":"integer","format":"int64"},"possible_explanations":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"schema_version":{"type":"string"},"staff_escalation":{"$ref":"#/components/schemas/AuthTriageEscalation"},"support_reference":{"type":["string","null"],"description":"A retained conflict reference is safe to copy into the existing staff\nlookup. It is not proof that the historical conflict is current."},"supported_actions":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"target_user_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_CheckoutResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["order_id","redirect_url","payment_confirmed"],"properties":{"order_id":{"type":"integer","format":"int32"},"payment_confirmed":{"type":"boolean","description":"True means navigate to the existing order, rather than opening checkout."},"redirect_url":{"type":"string"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LadderResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/query` payload.","required":["metric","period","limit","offset","entries"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}},"limit":{"type":"integer","format":"int32","minimum":0},"metric":{"type":"string"},"mode":{"type":["string","null"]},"offset":{"type":"integer","format":"int32","minimum":0},"period":{"type":"string"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LadderSeasonsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/{slug}/seasons` payload.","required":["definition","seasons"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"seasons":{"type":"array","items":{"$ref":"#/components/schemas/LadderSeasonDto"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LadderStandingsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["definition","entries"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LaddersHubResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/hub` payload.","required":["categories","uncategorized","status_counts","status"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/LadderCategorySectionDto"},"description":"Cards grouped into category sections (display order)."},"status":{"type":"string","description":"The status bucket these cards belong to (`live` | `upcoming` | `completed`)."},"status_counts":{"$ref":"#/components/schemas/SeasonStatusCountsDto"},"uncategorized":{"type":"array","items":{"$ref":"#/components/schemas/LadderHubCardDto"},"description":"Cards whose definition has no (or an unknown) category."}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LaddersListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["ladders"],"properties":{"ladders":{"type":"array","items":{"$ref":"#/components/schemas/LadderDefDto"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_LoadoutListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Response for the full loadout list including which is active.","required":["loadouts","per_team_skins"],"properties":{"active_loadout_id":{"type":["integer","null"],"format":"int32"},"loadouts":{"type":"array","items":{"$ref":"#/components/schemas/LoadoutSummary"}},"per_team_skins":{"type":"boolean","description":"Whether the user prefers separate per-team skin controls."}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_MetricsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/metrics` payload.","required":["metrics"],"properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricEntry"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_NewsPost":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["id","slug","title","content","author_id","status","created_at","updated_at"],"properties":{"author_id":{"type":"integer","format":"int32"},"background_image_id":{"type":["integer","null"],"format":"int32"},"category":{"type":["string","null"]},"content":{"type":"string"},"content_lexical":{},"created_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"icon_id":{"type":["integer","null"],"format":"int32"},"id":{"type":"integer","format":"int32"},"meta_description":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_NewsPostWithAuthor":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["id","short_code","canonical_path","slug","title","content","author_id","status","created_at","updated_at","author_username"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"content":{"type":"string"},"content_lexical":{},"created_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"icon_id":{"type":["integer","null"],"format":"int32"},"icon_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"meta_description":{"type":["string","null"]},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_NewsStats":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Get news posts count (public endpoint)","required":["total_published","total_posts"],"properties":{"total_posts":{"type":"integer","format":"int64"},"total_published":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Option_PasswordResetContinuationData":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"oneOf":[{"type":"null"},{"type":"object","required":["redirect_uri"],"properties":{"redirect_uri":{"type":"string"},"resume_payment_order":{"type":["integer","null"],"format":"int64","minimum":0},"return_url":{"type":["string","null"]}}}]},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_OrderStatusResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["id","fulfillment_status","status","purpose_type","purpose_ref","amount_minor","currency","provider","created_at"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"fulfillment_status":{"$ref":"#/components/schemas/FulfillmentStatus"},"id":{"type":"integer","format":"int32"},"provider":{"type":"string"},"purpose_ref":{"type":"string"},"purpose_type":{"type":"string"},"status":{"$ref":"#/components/schemas/NormalizedPaymentStatus"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PaginatedResponse_Vec_NewsPostWithAuthor":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["data","total"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","short_code","canonical_path","slug","title","content","author_id","status","created_at","updated_at","author_username"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"content":{"type":"string"},"content_lexical":{},"created_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"icon_id":{"type":["integer","null"],"format":"int32"},"icon_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"meta_description":{"type":["string","null"]},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PlayerLoadout":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Combined response with all of a player's equipped items.","required":["skins","knives","gloves","music"],"properties":{"agents":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlayerAgentsRow"}]},"gloves":{"type":"array","items":{"$ref":"#/components/schemas/PlayerGlovesRow"}},"knives":{"type":"array","items":{"$ref":"#/components/schemas/PlayerKnifeRow"}},"music":{"type":"array","items":{"$ref":"#/components/schemas/PlayerMusicRow"}},"skins":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSkinRow"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PlayerStandingResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["definition","steam_id"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"rank":{"type":["integer","null"],"format":"int64","description":"`null` when the player has no contribution to this ladder.","minimum":0},"steam_id":{"type":"string"},"value":{"type":["integer","null"],"format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PlaytimeRewardResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["steam_id","success","coins_awarded","total_balance","next_reward_seconds","message"],"properties":{"coins_awarded":{"type":"integer","format":"int32","description":"Number of coins awarded (0 if none)"},"message":{"type":"string","description":"Human-readable message about the reward status"},"next_reward_seconds":{"type":"integer","format":"int32","description":"Seconds until the next reward is available"},"steam_id":{"type":"string","description":"Steam ID of the player this response is for"},"success":{"type":"boolean","description":"Whether the reward check was successful"},"total_balance":{"type":"integer","format":"int32","description":"Player's total coin balance after the transaction"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PublicNewsResponse_Vec_NewsPostSummary":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Response type for paginated public news","required":["data","total"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","short_code","canonical_path","slug","title","author_id","author_username","status","created_at","updated_at"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_PurchaseResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["success","message","remaining_coins","currency_code","inventory_id"],"properties":{"currency_code":{"type":"string"},"inventory_id":{"type":"integer","format":"int32"},"message":{"type":"string"},"remaining_coins":{"type":"integer","format":"int32","description":"Remaining balance in the currency that was just debited."},"success":{"type":"boolean"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_RealtimeTokenResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["token","expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"},"token":{"type":"string"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_RefundOrderResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["refund"],"properties":{"duplicate":{"type":["boolean","null"]},"provider_response":{"type":["object","null"]},"refund":{"$ref":"#/components/schemas/PaymentRefund"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SeasonPlayerResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/seasons/{season_slug}/players/{steam_id}` payload.","required":["season","steam_id"],"properties":{"rank":{"type":["integer","null"],"format":"int64","minimum":0},"season":{"$ref":"#/components/schemas/LadderSeasonDto"},"steam_id":{"type":"string"},"value":{"type":["integer","null"],"format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SeasonStandingsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"`GET /ladders/seasons/{season_slug}/standings` payload.","required":["definition","season","entries"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}},"season":{"$ref":"#/components/schemas/LadderSeasonDto"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SeasonStatusCountsDto":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Season counts by status for the hub tab badges.","required":["live","upcoming","completed"],"properties":{"completed":{"type":"integer","format":"int64"},"live":{"type":"integer","format":"int64"},"upcoming":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SocialMediaPost":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"A social media post entry, representing a single post to a single platform.","required":["id","news_post_id","provider","post_type","status","retry_count","max_retries","created_by","created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"integer","format":"int32"},"custom_image_url":{"type":["string","null"]},"custom_text":{"type":["string","null"]},"error_message":{"type":["string","null"]},"external_post_id":{"type":["string","null"]},"external_post_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"max_retries":{"type":"integer","format":"int32"},"news_post_id":{"type":"integer","format":"int32"},"post_type":{"$ref":"#/components/schemas/SocialPostType"},"posted_at":{"type":["string","null"],"format":"date-time"},"provider":{"$ref":"#/components/schemas/SocialProvider"},"retry_count":{"type":"integer","format":"int32"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/SocialPostStatus"},"updated_at":{"type":"string","format":"date-time"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_String":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"string"},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SubscriptionStats":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["active_counts","days_period"],"properties":{"active_counts":{"$ref":"#/components/schemas/ActiveSubscriptionCounts"},"days_period":{"type":"integer","format":"int32"},"premium":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]},"pro":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]},"vip":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SupportSettingsResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Response for support settings","required":["typing_indicators_enabled"],"properties":{"typing_indicators_enabled":{"type":"boolean"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_SupportTicketTemplateWithUser":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/SupportTicketTemplate"},{"type":"object","required":["created_by_username"],"properties":{"created_by_username":{"type":"string"},"updated_by_username":{"type":["string","null"]}}}]},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TemplateListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["templates","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketTemplateWithUser"}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TicketCreatedResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["message","ticket_id"],"properties":{"message":{"type":"string"},"ticket_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TicketDetailResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["ticket","messages","can_respond"],"properties":{"can_respond":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketMessageWithUser"}},"ticket":{"$ref":"#/components/schemas/SupportTicketWithUser"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TicketListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["tickets","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketWithUser"}},"total":{"type":"integer","format":"int64"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TicketReadResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["ticket_id"],"properties":{"ticket_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TicketReplyCreatedResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["message","message_id"],"properties":{"message":{"type":"string"},"message_id":{"type":"integer","format":"int32"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_TransactionListResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["transactions","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionTransaction"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_UpdatePolarProductResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["price"],"properties":{"price":{"$ref":"#/components/schemas/SubscriptionPrice"}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_UserContextResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Aggregated user context response for the support quick view","required":["user_id","username","is_anonymized","groups","has_premium","active_punishments","punishments","playtime"],"properties":{"active_punishments":{"$ref":"#/components/schemas/ActivePunishmentCounts"},"avatar":{"type":["string","null"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/UserGroupInfo"}},"has_premium":{"type":"boolean"},"is_anonymized":{"type":"boolean"},"playtime":{"type":"array","items":{"$ref":"#/components/schemas/CorePlaytime"}},"punishments":{"$ref":"#/components/schemas/PunishmentsData"},"steam_id":{"type":["string","null"]},"steam_username":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"username":{"type":"string"},"username_history":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlayerUsernameHistory"}]}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_UserInfoResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","description":"Response shape for GET /auth/user_info","required":["membership_type","editable"],"properties":{"adress":{"type":["string","null"]},"editable":{"type":"boolean","description":"True for incomplete full-member details or a provider rejection that\nrequires correction. Accepted registrations remain locked."},"efternamn":{"type":["string","null"]},"fornamn":{"type":["string","null"]},"membership_type":{"type":"string"},"ort":{"type":["string","null"]},"postnummer":{"type":["string","null"]},"telefonnummer":{"type":["string","null"]}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_UsersWithUnusedItemResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"object","required":["users","page","page_size","total_pages","total_users"],"properties":{"page":{"type":"integer","format":"int64"},"page_size":{"type":"integer","format":"int64"},"total_pages":{"type":"integer","format":"int64"},"total_users":{"type":"integer","format":"int64"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserWithUnusedItem"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Value":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_AgentEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A player agent entry from the catalog.","required":["team","image","model","agent_name"],"properties":{"agent_name":{"type":"string"},"image":{"type":"string"},"model":{"type":"string"},"team":{"type":"integer","format":"int32"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_CirculationCheck":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["item_id","item_name","current_stock","unopened_cases","potential_demand","risk_level"],"properties":{"current_stock":{"type":"integer","format":"int32"},"item_id":{"type":"integer","format":"int32"},"item_name":{"type":"string"},"potential_demand":{"type":"number","format":"float"},"risk_level":{"type":"string"},"unopened_cases":{"type":"integer","format":"int32"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_GloveEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A glove entry from the catalog.\n`weapon_defindex` can be a number (4725) or `\"gloves_default\"`.","required":["weapon_defindex","paint","image","paint_name"],"properties":{"image":{"type":"string"},"paint":{"type":"string"},"paint_name":{"type":"string"},"texture":{"type":["string","null"]},"texture_metal":{"type":["string","null"]},"threejsmodel":{"type":["string","null"]},"weapon_defindex":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_KeychainEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A keychain entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_MusicEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A music kit entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_NewsAuditLogWithUser":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","news_post_id","user_id","action","created_at","user_username"],"properties":{"action":{"$ref":"#/components/schemas/NewsAuditAction"},"created_at":{"type":"string","format":"date-time"},"field_changed":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"ip_address":{"type":["string","null"]},"new_value":{},"news_post_id":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"old_value":{},"user_agent":{"type":["string","null"]},"user_avatar":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"user_username":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_NewsAuditLogWithUserAndPost":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","news_post_id","user_id","action","created_at","user_username","post_title","post_slug"],"properties":{"action":{"$ref":"#/components/schemas/NewsAuditAction"},"created_at":{"type":"string","format":"date-time"},"field_changed":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"ip_address":{"type":["string","null"]},"new_value":{},"news_post_id":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"old_value":{},"post_slug":{"type":"string"},"post_title":{"type":"string"},"user_agent":{"type":["string","null"]},"user_avatar":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"user_username":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_NewsPostSummary":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","short_code","canonical_path","slug","title","author_id","author_username","status","created_at","updated_at"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_OrderStatusResponse":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","fulfillment_status","status","purpose_type","purpose_ref","amount_minor","currency","provider","created_at"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"fulfillment_status":{"$ref":"#/components/schemas/FulfillmentStatus"},"id":{"type":"integer","format":"int32"},"provider":{"type":"string"},"purpose_ref":{"type":"string"},"purpose_type":{"type":"string"},"status":{"$ref":"#/components/schemas/NormalizedPaymentStatus"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_PaymentProviderSubscription":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Provider-side recurring subscription mapping.\n\nThis is deliberately separate from `user_subscriptions`: provider rows track\nthe Polar contract/customer/product we validate renewal orders against,\nwhile `user_subscriptions` tracks local access and expiry.\n\n`status` is intentionally `String` because the underlying column is a\n`VARCHAR(32)` populated directly with the provider's status (Polar uses\n`active`, `trialing`, `past_due`, `canceled`, `unpaid`, `incomplete`).\nUse [`PaymentProviderSubscription::is_canceled`] / [`is_active`] /\n[`provider_status`] for typed checks instead of comparing raw strings.","required":["id","provider","provider_subscription_id","subscription_type","provider_customer_id","provider_product_id","amount_minor","currency","period_days","status","cancel_at_period_end","created_at","updated_at"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"current_period_end":{"type":["string","null"],"format":"date-time"},"current_period_start":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int64"},"period_days":{"type":"integer","format":"int32"},"provider":{"type":"string"},"provider_checkout_id":{"type":["string","null"]},"provider_customer_id":{"type":"string"},"provider_metadata":{},"provider_product_id":{"type":"string"},"provider_subscription_id":{"type":"string"},"status":{"type":"string"},"subscription_price_id":{"type":["integer","null"],"format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":["integer","null"],"format":"int32"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_PinEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A collectible pin/coin/medal entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_PublicSubscriptionPrice":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Public projection of `SubscriptionPrice` for the unauthenticated\n`/payments/prices` endpoint. Drops `polar_product_id` and `active` —\nthe former is a provider mapping detail, the latter is implicit from\nthe endpoint only returning active rows.","required":["id","subscription_type","currency","amount_minor","period_days","is_checkout_price"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"coin_price":{"type":["integer","null"],"format":"int32"},"currency":{"type":"string"},"id":{"type":"integer","format":"int32"},"is_checkout_price":{"type":"boolean","description":"This currency is used by hosted checkout, independent of UI language."},"period_days":{"type":"integer","format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_ShopCategory":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["category","item_count"],"properties":{"category":{"type":"string"},"item_count":{"type":"integer","format":"int64"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_ShopItem":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","item_name","item_type","item_subtitle","item_rarity","price","currency_code","user_owned"],"properties":{"amount":{"type":["integer","null"],"format":"int32"},"currency_code":{"type":"string","description":"Currency code of the scoped storefront (e.g. `playpark_coins`,\n`midgard_goldcoin`)."},"description":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"image_url":{"type":["string","null"]},"item_name":{"type":"string"},"item_rarity":{"type":"string"},"item_subtitle":{"type":"string"},"item_type":{"type":"string"},"price":{"type":"integer","format":"int64","description":"Price in the currently scoped storefront's currency."},"purchase_limit_per_user":{"type":["integer","null"],"format":"int32","description":"Per-user lifetime purchase cap, when set on the item. `NULL` = no cap.\nClients render this as a \"Max N per spelare\" hint."},"stock":{"type":["integer","null"],"format":"int32","description":"Remaining stock — only surfaced when the admin enabled\n`display_stock`. `NULL` either means unlimited or the admin chose to\nhide the count; clients should treat both as \"no count to render\"."},"user_owned":{"type":"integer","format":"int64","description":"How many of this item the *current* user already owns (counted with\nthe item's `purchase_limit_scope`). `0` when no session."}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_SkinEntry":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A weapon skin entry from the catalog.\nNote: `weapon_defindex` can be a number (1) or a string (\"weapon_knife_default\")\nin the upstream JSON, so we store it as a String.","required":["weapon_defindex","weapon_name","paint","image","paint_name"],"properties":{"image":{"type":"string"},"legacy_model":{"type":"boolean"},"paint":{"type":"string"},"paint_name":{"type":"string"},"texture":{"type":["string","null"]},"texture_metal":{"type":["string","null"]},"threejsmodel":{"type":["string","null"]},"weapon_defindex":{"type":"string"},"weapon_name":{"type":"string"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_SocialMediaPost":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"A social media post entry, representing a single post to a single platform.","required":["id","news_post_id","provider","post_type","status","retry_count","max_retries","created_by","created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"integer","format":"int32"},"custom_image_url":{"type":["string","null"]},"custom_text":{"type":["string","null"]},"error_message":{"type":["string","null"]},"external_post_id":{"type":["string","null"]},"external_post_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"max_retries":{"type":"integer","format":"int32"},"news_post_id":{"type":"integer","format":"int32"},"post_type":{"$ref":"#/components/schemas/SocialPostType"},"posted_at":{"type":["string","null"],"format":"date-time"},"provider":{"$ref":"#/components/schemas/SocialProvider"},"retry_count":{"type":"integer","format":"int32"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/SocialPostStatus"},"updated_at":{"type":"string","format":"date-time"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_String":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"string"}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ApiSuccessEnvelope_Vec_SubscriptionPrice":{"type":"object","description":"OpenAPI schema for successful `ApiResponse::success(data)` envelopes.\n\nThis mirrors the wire format while keeping the runtime `ApiResponse`\ntype non-generic.","required":["status","message","data","error"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Database-driven pricing for subscription tiers.\nSupports multiple currencies and billing periods.","required":["id","subscription_type","currency","amount_minor","period_days","active","created_at","updated_at"],"properties":{"active":{"type":"boolean","description":"Whether this price is currently active."},"amount_minor":{"type":"integer","format":"int64","description":"Price in minor units (cents/ore)."},"coin_price":{"type":["integer","null"],"format":"int32","description":"Equivalent price in coins (for coin-based purchases)."},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","description":"ISO 4217 currency code."},"id":{"type":"integer","format":"int32"},"period_days":{"type":"integer","format":"int32","description":"Subscription period length in days."},"polar_product_id":{"type":["string","null"],"description":"Polar product ID used for hosted checkout."},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"updated_at":{"type":"string","format":"date-time"}}}},"error":{"type":"null"},"message":{"type":["string","null"]},"status":{"type":"string"}}},"AuthDiagnosticReferenceResponse":{"type":"object","required":["user_id","request_id"],"properties":{"request_id":{"type":"string"},"user_id":{"type":"integer","format":"int32"}}},"AuthDiagnosticsResponse":{"type":"object","required":["observed_at","account","login_methods","renewed","payment_evidence","email_evidence"],"properties":{"account":{"$ref":"#/components/schemas/DiagnosticAccount"},"email_evidence":{"$ref":"#/components/schemas/DiagnosticEmailEvidence","description":"Requires the existing admin.emails.view permission independently."},"latest_conflict":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AccountConflictDiagnostic","description":"A historical attempt; this does not assert the account is still blocked."}]},"login_methods":{"$ref":"#/components/schemas/DiagnosticLoginMethods","description":"Credential availability for the current target only, never hashes or IDs."},"observed_at":{"type":"integer","format":"int64","description":"When this bounded evidence read began; source timestamps remain distinct."},"payment_evidence":{"$ref":"#/components/schemas/DiagnosticPaymentEvidence","description":"Requires the existing admin.payments.read permission independently."},"renewed":{"type":"boolean"},"sverok_processing":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SverokProcessing"}]}}},"AuthTriageEscalation":{"type":"object","required":["required","reasons"],"properties":{"reasons":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}}},"AuthTriageItem":{"type":"object","description":"A deterministic, redacted packet for staff triage tooling.\n\nThis is deliberately a read model rather than an agent command. Every\nitem is an allowlisted code derived from the bounded diagnostics snapshot;\nthe packet contains no contact data, credentials, provider identifiers or\ninstructions that mutate an account. An AI consumer can use the packet to\nexplain the evidence, but it must treat the action codes as suggestions.","required":["code","source"],"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]},"source":{"type":"string"}}},"AuthTriageResponse":{"type":"object","required":["schema_version","observed_at","target_user_id","confirmed_facts","possible_explanations","missing_evidence","supported_actions","actions_are_suggestions","staff_escalation","evidence"],"properties":{"actions_are_suggestions":{"type":"boolean","description":"Always true: this packet grants no tool authority to act."},"confirmed_facts":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"evidence":{"$ref":"#/components/schemas/AuthDiagnosticsResponse","description":"The same bounded evidence shown by the diagnostics screen. Consumers\nmust preserve its source/permission distinctions and no-store policy."},"missing_evidence":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"observed_at":{"type":"integer","format":"int64"},"possible_explanations":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"schema_version":{"type":"string"},"staff_escalation":{"$ref":"#/components/schemas/AuthTriageEscalation"},"support_reference":{"type":["string","null"],"description":"A retained conflict reference is safe to copy into the existing staff\nlookup. It is not proof that the historical conflict is current."},"supported_actions":{"type":"array","items":{"$ref":"#/components/schemas/AuthTriageItem"}},"target_user_id":{"type":"integer","format":"int32"}}},"AutoBalanceRequest":{"type":"object","required":["strategy"],"properties":{"strategy":{"type":"string"}}},"BalanceResponse":{"type":"object","required":["user_id","balances"],"properties":{"balances":{"type":"object","description":"Balances keyed by currency code. If the token has a currency scope,\nonly those currencies are included. Currencies the user has never\ntransacted in are omitted (treat absent as 0).","additionalProperties":{"type":"integer","format":"int32"},"propertyNames":{"type":"string"}},"user_id":{"type":"integer","format":"int32"}}},"Ban":{"type":"object","description":"Player game ban","required":["id","admin_steamid","admin_name","reason","duration","created","status"],"properties":{"admin_name":{"type":"string"},"admin_steamid":{"type":"string"},"created":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32"},"ends":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int32"},"player_ip":{"type":["string","null"]},"player_name":{"type":["string","null"]},"player_steamid":{"type":["string","null"]},"reason":{"type":"string"},"server_id":{"type":["integer","null"],"format":"int32"},"status":{"type":"string"},"unban_id":{"type":["integer","null"],"format":"int32"}}},"BoolFromI8":{"type":"boolean"},"CaseItemUpdate":{"type":"object","required":["id","drop_rate"],"properties":{"drop_rate":{"type":"number","format":"float","maximum":100,"minimum":0},"id":{"type":"integer","format":"int32","minimum":1}}},"CaseReference":{"type":"object","required":["drop_id","case_item_id","case_name","case_rarity","case_subtitle"],"properties":{"case_image_url":{"type":["string","null"],"description":"Case image URL"},"case_item_id":{"type":"integer","format":"int32","description":"Case item ID"},"case_name":{"type":"string","description":"Case name"},"case_rarity":{"type":"string","description":"Case rarity"},"case_subtitle":{"type":"string","description":"Case subtitle"},"drop_id":{"type":"integer","format":"int32","description":"Drop ID of the opened case"}}},"ChangeRoleRequest":{"type":"object","required":["role"],"properties":{"role":{"type":"string"}}},"CheckAvailability":{"type":"object","description":"Same shape as `Register` but without `user_agreement`. Used by the\npre-registration availability check on the auth-app /register first step.","required":["email","username","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"username":{"type":"string"}}},"CheckBanResponse":{"type":"object","required":["banned"],"properties":{"ban":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Ban","description":"The active ban record, if any"}]},"banned":{"type":"boolean","description":"Whether the player currently has an active ban"}}},"CheckCommsResponse":{"type":"object","required":["muted","gagged","comms"],"properties":{"comms":{"type":"array","items":{"$ref":"#/components/schemas/Comm"},"description":"All active communication bans for this player"},"gagged":{"type":"boolean","description":"Whether the player has an active text gag"},"muted":{"type":"boolean","description":"Whether the player has an active voice mute"}}},"CheckCtbanResponse":{"type":"object","required":["ctbanned"],"properties":{"ctban":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Ctban","description":"The active CT ban record, if any"}]},"ctbanned":{"type":"boolean","description":"Whether the player currently has an active CT ban"}}},"CheckoutResponse":{"type":"object","required":["order_id","redirect_url","payment_confirmed"],"properties":{"order_id":{"type":"integer","format":"int32"},"payment_confirmed":{"type":"boolean","description":"True means navigate to the existing order, rather than opening checkout."},"redirect_url":{"type":"string"}}},"CirculationCheck":{"type":"object","required":["item_id","item_name","current_stock","unopened_cases","potential_demand","risk_level"],"properties":{"current_stock":{"type":"integer","format":"int32"},"item_id":{"type":"integer","format":"int32"},"item_name":{"type":"string"},"potential_demand":{"type":"number","format":"float"},"risk_level":{"type":"string"},"unopened_cases":{"type":"integer","format":"int32"}}},"CoinMutationResponse":{"type":"object","required":["success","transaction_id","balance_after"],"properties":{"balance_after":{"type":"integer","format":"int32"},"success":{"type":"boolean"},"transaction_id":{"type":"integer","format":"int32"}}},"Comm":{"type":"object","description":"Communication ban (mute/gag)","required":["id","player_steamid","admin_steamid","admin_name","reason","duration","created","type","status"],"properties":{"admin_name":{"type":"string"},"admin_steamid":{"type":"string"},"created":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32"},"ends":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int32"},"passed":{"type":["integer","null"],"format":"int32"},"player_name":{"type":["string","null"]},"player_steamid":{"type":"string"},"reason":{"type":"string"},"server_id":{"type":["integer","null"],"format":"int32"},"status":{"type":"string"},"type":{"type":"string"},"unmute_id":{"type":["integer","null"],"format":"int32"}}},"CorePlaytime":{"type":"object","required":["id","steam_id","server_id","name","lastseen","all","ct","t","spec","dead","alive"],"properties":{"alive":{"type":"integer","format":"int32"},"all":{"type":"integer","format":"int32"},"ct":{"type":"integer","format":"int32"},"dead":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"lastseen":{"type":"string","format":"date-time"},"name":{"type":"string"},"server_id":{"type":"integer","format":"int32"},"spec":{"type":"integer","format":"int32"},"steam_id":{"type":"string"},"t":{"type":"integer","format":"int32"}}},"CreateBanRequest":{"type":"object","description":"Create a new ban","required":["steamid","reason","duration","admin_steamid","admin_name"],"properties":{"admin_name":{"type":"string","description":"Name of the admin issuing the ban"},"admin_steamid":{"type":"string","description":"Steam ID of the admin issuing the ban"},"duration":{"type":"integer","format":"int32","description":"Duration in minutes. 0 = permanent."},"idempotency_key":{"type":["string","null"],"description":"Optional caller-provided key that makes retried creates return the same ban."},"name":{"type":["string","null"],"description":"Player's current name"},"reason":{"type":"string","description":"Ban reason"},"steamid":{"type":"string","description":"Player's Steam ID (e.g. \"76561198012345678\")"}}},"CreateBanResponse":{"type":"object","required":["id","ban"],"properties":{"ban":{"$ref":"#/components/schemas/Ban","description":"Full ban record"},"id":{"type":"integer","format":"int32","description":"Database ID of the created ban"}}},"CreateBracketRequest":{"type":"object","required":["name","bracket_type"],"properties":{"bracket_data":{},"bracket_type":{"type":"string"},"name":{"type":"string"},"stage_id":{"type":["integer","null"],"format":"int32"}}},"CreateCheckoutRequest":{"type":"object","required":["subscription_type"],"properties":{"embed_origin":{"type":["string","null"],"description":"Optional browser origin embedding the checkout iframe.\n\nWhen present, the server validates this against the same registered\nPlaypark frontend origins before forwarding it to Polar as\n`embed_origin`."},"return_origin":{"type":["string","null"],"description":"Optional browser origin to return to after hosted checkout.\n\nThe server validates this against registered Playpark frontend origins\nbefore using it, and otherwise falls back to the request Origin header\nor PUBLIC_BASE_URL/FRONTEND_URL. The auth frontend origin from\nAUTH_FRONTEND_URL is also accepted for register checkout."},"subscription_type":{"type":"string","description":"Subscription type: \"premium\" or \"vip\"."}}},"CreateCommRequest":{"type":"object","required":["steamid","reason","duration","type","admin_steamid","admin_name"],"properties":{"admin_name":{"type":"string","description":"Name of the admin issuing the ban"},"admin_steamid":{"type":"string","description":"Steam ID of the admin issuing the ban"},"duration":{"type":"integer","format":"int32","description":"Duration in minutes. 0 = permanent."},"name":{"type":["string","null"],"description":"Player's current name"},"reason":{"type":"string","description":"Reason for the communication ban"},"steamid":{"type":"string","description":"Player's Steam ID"},"type":{"type":"string","description":"Type of communication ban: \"MUTE\" (voice) or \"GAG\" (text)"}}},"CreateCommResponse":{"type":"object","required":["id","comm"],"properties":{"comm":{"$ref":"#/components/schemas/Comm","description":"Full comm ban record"},"id":{"type":"integer","format":"int32","description":"Database ID of the created comm ban"}}},"CreateCoreAd":{"type":"object","required":["server_id","content","display"],"properties":{"content":{"type":"string"},"display":{"type":"string"},"group_id":{"type":["integer","null"],"format":"int32"},"server_id":{"type":"integer","format":"int32"}}},"CreateCtbanRequest":{"type":"object","required":["steamid","reason","duration","admin_steamid"],"properties":{"admin_name":{"type":["string","null"],"description":"Name of the admin issuing the ban"},"admin_steamid":{"type":"string","description":"Steam ID of the admin issuing the ban"},"duration":{"type":"integer","format":"int32","description":"Duration in minutes. 0 = permanent."},"name":{"type":["string","null"],"description":"Player's current name"},"reason":{"type":"string","description":"Reason for the CT ban"},"steamid":{"type":"string","description":"Player's Steam ID"}}},"CreateCtbanResponse":{"type":"object","required":["ctban"],"properties":{"ctban":{"$ref":"#/components/schemas/Ctban","description":"The created CT ban record"}}},"CreateInternalNoteRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":10000,"minLength":1}}},"CreateItemRequest":{"type":"object","required":["item_name","item_type","item_subtitle","item_rarity"],"properties":{"amount":{"type":["integer","null"],"format":"int32","minimum":1},"display_stock":{"type":["boolean","null"],"description":"See `UpdateItemRequest::display_stock`."},"image_url":{"type":["string","null"],"maxLength":250},"item_name":{"type":"string","maxLength":255,"minLength":1},"item_rarity":{"type":"string","maxLength":250,"minLength":1},"item_subtitle":{"type":"string","maxLength":255,"minLength":1},"item_type":{"type":"string"},"purchase_limit_per_user":{"type":["integer","null"],"format":"int32","description":"See `UpdateItemRequest::purchase_limit_per_user`."},"purchase_limit_scope":{"type":["string","null"],"description":"See `UpdateItemRequest::purchase_limit_scope`. Defaults to `global`."},"status":{"type":["string","null"],"maxLength":32},"stock":{"type":["integer","null"],"format":"int32","minimum":0},"storefronts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ShopItemStorefrontAssignment"},"description":"Initial per-storefront pricing. Empty/omitted = the item is created but\nnot yet sold on any storefront."}}},"CreateLoadoutRequest":{"type":"object","description":"Request body for creating a new loadout.","required":["name"],"properties":{"copy_from_loadout_id":{"type":["integer","null"],"format":"int32","description":"If provided, copy all skins from this existing loadout."},"name":{"type":"string","description":"Display name for the loadout (1-30 characters)."}}},"CreateMatchRequest":{"type":"object","properties":{"match_id":{"type":["string","null"]},"round_number":{"type":["integer","null"],"format":"int32"},"stage_id":{"type":["integer","null"],"format":"int32"}}},"CreateMatchSessionRequest":{"type":"object","required":["lobby_type","lobby_visibility","game_type","game_mode","format","game_provider"],"properties":{"description":{"type":["string","null"]},"format":{"type":"string"},"game_config":{},"game_mode":{"type":"string"},"game_provider":{"type":"string"},"game_type":{"type":"string"},"lobby_type":{"type":"string"},"lobby_visibility":{"type":"string"},"max_players":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"selected_maps":{}}},"CreateNewsPostRequest":{"type":"object","required":["title","content","platforms"],"properties":{"background_image_id":{"type":["integer","null"],"format":"int32","minimum":1},"category":{"type":["string","null"],"maxLength":100},"content":{"type":"string","minLength":1},"content_lexical":{},"header_image_id":{"type":["integer","null"],"format":"int32","minimum":1},"icon_id":{"type":["integer","null"],"format":"int32","minimum":1},"meta_description":{"type":["string","null"],"maxLength":500},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/PlatformAssignment"},"description":"Platform assignments — at least one required.\nEach entry pairs a platform with its per-platform featured flag.","minItems":1},"scheduled_publish_at":{"type":["string","null"],"format":"date-time","description":"Optional scheduled publish time. If set, the post will be published at this time."},"short_description":{"type":["string","null"],"maxLength":300},"slug":{"type":["string","null"],"maxLength":255},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32","minimum":1},"title":{"type":"string","maxLength":255,"minLength":1}}},"CreateSocialPostRequest":{"type":"object","description":"Request to create a new social media post.","required":["news_post_id","provider"],"properties":{"custom_image_url":{"type":["string","null"],"maxLength":500},"custom_text":{"type":["string","null"],"maxLength":10000},"news_post_id":{"type":"integer","format":"int32","minimum":1},"post_type":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SocialPostType"}]},"provider":{"$ref":"#/components/schemas/SocialProvider"},"scheduled_at":{"type":["string","null"],"format":"date-time"}}},"CreateSupportTicketRequest":{"type":"object","required":["category","title","description"],"properties":{"category":{"$ref":"#/components/schemas/TicketCategory"},"description":{"type":"string"},"description_lexical":{},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketPriority"}]},"title":{"type":"string"}}},"CreateTeamRequest":{"type":"object","required":["name"],"properties":{"avatar_url":{"type":["string","null"]},"description":{"type":["string","null"]},"max_members":{"type":["integer","null"],"format":"int32"},"name":{"type":"string"},"tag":{"type":["string","null"]}}},"CreateTemplateRequest":{"type":"object","required":["category","title","content"],"properties":{"category":{"$ref":"#/components/schemas/TemplateCategory"},"content":{"type":"string","minLength":1},"title":{"type":"string","maxLength":100,"minLength":1}}},"CreateTicketMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":10000,"minLength":1}}},"CreateTournamentRequest":{"type":"object","required":["name","slug","game_type","format","global_bracket_type","global_elimination_type","max_teams"],"properties":{"auto_accept_registrations":{"type":["boolean","null"]},"auto_advance":{"type":["boolean","null"]},"auto_generate_brackets":{"type":["boolean","null"]},"banner_url":{"type":["string","null"]},"check_in_end_at":{"type":["string","null"]},"check_in_start_at":{"type":["string","null"]},"cover_color":{"type":["string","null"]},"cover_text_color":{"type":["string","null"]},"cover_text_shadow_color":{"type":["string","null"]},"cover_url":{"type":["string","null"]},"description":{"type":["string","null"]},"format":{"type":"string"},"game_type":{"type":"string"},"global_bracket_type":{"type":"string"},"global_elimination_type":{"type":"string"},"logo_url":{"type":["string","null"]},"map_pool_id":{"type":["integer","null"],"format":"int32"},"max_teams":{"type":"integer","format":"int32"},"name":{"type":"string"},"prize_pool":{"type":["number","null"],"format":"float"},"ready_check_timeout":{"type":["integer","null"],"format":"int32"},"registration_deadline":{"type":["string","null"]},"scheduled_start":{"type":["string","null"]},"settings":{},"slug":{"type":"string"},"stage_map_pools":{},"thumbnail_url":{"type":["string","null"]}}},"CreateVetoRequest":{"type":"object","required":["veto_format","starting_team"],"properties":{"starting_team":{"type":"string"},"veto_format":{"type":"string"}}},"CreateWarnRequest":{"type":"object","required":["steamid","reason","duration","admin_steamid","admin_name"],"properties":{"admin_name":{"type":"string","description":"Name of the admin issuing the warning"},"admin_steamid":{"type":"string","description":"Steam ID of the admin issuing the warning"},"duration":{"type":"integer","format":"int32","description":"Duration in minutes. 0 = permanent."},"name":{"type":["string","null"],"description":"Player's current name"},"reason":{"type":"string","description":"Reason for the warning"},"steamid":{"type":"string","description":"Player's Steam ID"}}},"CreateWarnResponse":{"type":"object","required":["id","warn"],"properties":{"id":{"type":"integer","format":"int32","description":"Database ID of the created warning"},"warn":{"$ref":"#/components/schemas/Warn","description":"Full warning record"}}},"Cs2UsernameHistoryEntry":{"type":"object","description":"Username history entry for CS2 player tracking.\nNamed to distinguish from `playpark_auth::UsernameEntry` which tracks website username changes.","required":["username","first_seen","last_seen","usage_count"],"properties":{"first_seen":{"type":"string","format":"date-time"},"last_seen":{"type":"string","format":"date-time"},"usage_count":{"type":"integer","format":"int64"},"username":{"type":"string"}}},"Ctban":{"type":"object","description":"CT (Counter-Terrorist) team ban","required":["id","steamid","start","reason","admin_steamid","status","ban_duration","time_served"],"properties":{"admin_name":{"type":["string","null"]},"admin_steamid":{"type":"string"},"ban_duration":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"name":{"type":["string","null"]},"reason":{"type":"string"},"start":{"type":"integer","format":"int64"},"status":{"type":"string"},"steamid":{"type":"string"},"time_served":{"type":"integer","format":"int32"}}},"DeductCoinsRequest":{"type":"object","required":["user_id","currency_code","amount","admin_user_id"],"properties":{"admin_user_id":{"type":"integer","format":"int32","description":"PlayPark user id of the in-game admin issuing the command."},"amount":{"type":"integer","format":"int32"},"currency_code":{"type":"string"},"idempotency_key":{"type":["string","null"],"description":"Required caller-provided idempotency key. Reusing the same key for the\nsame user/currency/operation returns the original transaction."},"reason":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"}}},"DiagnosticAccount":{"type":"object","required":["user_id","active","verified","suspended","registered_at"],"properties":{"active":{"type":"boolean"},"membership_type":{"type":["string","null"]},"registered_at":{"type":"integer","format":"int64"},"signup_source":{"type":["string","null"]},"suspended":{"type":"boolean","description":"Explicit staff lockout state. This is separate from `active`, which\nremains the email-verification flag for unverified signups."},"suspended_at":{"type":["integer","null"],"format":"int64"},"suspension_reason":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"verified":{"type":"boolean"}}},"DiagnosticAvailability":{"type":"string","enum":["available","permission_required","unavailable"]},"DiagnosticEmail":{"type":"object","required":["email_log_id","purpose","delivery_state","created_at"],"properties":{"created_at":{"type":"integer","format":"int64"},"delivered_at":{"type":["integer","null"],"format":"int64"},"delivery_state":{"$ref":"#/components/schemas/DiagnosticEmailDelivery"},"email_log_id":{"type":"integer","format":"int64","minimum":0},"failed_at":{"type":["integer","null"],"format":"int64"},"purpose":{"$ref":"#/components/schemas/DiagnosticEmailPurpose","description":"Exact subject-catalog classification, never the raw subject itself."},"sent_at":{"type":["integer","null"],"format":"int64"}}},"DiagnosticEmailDelivery":{"type":"string","enum":["pending","scheduled","accepted","delayed","delivered","bounced","failed","complained","suppressed","unknown"]},"DiagnosticEmailEvidence":{"type":"object","required":["availability","association","limit","messages"],"properties":{"association":{"type":"string","description":"email_log has no account FK: correlation uses the account's current\naddress only and cannot prove historical account ownership."},"availability":{"$ref":"#/components/schemas/DiagnosticAvailability"},"limit":{"type":"integer","format":"int32","minimum":0},"messages":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosticEmail"}}}},"DiagnosticEmailPurpose":{"type":"string","enum":["activation","password_reset","passwordless","other"]},"DiagnosticLoginMethods":{"type":"object","required":["password","providers"],"properties":{"password":{"type":"boolean"},"providers":{"type":"array","items":{"type":"string"}}}},"DiagnosticPayment":{"type":"object","required":["order_id","status","purpose","tier","created_at","updated_at","grant_recorded","grant_evidence_recorded","revocation_recorded","revocation_effect"],"properties":{"created_at":{"type":"integer","format":"int64"},"grant_evidence_recorded":{"type":"boolean"},"grant_recorded":{"type":"boolean","description":"A matching completed purchase/renewal ledger entry; not present access."},"latest_effect_at":{"type":["integer","null"],"format":"int64"},"order_id":{"type":"integer","format":"int32"},"purpose":{"type":"string"},"revocation_effect":{"$ref":"#/components/schemas/DiagnosticRevocationEffect"},"revocation_reason_code":{"type":["string","null"]},"revocation_recorded":{"type":"boolean"},"role_requires_review":{"type":["boolean","null"]},"status":{"type":"string","description":"Normalized local state, never a provider error or external identifier."},"subscription_requires_review":{"type":["boolean","null"]},"tier":{"type":"string"},"updated_at":{"type":"integer","format":"int64"}}},"DiagnosticPaymentEvidence":{"type":"object","required":["availability","limit","orders"],"properties":{"availability":{"$ref":"#/components/schemas/DiagnosticAvailability"},"limit":{"type":"integer","format":"int32","minimum":0},"orders":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosticPayment"}}}},"DiagnosticRevocationEffect":{"type":"string","enum":["not_recorded","revoked","not_delivered","no_remaining_effect","review_required","unknown"]},"EsplayEvent":{"type":"object","description":"Webhook payload from Esplay. Used for deserialization of incoming events.","required":["event","steamid","username","first_name","last_name","ssn","email","phone","platform_id","joined_association"],"properties":{"email":{"type":"string"},"event":{"type":"string"},"first_name":{"type":"string"},"joined_association":{"type":"integer","format":"int64","minimum":0},"last_name":{"type":"string"},"phone":{"type":"string"},"platform_id":{"type":"integer","format":"int64","minimum":0},"renewed_association":{"type":["integer","null"],"format":"int64","description":"Unix timestamp of when the user renewed their association, or null.","minimum":0},"ssn":{"type":"string"},"steamid":{"type":"integer","format":"int64","minimum":0},"username":{"type":"string"}}},"EventDrivenWebhook":{"type":"object","description":"Event-driven webhook payload (recommended approach)","required":["id","game_server_id","team1","team2","players","settings","webhooks","rounds_played","finished","events"],"properties":{"cancel_reason":{"type":["string","null"]},"events":{"type":"array","items":{"$ref":"#/components/schemas/MatchEvent"}},"finished":{"type":"boolean"},"game_server_id":{"type":"string"},"id":{"type":"string"},"players":{"type":"array","items":{"$ref":"#/components/schemas/WebhookPlayer"}},"rounds_played":{"type":"integer","format":"int32"},"settings":{"$ref":"#/components/schemas/WebhookSettings"},"team1":{"$ref":"#/components/schemas/WebhookTeam"},"team2":{"$ref":"#/components/schemas/WebhookTeam"},"webhooks":{"$ref":"#/components/schemas/WebhookConfiguration"}}},"FulfillmentStatus":{"type":"string","enum":["not_required","pending","ready","expired","review_required"]},"FullInfo":{"type":"object","required":["förnamn","efternamn","adress","postnummer","postort"],"properties":{"adress":{"type":"string"},"efternamn":{"type":"string"},"förnamn":{"type":"string"},"postnummer":{"type":"string"},"postort":{"type":"string"}}},"GetWarnsResponse":{"type":"object","required":["warns","count"],"properties":{"count":{"type":"integer","description":"Number of active warnings","minimum":0},"warns":{"type":"array","items":{"$ref":"#/components/schemas/Warn"},"description":"All active warnings for this player"}}},"GiveDropRequest":{"type":"object","required":["user_id","item_id"],"properties":{"category":{"type":["string","null"],"maxLength":32},"item_id":{"type":"integer","format":"int32","minimum":1},"notes":{"type":["string","null"],"maxLength":1000},"storefront_id":{"type":["integer","null"],"format":"int32","description":"Optional storefront the gift should be scoped to. When omitted the\nbackend picks the item's only storefront — items published on more\nthan one storefront require this to be set explicitly.","minimum":1},"user_id":{"type":"integer","format":"int32","minimum":1}}},"GlobalSearchResponse":{"type":"object","required":["players","teams"],"properties":{"players":{"$ref":"#/components/schemas/SearchResults_SearchUser"},"teams":{"$ref":"#/components/schemas/SearchResults_SearchTeam"}}},"GloveEntry":{"type":"object","description":"A glove entry from the catalog.\n`weapon_defindex` can be a number (4725) or `\"gloves_default\"`.","required":["weapon_defindex","paint","image","paint_name"],"properties":{"image":{"type":"string"},"paint":{"type":"string"},"paint_name":{"type":"string"},"texture":{"type":["string","null"]},"texture_metal":{"type":["string","null"]},"threejsmodel":{"type":["string","null"]},"weapon_defindex":{"type":"string"}}},"GrantCoinsRequest":{"type":"object","required":["user_id","currency_code","amount","admin_user_id"],"properties":{"admin_user_id":{"type":"integer","format":"int32","description":"PlayPark user id of the in-game admin issuing the command.\nRecorded on the transaction's `initiated_by` column."},"amount":{"type":"integer","format":"int32","description":"Positive integer amount."},"currency_code":{"type":"string","description":"Currency code (must be permitted by the token's currency scope)."},"idempotency_key":{"type":["string","null"],"description":"Required caller-provided idempotency key. Reusing the same key for the\nsame user/currency/operation returns the original transaction."},"reason":{"type":["string","null"],"description":"Optional human-readable reason recorded on the transaction."},"user_id":{"type":"integer","format":"int32","description":"User to credit."}}},"GrantSubscriptionRequest":{"type":"object","required":["subscription_type","duration_days"],"properties":{"duration_days":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"}}},"Info":{"type":"object","properties":{"full":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FullInfo"}]},"personnummer":{"type":["string","null"]},"telefonnummer":{"type":["string","null"]}}},"InfoBody":{"type":"object","required":["steamid64","ip"],"properties":{"ip":{"type":"string"},"steamid64":{"type":"string"}}},"InfoResponse":{"type":"object","required":["bad_ip","country","vip","needs_renewal","in_steam_group"],"properties":{"bad_ip":{"type":"boolean"},"country":{"type":["string","null"]},"error":{"type":["string","null"]},"in_steam_group":{"type":"boolean"},"needs_renewal":{"type":"boolean"},"username":{"type":["string","null"]},"vip":{"type":"boolean"}}},"InvalidCredentialsResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"InviteUserRequest":{"type":"object","required":["username"],"properties":{"message":{"type":["string","null"]},"username":{"type":"string"}}},"IpBody":{"type":"object","required":["ip","steamid64"],"properties":{"ip":{"type":"string"},"steamid64":{"type":"string"}}},"IpVerdictResponse":{"type":"object","required":["verdict"],"properties":{"country":{"type":["string","null"]},"verdict":{"type":"string"},"whitelisted":{"type":["boolean","null"]}}},"JoinMatchRequest":{"type":"object","properties":{"password":{"type":["string","null"]},"role":{"type":["string","null"]}}},"JoinRequestRequest":{"type":"object","properties":{"message":{"type":["string","null"]}}},"KeychainEntry":{"type":"object","description":"A keychain entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}},"KickMemberRequest":{"type":"object","properties":{"reason":{"type":["string","null"]}}},"LadderCategorySectionDto":{"type":"object","description":"A category section with its cards.","required":["slug","name","ladders"],"properties":{"icon":{"type":["string","null"]},"ladders":{"type":"array","items":{"$ref":"#/components/schemas/LadderHubCardDto"}},"name":{"type":"string"},"slug":{"type":"string"}}},"LadderDefDto":{"type":"object","description":"A saved ladder definition, with its window resolved for the current request time.","required":["slug","name","metric","window_type","is_recurring","period"],"properties":{"description":{"type":["string","null"]},"is_recurring":{"type":"boolean"},"metric":{"type":"string"},"mode":{"type":["string","null"]},"name":{"type":"string"},"period":{"type":"string","description":"Resolved period label (e.g. `2026-06`, `week:2026-W25`, `alltime`)."},"slug":{"type":"string"},"window_type":{"type":"string"}}},"LadderHubCardDto":{"type":"object","description":"One card on the hub: a ladder definition + its season for the requested status + a top-N peek.","required":["slug","name","metric","top"],"properties":{"banner_url":{"type":["string","null"]},"category_slug":{"type":["string","null"]},"description":{"type":["string","null"]},"metric":{"type":"string"},"mode":{"type":["string","null"]},"name":{"type":"string"},"season":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LadderSeasonDto"}]},"slug":{"type":"string","description":"Definition slug (the detail-page key)."},"top":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}}}},"LadderResponse":{"type":"object","description":"`GET /ladders/query` payload.","required":["metric","period","limit","offset","entries"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}},"limit":{"type":"integer","format":"int32","minimum":0},"metric":{"type":"string"},"mode":{"type":["string","null"]},"offset":{"type":"integer","format":"int32","minimum":0},"period":{"type":"string"}}},"LadderRow":{"type":"object","description":"One ranked row in a ladder.","required":["rank","steam_id","player_name","value"],"properties":{"player_name":{"type":"string"},"rank":{"type":"integer","format":"int64","minimum":0},"steam_id":{"type":"string","description":"Steam ID as a string to avoid JS number-precision loss."},"value":{"type":"integer","format":"int64"}}},"LadderSeasonDto":{"type":"object","description":"A season as shown on cards, the season selector, and the detail header.","required":["slug","season_number","status","period","starts_at_ms","participant_count"],"properties":{"banner_url":{"type":["string","null"]},"ends_at_ms":{"type":["integer","null"],"format":"int64"},"name":{"type":["string","null"]},"participant_count":{"type":"integer","format":"int32","minimum":0},"period":{"type":"string","description":"Resolved period token (`alltime`, `2026-07`, `week:2026-W28`, `since:…`, `range:…`)."},"season_number":{"type":"integer","format":"int32","minimum":0},"slug":{"type":"string","description":"Global season slug (e.g. `monthly-points-s5`)."},"starts_at_ms":{"type":"integer","format":"int64"},"status":{"type":"string","description":"`draft` | `upcoming` | `live` | `completed` | `cancelled`."}}},"LadderSeasonsResponse":{"type":"object","description":"`GET /ladders/{slug}/seasons` payload.","required":["definition","seasons"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"seasons":{"type":"array","items":{"$ref":"#/components/schemas/LadderSeasonDto"}}}},"LadderStandingsResponse":{"type":"object","required":["definition","entries"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}}}},"LaddersHubResponse":{"type":"object","description":"`GET /ladders/hub` payload.","required":["categories","uncategorized","status_counts","status"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/LadderCategorySectionDto"},"description":"Cards grouped into category sections (display order)."},"status":{"type":"string","description":"The status bucket these cards belong to (`live` | `upcoming` | `completed`)."},"status_counts":{"$ref":"#/components/schemas/SeasonStatusCountsDto"},"uncategorized":{"type":"array","items":{"$ref":"#/components/schemas/LadderHubCardDto"},"description":"Cards whose definition has no (or an unknown) category."}}},"LaddersListResponse":{"type":"object","required":["ladders"],"properties":{"ladders":{"type":"array","items":{"$ref":"#/components/schemas/LadderDefDto"}}}},"LeaderboardEntry":{"type":"object","required":["rank","SteamID"],"properties":{"GlobalPoints":{"type":["integer","null"],"format":"int32"},"PlayerName":{"type":["string","null"]},"SteamID":{"type":"string"},"avatar":{"type":["string","null"]},"rank":{"type":"integer","format":"int64","minimum":0},"username":{"type":["string","null"]}}},"LoadoutListResponse":{"type":"object","description":"Response for the full loadout list including which is active.","required":["loadouts","per_team_skins"],"properties":{"active_loadout_id":{"type":["integer","null"],"format":"int32"},"loadouts":{"type":"array","items":{"$ref":"#/components/schemas/LoadoutSummary"}},"per_team_skins":{"type":"boolean","description":"Whether the user prefers separate per-team skin controls."}}},"LoadoutSummary":{"type":"object","description":"Lightweight loadout summary returned in list responses.","required":["loadout_id","name","sort_order","is_active"],"properties":{"is_active":{"type":"boolean"},"loadout_id":{"type":"integer","format":"int32"},"name":{"type":"string"},"sort_order":{"type":"integer","format":"int32"}}},"MapBestRecord":{"type":"object","required":["MapName","SteamID"],"properties":{"FormattedTime":{"type":["string","null"]},"MapName":{"type":"string"},"PlayerName":{"type":["string","null"]},"SteamID":{"type":"string"},"Style":{"type":["integer","null"],"format":"int32"},"TimerTicks":{"type":["integer","null"],"format":"int32"},"UnixStamp":{"type":["integer","null"],"format":"int32"},"avatar":{"type":["string","null"]},"image_url":{"type":["string","null"]},"username":{"type":["string","null"]}}},"MatchEvent":{"type":"object","description":"Individual match event with timestamp","required":["event","timestamp"],"properties":{"event":{"type":"string"},"payload":{},"timestamp":{"type":"integer","format":"int64"}}},"MembershipRequest":{"type":"object","required":["agreement_to_stadgar"],"properties":{"agreement_to_stadgar":{"type":"boolean"}}},"MetricEntry":{"type":"object","description":"One metric in the catalog.","required":["key","name","unit","higher_is_better"],"properties":{"higher_is_better":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string","description":"Display unit hint (`points`, `count`, `damage`)."}}},"MetricsResponse":{"type":"object","description":"`GET /ladders/metrics` payload.","required":["metrics"],"properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricEntry"}}}},"MinecraftInfoBody":{"type":"object","required":["uuid"],"properties":{"ip":{"type":["string","null"],"description":"Optional player IP address for proxy checking"},"uuid":{"type":"string","description":"Minecraft UUID (accepts both dashed and undashed formats)"}}},"MinecraftInfoResponse":{"type":"object","required":["vip","needs_renewal","bad_ip","country","ip_checked"],"properties":{"bad_ip":{"type":"boolean"},"country":{"type":["string","null"]},"error":{"type":["string","null"]},"ip_checked":{"type":"boolean","description":"Whether an IP proxy check was actually performed"},"minecraft_username":{"type":["string","null"]},"needs_renewal":{"type":"boolean"},"user_id":{"type":["integer","null"],"format":"int32","description":"PlayPark `user_id`, or `null` if the Minecraft UUID isn't linked to a user\n(or the lookup short-circuited on bad UUID / bad IP)."},"username":{"type":["string","null"]},"vip":{"type":"boolean"}}},"MusicEntry":{"type":"object","description":"A music kit entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}},"NewsAuditAction":{"type":"string","enum":["created","updated","published","unpublished","deleted","restored"]},"NewsAuditLogWithUser":{"type":"object","required":["id","news_post_id","user_id","action","created_at","user_username"],"properties":{"action":{"$ref":"#/components/schemas/NewsAuditAction"},"created_at":{"type":"string","format":"date-time"},"field_changed":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"ip_address":{"type":["string","null"]},"new_value":{},"news_post_id":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"old_value":{},"user_agent":{"type":["string","null"]},"user_avatar":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"user_username":{"type":"string"}}},"NewsAuditLogWithUserAndPost":{"type":"object","required":["id","news_post_id","user_id","action","created_at","user_username","post_title","post_slug"],"properties":{"action":{"$ref":"#/components/schemas/NewsAuditAction"},"created_at":{"type":"string","format":"date-time"},"field_changed":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"ip_address":{"type":["string","null"]},"new_value":{},"news_post_id":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"old_value":{},"post_slug":{"type":"string"},"post_title":{"type":"string"},"user_agent":{"type":["string","null"]},"user_avatar":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"user_username":{"type":"string"}}},"NewsPost":{"type":"object","required":["id","slug","title","content","author_id","status","created_at","updated_at"],"properties":{"author_id":{"type":"integer","format":"int32"},"background_image_id":{"type":["integer","null"],"format":"int32"},"category":{"type":["string","null"]},"content":{"type":"string"},"content_lexical":{},"created_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"icon_id":{"type":["integer","null"],"format":"int32"},"id":{"type":"integer","format":"int32"},"meta_description":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"NewsPostPlatform":{"type":"object","description":"Hydrated assignment returned in API responses. Carries the platform code +\ndisplay name so callers don't have to do a second round-trip.","required":["news_post_id","platform_id","platform_code","platform_name","featured_on_platform"],"properties":{"featured_on_platform":{"$ref":"#/components/schemas/BoolFromI8"},"news_post_id":{"type":"integer","format":"int32"},"platform_code":{"type":"string"},"platform_id":{"type":"integer","format":"int32"},"platform_name":{"type":"string"}}},"NewsPostSummary":{"type":"object","required":["id","short_code","canonical_path","slug","title","author_id","author_username","status","created_at","updated_at"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"NewsPostWithAuthor":{"type":"object","required":["id","short_code","canonical_path","slug","title","content","author_id","status","created_at","updated_at","author_username"],"properties":{"author_avatar":{"type":["string","null"]},"author_id":{"type":"integer","format":"int32"},"author_username":{"type":"string"},"background_image_id":{"type":["integer","null"],"format":"int32"},"background_image_url":{"type":["string","null"]},"canonical_path":{"type":"string"},"category":{"type":["string","null"]},"content":{"type":"string"},"content_lexical":{},"created_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"header_image_id":{"type":["integer","null"],"format":"int32"},"header_image_url":{"type":["string","null"]},"icon_id":{"type":["integer","null"],"format":"int32"},"icon_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"meta_description":{"type":["string","null"]},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/NewsPostPlatform"}},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_publish_at":{"type":["string","null"],"format":"date-time"},"short_code":{"type":"string"},"short_description":{"type":["string","null"]},"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/NewsStatus"},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32"},"thumbnail_url":{"type":["string","null"]},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"NewsStats":{"type":"object","description":"Get news posts count (public endpoint)","required":["total_published","total_posts"],"properties":{"total_posts":{"type":"integer","format":"int64"},"total_published":{"type":"integer","format":"int64"}}},"NewsStatus":{"type":"string","enum":["draft","published","scheduled","deleted"]},"NormalizedPaymentStatus":{"type":"string","description":"Normalized payment status used across all providers.\nEach provider maps their native statuses to these values.","enum":["created","open","pending","authorized","paid","failed","expired","cancelled","refunded","charged_back"]},"OrderStatusResponse":{"type":"object","required":["id","fulfillment_status","status","purpose_type","purpose_ref","amount_minor","currency","provider","created_at"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"fulfillment_status":{"$ref":"#/components/schemas/FulfillmentStatus"},"id":{"type":"integer","format":"int32"},"provider":{"type":"string"},"purpose_ref":{"type":"string"},"purpose_type":{"type":"string"},"status":{"$ref":"#/components/schemas/NormalizedPaymentStatus"}}},"PaginatedResponse_Value":{"type":"object","required":["data","page","page_size","total_pages"],"properties":{"data":{"type":"array","items":{}},"page":{"type":"integer","format":"int64"},"page_size":{"type":"integer","format":"int64"},"total_pages":{"type":"integer","format":"int64"}}},"PasswordLogin":{"type":"object","required":["username","password"],"properties":{"password":{"type":"string"},"username":{"type":"string"}}},"PasswordResetAccept":{"type":"object","required":["email","token","password"],"properties":{"continuation":{"type":["string","null"],"description":"Opaque continuation from the reset email. It is optional for legacy\nlinks and is never trusted by itself; the claimed reset row must carry\nthe same value."},"email":{"type":"string"},"password":{"type":"string"},"token":{"type":"string"}}},"PasswordResetContinuationData":{"type":"object","required":["redirect_uri"],"properties":{"redirect_uri":{"type":"string"},"resume_payment_order":{"type":["integer","null"],"format":"int64","minimum":0},"return_url":{"type":["string","null"]}}},"PasswordResetRequest":{"type":"object","required":["email"],"properties":{"continuation":{"type":["string","null"],"description":"Opaque continuation from an expired link. A valid, unexpired row can\nbe cloned onto the newly issued reset link without exposing its\nredirect values to the browser."},"email":{"type":"string"},"redirect_uri":{"type":["string","null"],"description":"Optional validated SSO context. It is stored behind an opaque\ncontinuation token and is returned only after the reset token is\nredeemed successfully."},"resume_payment_order":{"type":["integer","null"],"format":"int64","minimum":0},"return_url":{"type":["string","null"]}}},"PasswordUpdate":{"type":"object","required":["current_password","new_password"],"properties":{"current_password":{"type":"string"},"new_password":{"type":"string"}}},"PasswordlessAccept":{"type":"object","required":["email","token"],"properties":{"email":{"type":"string"},"token":{"type":"string"}}},"PasswordlessRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"redirect_uri":{"type":["string","null"],"description":"Optional SSO context. When the `redirect_uri` matches the registered\nSSO client allowlist (see `crate::sso::is_allowed_redirect`), the\ngenerated email link points back at the auth frontend with\n`redirect_uri` / `return_url` preserved, so the user re-enters the SSO\nflow after consuming the token. When absent or invalid, the link falls\nback to the legacy web-app `FRONTEND_URL/passwordless` destination."},"resume_payment_order":{"type":["integer","null"],"format":"int32","description":"Receipt recovery hint, never proof that the email recipient owns it.\nPayment status still checks the authenticated account after login."},"return_url":{"type":["string","null"]}}},"PatchBracketMatchRequest":{"type":"object","description":"Patch a single match within a bracket.\nAll fields are optional — only provided fields are updated.","properties":{"auto_win":{"type":["boolean","null"]},"completed":{"type":["boolean","null"]},"force":{"type":["boolean","null"]},"participant_a":{},"participant_b":{},"reset":{"type":["boolean","null"]},"team_a_score":{"type":["integer","null"],"format":"int32"},"team_b_score":{"type":["integer","null"],"format":"int32"},"winner":{"type":["string","null"]}}},"PaymentEvent":{"type":"object","description":"Append-only audit log for payment order state transitions.\nEvery status change, webhook receipt, or reconciliation action is recorded here.","required":["id","payment_order_id","kind","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"kind":{"type":"string","description":"Event type (e.g. \"status_transition\", \"webhook_received\", \"reconciliation\")."},"new_status":{"type":["string","null"]},"old_status":{"type":["string","null"]},"payload":{},"payment_order_id":{"type":"integer","format":"int32"},"provider_status":{"type":["string","null"]}}},"PaymentOrder":{"type":"object","description":"Represents a single payment attempt from a user.\nTracks the full lifecycle from creation through provider checkout to completion.","required":["id","purpose_type","purpose_ref","provider","status","amount_minor","currency","amount_refunded_minor","duration_days","created_at","updated_at"],"properties":{"amount_minor":{"type":"integer","format":"int64","description":"Payment amount in minor units (cents/ore)."},"amount_refunded_minor":{"type":"integer","format":"int64","description":"Amount refunded in minor units."},"checkout_url":{"type":["string","null"],"description":"URL to redirect the user to for payment."},"completed_at":{"type":["string","null"],"format":"date-time","description":"When the payment was confirmed as paid."},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","description":"ISO 4217 currency code."},"duration_days":{"type":"integer","format":"int32","description":"How many days of subscription this payment buys."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the checkout session expires."},"id":{"type":"integer","format":"int32"},"provider":{"type":"string","description":"Which provider handles this payment (e.g. \"polar\")."},"provider_checkout_id":{"type":["string","null"],"description":"The provider's hosted checkout/session identifier."},"provider_metadata":{"description":"Sanitized snapshot of the provider response."},"provider_payment_id":{"type":["string","null"],"description":"The provider's canonical order/payment identifier once the checkout completes."},"purpose_ref":{"type":"string","description":"Reference within the purpose domain (e.g. \"premium\", \"vip\")."},"purpose_type":{"type":"string","description":"What this payment is for (e.g. \"subscription_purchase\")."},"status":{"$ref":"#/components/schemas/NormalizedPaymentStatus","description":"Internal normalized status."},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":["integer","null"],"format":"int32","description":"Owning user. May be `NULL` for orders whose owner has been deleted —\nthe row is preserved for financial audit even after user removal."},"webhook_secret":{"type":["string","null"],"description":"Optional per-order secret used by legacy providers with order-specific webhooks."}}},"PaymentProviderSubscription":{"type":"object","description":"Provider-side recurring subscription mapping.\n\nThis is deliberately separate from `user_subscriptions`: provider rows track\nthe Polar contract/customer/product we validate renewal orders against,\nwhile `user_subscriptions` tracks local access and expiry.\n\n`status` is intentionally `String` because the underlying column is a\n`VARCHAR(32)` populated directly with the provider's status (Polar uses\n`active`, `trialing`, `past_due`, `canceled`, `unpaid`, `incomplete`).\nUse [`PaymentProviderSubscription::is_canceled`] / [`is_active`] /\n[`provider_status`] for typed checks instead of comparing raw strings.","required":["id","provider","provider_subscription_id","subscription_type","provider_customer_id","provider_product_id","amount_minor","currency","period_days","status","cancel_at_period_end","created_at","updated_at"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"current_period_end":{"type":["string","null"],"format":"date-time"},"current_period_start":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int64"},"period_days":{"type":"integer","format":"int32"},"provider":{"type":"string"},"provider_checkout_id":{"type":["string","null"]},"provider_customer_id":{"type":"string"},"provider_metadata":{},"provider_product_id":{"type":"string"},"provider_subscription_id":{"type":"string"},"status":{"type":"string"},"subscription_price_id":{"type":["integer","null"],"format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":["integer","null"],"format":"int32"}}},"PaymentRefund":{"type":"object","required":["id","payment_order_id","idempotency_key","revoke_subscription","status","created_at","updated_at"],"properties":{"admin_user_id":{"type":["integer","null"],"format":"int32"},"amount_minor":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"string","format":"date-time"},"failure_reason":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"idempotency_key":{"type":"string"},"payment_order_id":{"type":"integer","format":"int32"},"provider_refund_id":{"type":["string","null"]},"provider_response":{},"reason":{"type":["string","null"]},"revoke_subscription":{"type":"boolean"},"status":{"$ref":"#/components/schemas/RefundStatus"},"updated_at":{"type":"string","format":"date-time"}}},"PermissionGroup":{"type":"object","description":"A permission group with metadata","required":["id","name","color","priority","is_default","show_on_staff_page","created_at","updated_at"],"properties":{"color":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"is_default":{"type":"boolean"},"name":{"type":"string"},"priority":{"type":"integer","format":"int32"},"show_on_staff_page":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}}},"PickPlayerRequest":{"type":"object","required":["player_id"],"properties":{"player_id":{"type":"integer","format":"int32"}}},"PickTeamPlayerRequest":{"type":"object","required":["player_id"],"properties":{"player_id":{"type":"integer","format":"int32"}}},"PinEntry":{"type":"object","description":"A collectible pin/coin/medal entry from the catalog.","required":["id","name","image"],"properties":{"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"}}},"PlatformAssignment":{"type":"object","description":"Incoming assignment from API clients (admin form). The platform id is the\nnumeric id from the `platforms` reference table.","required":["platform_id"],"properties":{"featured_on_platform":{"type":"boolean"},"platform_id":{"type":"integer","format":"int32","minimum":1}}},"PlayerAgentsRow":{"type":"object","description":"A row from `cs2_servers.wp_player_agents`.","required":["steamid"],"properties":{"agent_ct":{"type":["string","null"]},"agent_t":{"type":["string","null"]},"steamid":{"type":"string"}}},"PlayerGlovesRow":{"type":"object","description":"A row from `cs2_servers.wp_player_gloves`, enriched with paint data\nfrom `cs2_servers.wp_player_skins` (the plugin stores glove paints there,\nkeyed by the glove defindex as `weapon_defindex`).","required":["steamid","weapon_team","weapon_defindex"],"properties":{"steamid":{"type":"string"},"weapon_defindex":{"type":"integer","format":"int32"},"weapon_paint_id":{"type":"integer","format":"int32"},"weapon_team":{"type":"integer","format":"int32"}}},"PlayerGroupsResponse":{"type":"object","required":["groups","permissions"],"properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/PermissionGroup"},"description":"Permission groups the player belongs to"},"permissions":{"type":"array","items":{"type":"string"},"description":"Resolved permission nodes from all groups and overrides"},"user_id":{"type":["integer","null"],"format":"int32","description":"The player's Playpark user ID (null if no linked account)"}}},"PlayerKnifeRow":{"type":"object","description":"A row from `cs2_servers.wp_player_knife`.","required":["steamid","weapon_team","knife"],"properties":{"knife":{"type":"string"},"steamid":{"type":"string"},"weapon_team":{"type":"integer","format":"int32"}}},"PlayerLoadout":{"type":"object","description":"Combined response with all of a player's equipped items.","required":["skins","knives","gloves","music"],"properties":{"agents":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlayerAgentsRow"}]},"gloves":{"type":"array","items":{"$ref":"#/components/schemas/PlayerGlovesRow"}},"knives":{"type":"array","items":{"$ref":"#/components/schemas/PlayerKnifeRow"}},"music":{"type":"array","items":{"$ref":"#/components/schemas/PlayerMusicRow"}},"skins":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSkinRow"}}}},"PlayerMusicRow":{"type":"object","description":"A row from `cs2_servers.wp_player_music`.","required":["steamid","weapon_team","music_id"],"properties":{"music_id":{"type":"integer","format":"int32"},"steamid":{"type":"string"},"weapon_team":{"type":"integer","format":"int32"}}},"PlayerSkinRow":{"type":"object","description":"A row from `cs2_servers.wp_player_skins`.","required":["steamid","weapon_team","weapon_defindex","weapon_paint_id","weapon_wear","weapon_seed","weapon_stattrak","weapon_stattrak_count","weapon_sticker_0","weapon_sticker_1","weapon_sticker_2","weapon_sticker_3","weapon_sticker_4","weapon_keychain"],"properties":{"steamid":{"type":"string"},"weapon_defindex":{"type":"integer","format":"int32"},"weapon_keychain":{"type":"string"},"weapon_nametag":{"type":["string","null"]},"weapon_paint_id":{"type":"integer","format":"int32"},"weapon_seed":{"type":"integer","format":"int32"},"weapon_stattrak":{"type":"integer","format":"int32"},"weapon_stattrak_count":{"type":"integer","format":"int32"},"weapon_sticker_0":{"type":"string"},"weapon_sticker_1":{"type":"string"},"weapon_sticker_2":{"type":"string"},"weapon_sticker_3":{"type":"string"},"weapon_sticker_4":{"type":"string"},"weapon_team":{"type":"integer","format":"int32"},"weapon_wear":{"type":"number","format":"float"}}},"PlayerStandingResponse":{"type":"object","required":["definition","steam_id"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"rank":{"type":["integer","null"],"format":"int64","description":"`null` when the player has no contribution to this ladder.","minimum":0},"steam_id":{"type":"string"},"value":{"type":["integer","null"],"format":"int64"}}},"PlayerStats":{"type":"object","description":"Comprehensive player statistics","required":["kills","assists","deaths","mvps","score","2ks","3ks","4ks","5ks","kills_with_headshot","kills_with_pistol","kills_with_sniper","damage_dealt","entry_attempts","entry_successes","flashes_thrown","flashes_successful","flashes_enemies_blinded","utility_thrown","utility_damage","1vX_attempts","1vX_wins"],"properties":{"1vX_attempts":{"type":"integer","format":"int32"},"1vX_wins":{"type":"integer","format":"int32"},"2ks":{"type":"integer","format":"int32"},"3ks":{"type":"integer","format":"int32"},"4ks":{"type":"integer","format":"int32"},"5ks":{"type":"integer","format":"int32"},"assists":{"type":"integer","format":"int32"},"damage_dealt":{"type":"integer","format":"int32"},"deaths":{"type":"integer","format":"int32"},"entry_attempts":{"type":"integer","format":"int32"},"entry_successes":{"type":"integer","format":"int32"},"flashes_enemies_blinded":{"type":"integer","format":"int32"},"flashes_successful":{"type":"integer","format":"int32"},"flashes_thrown":{"type":"integer","format":"int32"},"kills":{"type":"integer","format":"int32"},"kills_with_headshot":{"type":"integer","format":"int32"},"kills_with_pistol":{"type":"integer","format":"int32"},"kills_with_sniper":{"type":"integer","format":"int32"},"mvps":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"utility_damage":{"type":"integer","format":"int32"},"utility_thrown":{"type":"integer","format":"int32"}}},"PlayerStatusResponse":{"type":"object","required":["banned","muted","gagged","comms","ctbanned","warns","warn_count"],"properties":{"ban":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Ban","description":"The active ban record, if any"}]},"banned":{"type":"boolean","description":"Whether the player has an active game ban"},"comms":{"type":"array","items":{"$ref":"#/components/schemas/Comm"},"description":"All active communication bans"},"ctban":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Ctban","description":"The active CT ban record, if any"}]},"ctbanned":{"type":"boolean","description":"Whether the player has an active CT ban"},"gagged":{"type":"boolean","description":"Whether the player has an active text gag"},"muted":{"type":"boolean","description":"Whether the player has an active voice mute"},"warn_count":{"type":"integer","description":"Number of active warnings","minimum":0},"warns":{"type":"array","items":{"$ref":"#/components/schemas/Warn"},"description":"All active warnings"}}},"PlayerSummary":{"type":"object","properties":{"GlobalPoints":{"type":["integer","null"],"format":"int32"},"map_times":{},"stats":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlayerTimerStats"}]}}},"PlayerTimerStats":{"type":"object","required":["SteamID"],"properties":{"GlobalPoints":{"type":["integer","null"],"format":"int32"},"LastConnected":{"type":["integer","null"],"format":"int32"},"PlayerName":{"type":["string","null"]},"SteamID":{"type":"string"},"TimesConnected":{"type":["integer","null"],"format":"int32"},"avatar":{"type":["string","null"]},"username":{"type":["string","null"]}}},"PlayerUsernameHistory":{"type":"object","required":["steamid","usernames","total_changes"],"properties":{"steamid":{"type":"string"},"total_changes":{"type":"integer","minimum":0},"usernames":{"type":"array","items":{"$ref":"#/components/schemas/Cs2UsernameHistoryEntry"}}}},"PlaytimeRewardRequest":{"type":"object","required":["steam_id","server_id","session_seconds"],"properties":{"server_id":{"type":"integer","format":"int32","description":"Server ID where the player is playing"},"session_seconds":{"type":"integer","format":"int32","description":"Current session time in seconds from the plugin"},"steam_id":{"type":"string","description":"Steam ID of the player (17-digit number starting with 76561)"}}},"PlaytimeRewardResponse":{"type":"object","required":["steam_id","success","coins_awarded","total_balance","next_reward_seconds","message"],"properties":{"coins_awarded":{"type":"integer","format":"int32","description":"Number of coins awarded (0 if none)"},"message":{"type":"string","description":"Human-readable message about the reward status"},"next_reward_seconds":{"type":"integer","format":"int32","description":"Seconds until the next reward is available"},"steam_id":{"type":"string","description":"Steam ID of the player this response is for"},"success":{"type":"boolean","description":"Whether the reward check was successful"},"total_balance":{"type":"integer","format":"int32","description":"Player's total coin balance after the transaction"}}},"PublicSubscriptionPrice":{"type":"object","description":"Public projection of `SubscriptionPrice` for the unauthenticated\n`/payments/prices` endpoint. Drops `polar_product_id` and `active` —\nthe former is a provider mapping detail, the latter is implicit from\nthe endpoint only returning active rows.","required":["id","subscription_type","currency","amount_minor","period_days","is_checkout_price"],"properties":{"amount_minor":{"type":"integer","format":"int64"},"coin_price":{"type":["integer","null"],"format":"int32"},"currency":{"type":"string"},"id":{"type":"integer","format":"int32"},"is_checkout_price":{"type":"boolean","description":"This currency is used by hosted checkout, independent of UI language."},"period_days":{"type":"integer","format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"}}},"PunishmentsData":{"type":"object","description":"Full punishment data for the quick view drawer","required":["bans","comms","ctbans","warns"],"properties":{"bans":{"type":"array","items":{"$ref":"#/components/schemas/Ban"}},"comms":{"type":"array","items":{"$ref":"#/components/schemas/Comm"}},"ctbans":{"type":"array","items":{"$ref":"#/components/schemas/Ctban"}},"warns":{"type":"array","items":{"$ref":"#/components/schemas/Warn"}}}},"PurchaseRequest":{"type":"object","required":["item_id"],"properties":{"item_id":{"type":"integer","format":"int32","minimum":1},"storefront":{"type":["string","null"],"description":"Storefront the purchase is being made on. Determines which (item,\nstorefront) price to charge and which currency wallet to debit.\nDefaults to `playpark` for backwards compatibility.","maxLength":64,"minLength":1}}},"PurchaseResponse":{"type":"object","required":["success","message","remaining_coins","currency_code","inventory_id"],"properties":{"currency_code":{"type":"string"},"inventory_id":{"type":"integer","format":"int32"},"message":{"type":"string"},"remaining_coins":{"type":"integer","format":"int32","description":"Remaining balance in the currency that was just debited."},"success":{"type":"boolean"}}},"PurchaseSubscriptionRequest":{"type":"object","required":["subscription_type","duration_months"],"properties":{"duration_months":{"type":"integer","format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"}}},"RealtimeTokenResponse":{"type":"object","required":["token","expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"},"token":{"type":"string"}}},"RefundOrderResponse":{"type":"object","required":["refund"],"properties":{"duplicate":{"type":["boolean","null"]},"provider_response":{"type":["object","null"]},"refund":{"$ref":"#/components/schemas/PaymentRefund"}}},"RefundRequest":{"type":"object","properties":{"amount":{"type":["integer","null"],"format":"int64","description":"Amount in minor units to refund. If not provided, refunds the full\nremaining refundable balance."},"idempotency_key":{"type":["string","null"],"description":"Optional idempotency key. When omitted the server uses `auto-{order_id}`,\nallowing only one default refund attempt per order. Send a unique key\nfor each intentional additional partial refund."},"reason":{"type":["string","null"],"description":"Reason for the refund (forwarded to provider where supported)."},"revoke_subscription":{"type":["boolean","null"],"description":"Whether to revoke this order's delivered entitlement when the refund\nsettles. Defaults to `true`; other orders and independent grants remain."}}},"RefundStatus":{"type":"string","enum":["pending","succeeded","failed"]},"Register":{"type":"object","required":["email","username","password","user_agreement"],"properties":{"email":{"type":"string"},"locale":{"type":["string","null"],"description":"Optional locale used to render legal text (e.g. \"sv\", \"en\").\nStored alongside consent for GDPR audit."},"password":{"type":"string"},"signup_source":{"type":["string","null"],"description":"Platform the user originated from. Closed set enforced by\n`sanitize_signup_source`; anything off-list collapses to `unknown`."},"user_agreement":{"type":"boolean","description":"Must be true to register."},"username":{"type":"string"},"utm_campaign":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_source":{"type":["string","null"],"description":"UTM marketing attribution. Sanitized to `[a-z0-9._-]` and length-\nclamped to the column width; malformed values become `None` rather\nthan blocking the signup."}}},"RegisterTournamentRequest":{"type":"object","properties":{"registration_data":{},"team_id":{"type":["integer","null"],"format":"int32"}}},"RemoveCoinsRequest":{"type":"object","required":["user_id","amount"],"properties":{"amount":{"type":"integer","format":"int32","description":"Amount of coins to remove (1-10000)"},"currency_code":{"type":["string","null"],"description":"Currency to debit. Defaults to `playpark_coins`."},"description":{"type":["string","null"],"description":"Optional description for the transaction"},"user_id":{"type":"integer","format":"int32","description":"User ID to remove coins from"}}},"RemoveConnection":{"type":"object","required":["connection_type"],"properties":{"connection_type":{"type":"string"},"expected_user_id":{"type":["integer","null"],"format":"int32"}}},"RemoveItemFromCaseRequest":{"type":"object","required":["case_id","item_id"],"properties":{"case_id":{"type":"integer","format":"int32","minimum":1},"item_id":{"type":"integer","format":"int32","minimum":1}}},"RenameLoadoutRequest":{"type":"object","description":"Request body for renaming a loadout.","required":["name"],"properties":{"name":{"type":"string","description":"New display name (1-30 characters)."}}},"ReorderLoadoutsRequest":{"type":"object","description":"Request body for reordering loadouts.","required":["loadout_ids"],"properties":{"loadout_ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Ordered list of loadout IDs in the desired sort order."}}},"RespondInvitationRequest":{"type":"object","required":["accept"],"properties":{"accept":{"type":"boolean"}}},"RespondJoinRequestRequest":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"}}},"RevenueStats":{"type":"object","required":["subscription_type","total_revenue","purchase_count","renewal_count","refund_count"],"properties":{"purchase_count":{"type":"integer","format":"int64"},"refund_count":{"type":"integer","format":"int64"},"renewal_count":{"type":"integer","format":"int64"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"total_revenue":{"type":"integer","format":"int64"}}},"RevokeSubscriptionRequest":{"type":"object","required":["subscription_type","duration_days"],"properties":{"duration_days":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"}}},"SaveAgentRequest":{"type":"object","description":"Request body for saving an agent selection.","required":["team","model"],"properties":{"model":{"type":"string","description":"The agent model path, or \"default\" to reset."},"team":{"type":"integer","format":"int32","description":"2 = Terrorist, 3 = Counter-Terrorist"}}},"SaveGlovesRequest":{"type":"object","description":"Request body for saving a glove selection.\nBoth the glove model (`weapon_defindex`) and the specific paint finish\n(`weapon_paint_id`) are required because the CS2 WeaponPaints plugin\nneeds both to apply gloves in-game.","required":["team","weapon_defindex","weapon_paint_id"],"properties":{"team":{"type":"integer","format":"int32"},"weapon_defindex":{"type":"integer","format":"int32"},"weapon_paint_id":{"type":"integer","format":"int32"}}},"SaveKnifeRequest":{"type":"object","description":"Request body for saving a knife selection.","required":["team","knife"],"properties":{"knife":{"type":"string"},"team":{"type":"integer","format":"int32"}}},"SaveMusicRequest":{"type":"object","description":"Request body for saving a music kit selection.","required":["team","music_id"],"properties":{"music_id":{"type":"integer","format":"int32"},"team":{"type":"integer","format":"int32"}}},"SaveWeaponSkinRequest":{"type":"object","description":"Request body for saving a weapon skin configuration.","required":["team","weapon_defindex","weapon_paint_id"],"properties":{"team":{"type":"integer","format":"int32"},"weapon_defindex":{"type":"integer","format":"int32"},"weapon_keychain":{"type":"string"},"weapon_nametag":{"type":["string","null"]},"weapon_paint_id":{"type":"integer","format":"int32"},"weapon_seed":{"type":"integer","format":"int32"},"weapon_stattrak":{"type":"integer","format":"int32"},"weapon_sticker_0":{"type":"string"},"weapon_sticker_1":{"type":"string"},"weapon_sticker_2":{"type":"string"},"weapon_sticker_3":{"type":"string"},"weapon_sticker_4":{"type":"string"},"weapon_wear":{"type":"number","format":"float"}}},"ScheduleRequest":{"type":"object","required":["scheduled_at"],"properties":{"scheduled_at":{"type":"string","format":"date-time","minLength":1}}},"SearchResults_SearchTeam":{"type":"object","required":["results","total","has_more"],"properties":{"has_more":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","required":["id","name","member_count"],"properties":{"avatar_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"member_count":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":["string","null"]}}}},"total":{"type":"integer","format":"int64"}}},"SearchResults_SearchUser":{"type":"object","required":["results","total","has_more"],"properties":{"has_more":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","required":["user_id","username"],"properties":{"avatar":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"username":{"type":"string"}}}},"total":{"type":"integer","format":"int64"}}},"SeasonPlayerResponse":{"type":"object","description":"`GET /ladders/seasons/{season_slug}/players/{steam_id}` payload.","required":["season","steam_id"],"properties":{"rank":{"type":["integer","null"],"format":"int64","minimum":0},"season":{"$ref":"#/components/schemas/LadderSeasonDto"},"steam_id":{"type":"string"},"value":{"type":["integer","null"],"format":"int64"}}},"SeasonStandingsResponse":{"type":"object","description":"`GET /ladders/seasons/{season_slug}/standings` payload.","required":["definition","season","entries"],"properties":{"definition":{"$ref":"#/components/schemas/LadderDefDto"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LadderRow"}},"season":{"$ref":"#/components/schemas/LadderSeasonDto"}}},"SeasonStatusCountsDto":{"type":"object","description":"Season counts by status for the hub tab badges.","required":["live","upcoming","completed"],"properties":{"completed":{"type":"integer","format":"int64"},"live":{"type":"integer","format":"int64"},"upcoming":{"type":"integer","format":"int64"}}},"SendChatMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"message_type":{"type":["string","null"]}}},"SetCaptainRequest":{"type":"object","required":["team_side","user_id"],"properties":{"team_side":{"type":"string"},"user_id":{"type":"integer","format":"int32"}}},"SetCountryRequest":{"type":"object","required":["country"],"properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code (e.g. \"SE\", \"NO\", \"FI\"). Always\nstored uppercase."}}},"SetReadyStatusRequest":{"type":"object","required":["is_ready"],"properties":{"is_ready":{"type":"boolean"}}},"ShopCategory":{"type":"object","required":["category","item_count"],"properties":{"category":{"type":"string"},"item_count":{"type":"integer","format":"int64"}}},"ShopItem":{"type":"object","required":["id","item_name","item_type","item_subtitle","item_rarity","price","currency_code","user_owned"],"properties":{"amount":{"type":["integer","null"],"format":"int32"},"currency_code":{"type":"string","description":"Currency code of the scoped storefront (e.g. `playpark_coins`,\n`midgard_goldcoin`)."},"description":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"image_url":{"type":["string","null"]},"item_name":{"type":"string"},"item_rarity":{"type":"string"},"item_subtitle":{"type":"string"},"item_type":{"type":"string"},"price":{"type":"integer","format":"int64","description":"Price in the currently scoped storefront's currency."},"purchase_limit_per_user":{"type":["integer","null"],"format":"int32","description":"Per-user lifetime purchase cap, when set on the item. `NULL` = no cap.\nClients render this as a \"Max N per spelare\" hint."},"stock":{"type":["integer","null"],"format":"int32","description":"Remaining stock — only surfaced when the admin enabled\n`display_stock`. `NULL` either means unlimited or the admin chose to\nhide the count; clients should treat both as \"no count to render\"."},"user_owned":{"type":"integer","format":"int64","description":"How many of this item the *current* user already owns (counted with\nthe item's `purchase_limit_scope`). `0` when no session."}}},"ShopItemStorefrontAssignment":{"type":"object","description":"Incoming assignment from admin clients. The storefront id is the numeric\nid from the `storefronts` table.","required":["storefront_id","price"],"properties":{"price":{"type":"integer","format":"int64","minimum":1},"storefront_id":{"type":"integer","format":"int32","minimum":1}}},"SkinEntry":{"type":"object","description":"A weapon skin entry from the catalog.\nNote: `weapon_defindex` can be a number (1) or a string (\"weapon_knife_default\")\nin the upstream JSON, so we store it as a String.","required":["weapon_defindex","weapon_name","paint","image","paint_name"],"properties":{"image":{"type":"string"},"legacy_model":{"type":"boolean"},"paint":{"type":"string"},"paint_name":{"type":"string"},"texture":{"type":["string","null"]},"texture_metal":{"type":["string","null"]},"threejsmodel":{"type":["string","null"]},"weapon_defindex":{"type":"string"},"weapon_name":{"type":"string"}}},"SlaStatus":{"type":"string","description":"SLA status for display","enum":["ok","warning","breached","na"]},"SocialMediaPost":{"type":"object","description":"A social media post entry, representing a single post to a single platform.","required":["id","news_post_id","provider","post_type","status","retry_count","max_retries","created_by","created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"integer","format":"int32"},"custom_image_url":{"type":["string","null"]},"custom_text":{"type":["string","null"]},"error_message":{"type":["string","null"]},"external_post_id":{"type":["string","null"]},"external_post_url":{"type":["string","null"]},"id":{"type":"integer","format":"int32"},"max_retries":{"type":"integer","format":"int32"},"news_post_id":{"type":"integer","format":"int32"},"post_type":{"$ref":"#/components/schemas/SocialPostType"},"posted_at":{"type":["string","null"],"format":"date-time"},"provider":{"$ref":"#/components/schemas/SocialProvider"},"retry_count":{"type":"integer","format":"int32"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/SocialPostStatus"},"updated_at":{"type":"string","format":"date-time"}}},"SocialPostStatus":{"type":"string","description":"Lifecycle status of a social media post.","enum":["pending","scheduled","posting","posted","failed","cancelled"]},"SocialPostType":{"type":"string","description":"The type of post to create on the platform.","enum":["link","image"]},"SocialProvider":{"type":"string","description":"Which social media platform a post targets.","enum":["x","facebook","instagram","discord"]},"SubscriptionListResponse":{"type":"object","required":["subscriptions","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int32"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/UserSubscriptionWithUser"}},"total":{"type":"integer","format":"int32"}}},"SubscriptionPrice":{"type":"object","description":"Database-driven pricing for subscription tiers.\nSupports multiple currencies and billing periods.","required":["id","subscription_type","currency","amount_minor","period_days","active","created_at","updated_at"],"properties":{"active":{"type":"boolean","description":"Whether this price is currently active."},"amount_minor":{"type":"integer","format":"int64","description":"Price in minor units (cents/ore)."},"coin_price":{"type":["integer","null"],"format":"int32","description":"Equivalent price in coins (for coin-based purchases)."},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","description":"ISO 4217 currency code."},"id":{"type":"integer","format":"int32"},"period_days":{"type":"integer","format":"int32","description":"Subscription period length in days."},"polar_product_id":{"type":["string","null"],"description":"Polar product ID used for hosted checkout."},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"updated_at":{"type":"string","format":"date-time"}}},"SubscriptionStats":{"type":"object","required":["active_counts","days_period"],"properties":{"active_counts":{"$ref":"#/components/schemas/ActiveSubscriptionCounts"},"days_period":{"type":"integer","format":"int32"},"premium":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]},"pro":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]},"vip":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RevenueStats"}]}}},"SubscriptionStatus":{"type":"string","enum":["active","expired","cancelled","pending"]},"SubscriptionTransaction":{"type":"object","required":["id","transaction_type","subscription_type","amount","duration_days","status","created_at"],"properties":{"admin_user_id":{"type":["integer","null"],"format":"int32"},"amount":{"type":"integer","format":"int32","description":"Legacy amount column. For coin purchases this is the coin cost; for\npaid purchases this remains populated with a major-unit approximation\nfor backward compatibility, but real reporting should use\n`amount_minor` + `currency`."},"amount_minor":{"type":["integer","null"],"format":"int64","description":"Real-money amount in minor units (cents/ore) when this transaction\nwas paid via a payment provider. NULL for coin or admin transactions."},"coin_transaction_id":{"type":["integer","null"],"format":"int32"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":["string","null"],"description":"ISO 4217 currency for `amount_minor`. NULL for coin/admin transactions."},"duration_days":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"notes":{"type":["string","null"]},"payment_order_id":{"type":["integer","null"],"format":"int32"},"provider":{"type":["string","null"],"description":"Payment provider id (e.g. \"polar\") for paid transactions. NULL for\ncoin/admin transactions."},"status":{"$ref":"#/components/schemas/TransactionStatus"},"subscription_id":{"type":["integer","null"],"format":"int32"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"transaction_type":{"$ref":"#/components/schemas/TransactionType"},"user_id":{"type":["integer","null"],"format":"int32"}}},"SubscriptionType":{"type":"string","enum":["premium","vip","pro"]},"SupportSettingsResponse":{"type":"object","description":"Response for support settings","required":["typing_indicators_enabled"],"properties":{"typing_indicators_enabled":{"type":"boolean"}}},"SupportTicket":{"type":"object","required":["id","created_by","category","title","description","status","priority","created_at","updated_at"],"properties":{"assigned_to":{"type":["integer","null"],"format":"int32"},"category":{"type":"string"},"closed_at":{"type":["string","null"],"format":"date-time"},"closed_by":{"type":["integer","null"],"format":"int32"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"integer","format":"int32"},"description":{"type":"string"},"first_response_at":{"type":["string","null"],"format":"date-time"},"first_response_sla_hours":{"type":["integer","null"],"format":"int32","description":"Target hours for first response (default: 24)"},"id":{"type":"integer","format":"int32"},"metadata":{},"priority":{"type":"string"},"resolution_sla_hours":{"type":["integer","null"],"format":"int32","description":"Target hours for resolution (default: 72)"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"SupportTicketMessage":{"type":"object","required":["id","ticket_id","sender_id","message","is_staff_response","is_internal","is_system","created_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int32"},"is_internal":{"type":"boolean","description":"If true, this message is only visible to staff (internal note)"},"is_staff_response":{"type":"boolean"},"is_system":{"type":"boolean","description":"If true, this is a system-generated activity message (status change, assignment, etc.)"},"message":{"type":"string"},"sender_id":{"type":"integer","format":"int32"},"system_event_type":{"type":["string","null"],"description":"The type of system event (e.g. \"status_changed\", \"priority_changed\", \"assigned\", \"unassigned\", \"closed\")"},"system_metadata":{"description":"JSON metadata for the system event (e.g. old/new values, actor info)"},"ticket_id":{"type":"integer","format":"int32"}}},"SupportTicketMessageWithUser":{"allOf":[{"$ref":"#/components/schemas/SupportTicketMessage"},{"type":"object","required":["sender_username","sender_is_anonymized"],"properties":{"sender_avatar":{"type":["string","null"]},"sender_is_anonymized":{"type":"boolean"},"sender_username":{"type":"string"}}}]},"SupportTicketTemplate":{"type":"object","required":["id","category","title","content","created_at","updated_at"],"properties":{"category":{"type":"string"},"content":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["integer","null"],"format":"int32","description":"User who created the template (NULL if user was deleted)"},"id":{"type":"integer","format":"int32"},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"],"format":"int32"},"variables":{}}},"SupportTicketTemplateWithUser":{"allOf":[{"$ref":"#/components/schemas/SupportTicketTemplate"},{"type":"object","required":["created_by_username"],"properties":{"created_by_username":{"type":"string"},"updated_by_username":{"type":["string","null"]}}}]},"SupportTicketWithUser":{"allOf":[{"$ref":"#/components/schemas/SupportTicket"},{"type":"object","required":["created_by_username","created_by_is_anonymized","message_count","unread_count"],"properties":{"assigned_to_is_anonymized":{"type":["boolean","null"]},"assigned_to_username":{"type":["string","null"]},"closed_by_is_anonymized":{"type":["boolean","null"]},"closed_by_username":{"type":["string","null"]},"created_by_avatar":{"type":["string","null"]},"created_by_is_anonymized":{"type":"boolean"},"created_by_username":{"type":"string"},"message_count":{"type":"integer","format":"int64"},"unread_count":{"type":"integer","format":"int64"}}}]},"SuspendMemberById":{"type":"object","required":["user_id"],"properties":{"reason":{"type":["string","null"]},"suspended":{"type":["boolean","null"],"description":"Desired state from a current staff view. `None` preserves the legacy\ntoggle behavior for callers that cannot read diagnostics first."},"user_id":{"type":"integer","format":"int32"}}},"SverokProcessing":{"type":"object","description":"Current-year durable work. No provider payload or personal details are exposed.","required":["state","attempts","next_attempt_at","updated_at","next_action"],"properties":{"attempts":{"type":"integer","format":"int32","minimum":0},"next_action":{"type":"string"},"next_attempt_at":{"type":"string","format":"date-time"},"reason_code":{"type":["string","null"]},"state":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"SverokUnlockRequest":{"type":"object","required":["personnummer","telefonnummer","playpark_stadgar","sverok_agreement"],"properties":{"personnummer":{"type":"string"},"playpark_stadgar":{"type":"boolean"},"sverok_agreement":{"type":"boolean"},"telefonnummer":{"type":"string"}}},"TeamStats":{"type":"object","description":"Team stats","required":["score"],"properties":{"score":{"type":"integer","format":"int32"}}},"TemplateCategory":{"type":"string","description":"Template category - either a specific ticket category or 'all' for universal templates","enum":["ban_appeal","admin_application","bug_report","whistleblow","item_use","other","all"]},"TemplateListResponse":{"type":"object","required":["templates","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketTemplateWithUser"}},"total":{"type":"integer","format":"int64"}}},"TicketCategory":{"type":"string","enum":["ban_appeal","admin_application","bug_report","whistleblow","item_use","other"]},"TicketCreatedResponse":{"type":"object","required":["message","ticket_id"],"properties":{"message":{"type":"string"},"ticket_id":{"type":"integer","format":"int32"}}},"TicketDetailResponse":{"type":"object","required":["ticket","messages","can_respond"],"properties":{"can_respond":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketMessageWithUser"}},"ticket":{"$ref":"#/components/schemas/SupportTicketWithUser"}}},"TicketListResponse":{"type":"object","required":["tickets","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int64"},"offset":{"type":"integer","format":"int64"},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketWithUser"}},"total":{"type":"integer","format":"int64"}}},"TicketPriority":{"type":"string","enum":["low","medium","high","urgent"]},"TicketReadResponse":{"type":"object","required":["ticket_id"],"properties":{"ticket_id":{"type":"integer","format":"int32"}}},"TicketReplyCreatedResponse":{"type":"object","required":["message","message_id"],"properties":{"message":{"type":"string"},"message_id":{"type":"integer","format":"int32"}}},"TicketSlaInfo":{"type":"object","description":"SLA information for a ticket","required":["first_response_status","resolution_status"],"properties":{"first_response_hours_remaining":{"type":["number","null"],"format":"double","description":"Hours until first response SLA breach (negative if breached)"},"first_response_status":{"$ref":"#/components/schemas/SlaStatus","description":"First response SLA status"},"resolution_hours_remaining":{"type":["number","null"],"format":"double","description":"Hours until resolution SLA breach (negative if breached)"},"resolution_status":{"$ref":"#/components/schemas/SlaStatus","description":"Resolution SLA status"}}},"TicketStatus":{"type":"string","enum":["open","in_progress","resolved","closed"]},"ToggleAutoRenewRequest":{"type":"object","required":["auto_renew"],"properties":{"auto_renew":{"type":"boolean"}}},"TransactionListResponse":{"type":"object","required":["transactions","total","limit","offset"],"properties":{"limit":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionTransaction"}}}},"TransactionStatus":{"type":"string","enum":["completed","failed","pending"]},"TransactionType":{"type":"string","enum":["purchase","renewal","refund","cancellation","admin_grant","admin_revoke","admin_update"]},"TransferOwnershipRequest":{"type":"object","required":["new_owner_username"],"properties":{"new_owner_username":{"type":"string"}}},"UnbanRequest":{"type":"object","required":["admin_id","reason"],"properties":{"admin_id":{"type":"integer","format":"int32","description":"Admin user ID performing the unban"},"reason":{"type":"string","description":"Reason for unbanning"}}},"UnmuteRequest":{"type":"object","required":["admin_id","reason"],"properties":{"admin_id":{"type":"integer","format":"int32","description":"Admin user ID performing the unmute"},"reason":{"type":"string","description":"Reason for removing the comm ban"}}},"UpdateAdminRoleRequest":{"type":"object","required":["role"],"properties":{"permissions":{},"role":{"type":"string"}}},"UpdateBracketDataRequest":{"type":"object","properties":{"bracket_data":{}}},"UpdateCaseItemDropRateRequest":{"type":"object","required":["case_id","item_id","drop_rate"],"properties":{"case_id":{"type":"integer","format":"int32","minimum":1},"drop_rate":{"type":"number","format":"float","maximum":100,"minimum":0},"item_id":{"type":"integer","format":"int32","minimum":1}}},"UpdateCoreAd":{"type":"object","properties":{"content":{"type":["string","null"]},"display":{"type":["string","null"]},"group_id":{"type":["integer","null"],"format":"int32"},"server_id":{"type":["integer","null"],"format":"int32"}}},"UpdateItemRequest":{"type":"object","required":["item_name","item_type","item_subtitle","item_rarity"],"properties":{"amount":{"type":["integer","null"],"format":"int32","minimum":1},"display_stock":{"type":["boolean","null"],"description":"Show the current stock count to shoppers. Stock is enforced server-side\nregardless; this flag only controls visibility."},"image_url":{"type":["string","null"],"maxLength":250},"is_shop_item":{"type":["boolean","null"]},"item_name":{"type":"string","maxLength":255,"minLength":1},"item_rarity":{"type":"string","maxLength":250,"minLength":1},"item_subtitle":{"type":"string","maxLength":255,"minLength":1},"item_type":{"type":"string"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CaseItemUpdate"}},"price":{"type":["integer","null"],"format":"int32","minimum":0},"purchase_limit_per_user":{"type":["integer","null"],"format":"int32","description":"Max times a single user may ever buy this item. `None` = unlimited."},"purchase_limit_scope":{"type":["string","null"],"description":"Whether `purchase_limit_per_user` counts across all storefronts\n(`global`) or per storefront. Only meaningful when the limit is set."},"status":{"type":["string","null"],"maxLength":32},"stock":{"type":["integer","null"],"format":"int32","minimum":0},"storefronts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ShopItemStorefrontAssignment"},"description":"Per-storefront pricing. When provided, this is the source of truth\nand replaces the item's `shop_item_storefronts` rows wholesale.\nOmitted = don't touch storefront assignments."}}},"UpdateMatchIdRequest":{"type":"object","properties":{"match_id":{"type":["string","null"]}}},"UpdateMatchResultsRequest":{"type":"object","required":["result"],"properties":{"result":{},"statistics":{}}},"UpdateMatchSessionRequest":{"type":"object","properties":{"auto_balance":{"type":["boolean","null"]},"description":{"type":["string","null"]},"lobby_visibility":{"type":["string","null"]},"max_players":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"teams_locked":{"type":["boolean","null"]}}},"UpdateMatchStatusRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}},"UpdateNewsPostRequest":{"type":"object","properties":{"background_image_id":{"type":["integer","null"],"format":"int32","minimum":1},"category":{"type":["string","null"],"maxLength":100},"content":{"type":["string","null"],"minLength":1},"content_lexical":{},"header_image_id":{"type":["integer","null"],"format":"int32","minimum":1},"icon_id":{"type":["integer","null"],"format":"int32","minimum":1},"meta_description":{"type":["string","null"],"maxLength":500},"platforms":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PlatformAssignment"},"description":"When `Some`, the post's platform assignments are bulk-replaced with this\nlist (must be non-empty). When `None`, platform assignments are left\nuntouched.","minItems":1},"scheduled_publish_at":{"type":["string","null"],"format":"date-time","description":"Optional scheduled publish time. If set, the post will be scheduled for publishing."},"short_description":{"type":["string","null"],"maxLength":300},"slug":{"type":["string","null"],"maxLength":255},"tags":{},"thumbnail_id":{"type":["integer","null"],"format":"int32","minimum":1},"title":{"type":["string","null"],"maxLength":255,"minLength":1}}},"UpdatePersonalInfo":{"type":"object","description":"Request body for PUT /auth/user_info","required":["fornamn","efternamn","adress","postnummer","ort"],"properties":{"adress":{"type":"string"},"efternamn":{"type":"string"},"fornamn":{"type":"string"},"ort":{"type":"string"},"postnummer":{"type":"string"},"retry_renewal":{"type":"boolean","description":"If true and user hasn't renewed this year, automatically queue a renewal job"}}},"UpdatePolarProductRequest":{"type":"object","properties":{"polar_product_id":{"type":["string","null"],"description":"Polar product ID for hosted checkout. Use null or an empty string to clear it."}}},"UpdatePolarProductResponse":{"type":"object","required":["price"],"properties":{"price":{"$ref":"#/components/schemas/SubscriptionPrice"}}},"UpdateRegistrationStatusRequest":{"type":"object","required":["status"],"properties":{"seed_number":{"type":["integer","null"],"format":"int32"},"status":{"type":"string"}}},"UpdateSkinSettingsRequest":{"type":"object","description":"Request body for updating skin settings.","required":["per_team_skins"],"properties":{"per_team_skins":{"type":"boolean"}}},"UpdateSubscriptionRequest":{"type":"object","properties":{"auto_renew":{"type":["boolean","null"]},"notes":{"type":["string","null"]}}},"UpdateSupportSettingsRequest":{"type":"object","description":"Request to update support settings","properties":{"typing_indicators_enabled":{"type":["boolean","null"]}}},"UpdateSupportTicketRequest":{"type":"object","properties":{"assigned_to":{"type":["integer","null"],"format":"int32","minimum":1},"priority":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketPriority"}]},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TicketStatus"}]}}},"UpdateTeamAssignmentRequest":{"type":"object","required":["team_side"],"properties":{"team_side":{"type":"string"}}},"UpdateTeamRequest":{"type":"object","properties":{"avatar_url":{"type":["string","null"]},"description":{"type":["string","null"]},"max_members":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"tag":{"type":["string","null"]}}},"UpdateTemplateRequest":{"type":"object","properties":{"category":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TemplateCategory"}]},"content":{"type":["string","null"],"minLength":1},"title":{"type":["string","null"],"maxLength":100,"minLength":1}}},"UpdateTournamentRequest":{"type":"object","properties":{"auto_accept_registrations":{"type":["boolean","null"]},"auto_advance":{"type":["boolean","null"]},"auto_generate_brackets":{"type":["boolean","null"]},"banner_url":{"type":["string","null"]},"check_in_end_at":{"type":["string","null"]},"check_in_start_at":{"type":["string","null"]},"cover_color":{"type":["string","null"]},"cover_text_color":{"type":["string","null"]},"cover_text_shadow_color":{"type":["string","null"]},"cover_url":{"type":["string","null"]},"description":{"type":["string","null"]},"format":{"type":["string","null"]},"logo_url":{"type":["string","null"]},"map_pool_id":{"type":["integer","null"],"format":"int32"},"max_teams":{"type":["integer","null"],"format":"int32"},"name":{"type":["string","null"]},"prize_pool":{"type":["number","null"],"format":"float"},"ready_check_timeout":{"type":["integer","null"],"format":"int32"},"registration_deadline":{"type":["string","null"]},"scheduled_start":{"type":["string","null"]},"settings":{},"slug":{"type":["string","null"]},"stage_map_pools":{},"thumbnail_url":{"type":["string","null"]}}},"UpdateTournamentStatusRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}},"User":{"type":"object","required":["user"],"properties":{"user":{"type":"string"}}},"UserBalanceInfo":{"type":"object","required":["user_id","username","currency_code","balance","has_premium","premium_auto_renew"],"properties":{"avatar":{"type":["string","null"],"description":"User's avatar URL"},"balance":{"type":"integer","format":"int32","description":"Current coin balance"},"currency_code":{"type":"string","description":"Currency code for this balance row"},"has_premium":{"type":"boolean","description":"Whether user has active premium subscription"},"premium_auto_renew":{"type":"boolean","description":"Premium subscription auto renewal setting"},"premium_expires_at":{"type":["string","null"],"format":"date-time","description":"Premium subscription expiry date"},"updated_at":{"type":["string","null"],"description":"Last balance update timestamp"},"user_id":{"type":"integer","format":"int32","description":"User's unique identifier"},"username":{"type":"string","description":"User's username"}}},"UserContextResponse":{"type":"object","description":"Aggregated user context response for the support quick view","required":["user_id","username","is_anonymized","groups","has_premium","active_punishments","punishments","playtime"],"properties":{"active_punishments":{"$ref":"#/components/schemas/ActivePunishmentCounts"},"avatar":{"type":["string","null"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/UserGroupInfo"}},"has_premium":{"type":"boolean"},"is_anonymized":{"type":"boolean"},"playtime":{"type":"array","items":{"$ref":"#/components/schemas/CorePlaytime"}},"punishments":{"$ref":"#/components/schemas/PunishmentsData"},"steam_id":{"type":["string","null"]},"steam_username":{"type":["string","null"]},"user_id":{"type":"integer","format":"int32"},"username":{"type":"string"},"username_history":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PlayerUsernameHistory"}]}}},"UserExist":{"type":"object","required":["success","exist"],"properties":{"exist":{"type":"boolean"},"success":{"type":"boolean"}}},"UserGroupInfo":{"type":"object","description":"Permission group info included in the user context response","required":["id","name","color","priority"],"properties":{"color":{"type":"string"},"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"priority":{"type":"integer","format":"int32"}}},"UserInfoResponse":{"type":"object","description":"Response shape for GET /auth/user_info","required":["membership_type","editable"],"properties":{"adress":{"type":["string","null"]},"editable":{"type":"boolean","description":"True for incomplete full-member details or a provider rejection that\nrequires correction. Accepted registrations remain locked."},"efternamn":{"type":["string","null"]},"fornamn":{"type":["string","null"]},"membership_type":{"type":"string"},"ort":{"type":["string","null"]},"postnummer":{"type":["string","null"]},"telefonnummer":{"type":["string","null"]}}},"UserSubscriptionWithUser":{"type":"object","required":["id","user_id","subscription_type","status","auto_renew","created_at","updated_at","username","has_premium","premium_auto_renew"],"properties":{"admin_notes":{"type":["string","null"]},"auto_renew":{"type":"boolean"},"avatar":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"has_premium":{"type":"boolean"},"id":{"type":"integer","format":"int32"},"premium_auto_renew":{"type":"boolean"},"premium_expires_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"integer","format":"int32"},"username":{"type":"string"}}},"UserWithUnusedItem":{"type":"object","required":["user_id","username","unused_count"],"properties":{"avatar":{"type":["string","null"]},"unused_count":{"type":"integer","format":"int64"},"user_id":{"type":"integer","format":"int32"},"username":{"type":"string"}}},"UsersWithUnusedItemResponse":{"type":"object","required":["users","page","page_size","total_pages","total_users"],"properties":{"page":{"type":"integer","format":"int64"},"page_size":{"type":"integer","format":"int64"},"total_pages":{"type":"integer","format":"int64"},"total_users":{"type":"integer","format":"int64"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserWithUnusedItem"}}}},"VerifyCodeRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}},"VetoActionRequest":{"type":"object","required":["action","map_name"],"properties":{"action":{"type":"string"},"map_name":{"type":"string"}}},"Warn":{"type":"object","description":"Player warning","required":["id","player_steamid","admin_steamid","admin_name","reason","duration","created","status"],"properties":{"admin_name":{"type":"string"},"admin_steamid":{"type":"string"},"created":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32"},"ends":{"type":["string","null"],"format":"date-time"},"id":{"type":"integer","format":"int32"},"player_name":{"type":["string","null"]},"player_steamid":{"type":"string"},"reason":{"type":"string"},"server_id":{"type":["integer","null"],"format":"int32"},"status":{"type":"string"}}},"WebhookConfiguration":{"type":"object","description":"Webhook configuration","properties":{"authorization_header":{"type":["string","null"]},"enabled_events":{"type":["array","null"],"items":{"type":"string"}},"event_url":{"type":["string","null"]},"match_end_url":{"type":["string","null"]}}},"WebhookPlayer":{"type":"object","description":"Player information in webhook","required":["match_id","steam_id_64","team","connected","kicked","stats"],"properties":{"connected":{"type":"boolean"},"disconnected_at":{"type":["string","null"]},"kicked":{"type":"boolean"},"match_id":{"type":"string"},"nickname_override":{"type":["string","null"]},"stats":{"$ref":"#/components/schemas/PlayerStats"},"steam_id_64":{"type":"string"},"team":{"type":"string"}}},"WebhookSettings":{"type":"object","description":"Match settings from webhook","required":["map","connect_time","match_begin_countdown","wait_for_gotv","enable_plugin","enable_tech_pause"],"properties":{"connect_time":{"type":"integer","format":"int32"},"enable_plugin":{"type":"boolean"},"enable_tech_pause":{"type":"boolean"},"map":{"type":"string"},"match_begin_countdown":{"type":"integer","format":"int32"},"password":{"type":["string","null"]},"team_size":{"type":["integer","null"],"format":"int32"},"wait_for_gotv":{"type":"boolean"}}},"WebhookTeam":{"type":"object","description":"Team information in webhook","required":["name","stats"],"properties":{"flag":{"type":["string","null"]},"name":{"type":"string"},"stats":{"$ref":"#/components/schemas/TeamStats"}}}},"securitySchemes":{"authorization":{"type":"http","scheme":"bearer","bearerFormat":"Authorization"},"session":{"type":"apiKey","in":"cookie","name":"session_id"}}},"x-tagGroups":[{"name":"General","tags":["Authentication","Search","Steam ID","News","Streams"]},{"name":"Competitive","tags":["Matches","Tournaments","Teams"]},{"name":"CS2","tags":["Records","CS2 Public","Ladders","Punishments"]},{"name":"Economy","tags":["Coins","Store","Skins","Subscriptions"]},{"name":"Support","tags":["Support"]},{"name":"Admin","tags":["Admin Support","Admin Coins","Admin Emails"]},{"name":"Integrations","tags":["Webhooks","Esplay"]},{"name":"Internal","tags":["Health","Platform","Server","CS2 Internal"]}]}