// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2

package handler

import (
	"github.com/gin-gonic/gin"
	adminAds "github.com/perfect-panel/server/internal/handler/admin/ads"
	adminAnnouncement "github.com/perfect-panel/server/internal/handler/admin/announcement"
	adminApplication "github.com/perfect-panel/server/internal/handler/admin/application"
	adminAuthMethod "github.com/perfect-panel/server/internal/handler/admin/authMethod"
	adminConsole "github.com/perfect-panel/server/internal/handler/admin/console"
	adminCoupon "github.com/perfect-panel/server/internal/handler/admin/coupon"
	adminDocument "github.com/perfect-panel/server/internal/handler/admin/document"
	adminGroup "github.com/perfect-panel/server/internal/handler/admin/group"
	adminLog "github.com/perfect-panel/server/internal/handler/admin/log"
	adminMarketing "github.com/perfect-panel/server/internal/handler/admin/marketing"
	adminOrder "github.com/perfect-panel/server/internal/handler/admin/order"
	adminPayment "github.com/perfect-panel/server/internal/handler/admin/payment"
	adminRedemption "github.com/perfect-panel/server/internal/handler/admin/redemption"
	adminServer "github.com/perfect-panel/server/internal/handler/admin/server"
	adminSubscribe "github.com/perfect-panel/server/internal/handler/admin/subscribe"
	adminSystem "github.com/perfect-panel/server/internal/handler/admin/system"
	adminTicket "github.com/perfect-panel/server/internal/handler/admin/ticket"
	adminTool "github.com/perfect-panel/server/internal/handler/admin/tool"
	adminUser "github.com/perfect-panel/server/internal/handler/admin/user"
	auth "github.com/perfect-panel/server/internal/handler/auth"
	authAdmin "github.com/perfect-panel/server/internal/handler/auth/admin"
	authOauth "github.com/perfect-panel/server/internal/handler/auth/oauth"
	common "github.com/perfect-panel/server/internal/handler/common"
	publicAnnouncement "github.com/perfect-panel/server/internal/handler/public/announcement"
	publicDocument "github.com/perfect-panel/server/internal/handler/public/document"
	publicFile "github.com/perfect-panel/server/internal/handler/public/file"
	publicIapApple "github.com/perfect-panel/server/internal/handler/public/iap/apple"
	publicOrder "github.com/perfect-panel/server/internal/handler/public/order"
	publicPayment "github.com/perfect-panel/server/internal/handler/public/payment"
	publicPortal "github.com/perfect-panel/server/internal/handler/public/portal"
	publicRecovery "github.com/perfect-panel/server/internal/handler/public/recovery"
	publicRedemption "github.com/perfect-panel/server/internal/handler/public/redemption"
	publicSubscribe "github.com/perfect-panel/server/internal/handler/public/subscribe"
	publicTicket "github.com/perfect-panel/server/internal/handler/public/ticket"
	publicUser "github.com/perfect-panel/server/internal/handler/public/user"
	publicUserWs "github.com/perfect-panel/server/internal/handler/public/user/ws"
	server "github.com/perfect-panel/server/internal/handler/server"
	"github.com/perfect-panel/server/internal/middleware"
	"github.com/perfect-panel/server/internal/svc"
)

func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) {
	adminAdsGroupRouter := router.Group("/v1/admin/ads")
	adminAdsGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create Ads
		adminAdsGroupRouter.POST("/", adminAds.CreateAdsHandler(serverCtx))

		// Update Ads
		adminAdsGroupRouter.PUT("/", adminAds.UpdateAdsHandler(serverCtx))

		// Delete Ads
		adminAdsGroupRouter.DELETE("/", adminAds.DeleteAdsHandler(serverCtx))

		// Get Ads Detail
		adminAdsGroupRouter.GET("/detail", adminAds.GetAdsDetailHandler(serverCtx))

		// Get Ads List
		adminAdsGroupRouter.GET("/list", adminAds.GetAdsListHandler(serverCtx))
	}

	adminAnnouncementGroupRouter := router.Group("/v1/admin/announcement")
	adminAnnouncementGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create announcement
		adminAnnouncementGroupRouter.POST("/", adminAnnouncement.CreateAnnouncementHandler(serverCtx))

		// Update announcement
		adminAnnouncementGroupRouter.PUT("/", adminAnnouncement.UpdateAnnouncementHandler(serverCtx))

		// Delete announcement
		adminAnnouncementGroupRouter.DELETE("/", adminAnnouncement.DeleteAnnouncementHandler(serverCtx))

		// Get announcement
		adminAnnouncementGroupRouter.GET("/detail", adminAnnouncement.GetAnnouncementHandler(serverCtx))

		// Get announcement list
		adminAnnouncementGroupRouter.GET("/list", adminAnnouncement.GetAnnouncementListHandler(serverCtx))
	}

	adminApplicationGroupRouter := router.Group("/v1/admin/application")
	adminApplicationGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create subscribe application
		adminApplicationGroupRouter.POST("/", adminApplication.CreateSubscribeApplicationHandler(serverCtx))

		// Preview Template
		adminApplicationGroupRouter.GET("/preview", adminApplication.PreviewSubscribeTemplateHandler(serverCtx))

		// Update subscribe application
		adminApplicationGroupRouter.PUT("/subscribe_application", adminApplication.UpdateSubscribeApplicationHandler(serverCtx))

		// Delete subscribe application
		adminApplicationGroupRouter.DELETE("/subscribe_application", adminApplication.DeleteSubscribeApplicationHandler(serverCtx))

		// Get subscribe application list
		adminApplicationGroupRouter.GET("/subscribe_application_list", adminApplication.GetSubscribeApplicationListHandler(serverCtx))
	}

	adminAuthMethodGroupRouter := router.Group("/v1/admin/auth-method")
	adminAuthMethodGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Get auth method config
		adminAuthMethodGroupRouter.GET("/config", adminAuthMethod.GetAuthMethodConfigHandler(serverCtx))

		// Update auth method config
		adminAuthMethodGroupRouter.PUT("/config", adminAuthMethod.UpdateAuthMethodConfigHandler(serverCtx))

		// Get email support platform
		adminAuthMethodGroupRouter.GET("/email_platform", adminAuthMethod.GetEmailPlatformHandler(serverCtx))

		// Get auth method list
		adminAuthMethodGroupRouter.GET("/list", adminAuthMethod.GetAuthMethodListHandler(serverCtx))

		// Get sms support platform
		adminAuthMethodGroupRouter.GET("/sms_platform", adminAuthMethod.GetSmsPlatformHandler(serverCtx))

		// Test email send
		adminAuthMethodGroupRouter.POST("/test_email_send", adminAuthMethod.TestEmailSendHandler(serverCtx))

		// Test sms send
		adminAuthMethodGroupRouter.POST("/test_sms_send", adminAuthMethod.TestSmsSendHandler(serverCtx))
	}

	adminConsoleGroupRouter := router.Group("/v1/admin/console")
	adminConsoleGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Query revenue statistics
		adminConsoleGroupRouter.GET("/revenue", adminConsole.QueryRevenueStatisticsHandler(serverCtx))

		// Query server total data
		adminConsoleGroupRouter.GET("/server", adminConsole.QueryServerTotalDataHandler(serverCtx))

		// Query ticket wait reply
		adminConsoleGroupRouter.GET("/ticket", adminConsole.QueryTicketWaitReplyHandler(serverCtx))

		// Query user statistics
		adminConsoleGroupRouter.GET("/user", adminConsole.QueryUserStatisticsHandler(serverCtx))
	}

	adminCouponGroupRouter := router.Group("/v1/admin/coupon")
	adminCouponGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create coupon
		adminCouponGroupRouter.POST("/", adminCoupon.CreateCouponHandler(serverCtx))

		// Update coupon
		adminCouponGroupRouter.PUT("/", adminCoupon.UpdateCouponHandler(serverCtx))

		// Delete coupon
		adminCouponGroupRouter.DELETE("/", adminCoupon.DeleteCouponHandler(serverCtx))

		// Batch delete coupon
		adminCouponGroupRouter.DELETE("/batch", adminCoupon.BatchDeleteCouponHandler(serverCtx))

		// Get coupon list
		adminCouponGroupRouter.GET("/list", adminCoupon.GetCouponListHandler(serverCtx))
	}

	adminDocumentGroupRouter := router.Group("/v1/admin/document")
	adminDocumentGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create document
		adminDocumentGroupRouter.POST("/", adminDocument.CreateDocumentHandler(serverCtx))

		// Update document
		adminDocumentGroupRouter.PUT("/", adminDocument.UpdateDocumentHandler(serverCtx))

		// Delete document
		adminDocumentGroupRouter.DELETE("/", adminDocument.DeleteDocumentHandler(serverCtx))

		// Batch delete document
		adminDocumentGroupRouter.DELETE("/batch", adminDocument.BatchDeleteDocumentHandler(serverCtx))

		// Get document detail
		adminDocumentGroupRouter.GET("/detail", adminDocument.GetDocumentDetailHandler(serverCtx))

		// Get document list
		adminDocumentGroupRouter.GET("/list", adminDocument.GetDocumentListHandler(serverCtx))
	}

	adminGroupGroupRouter := router.Group("/v1/admin/group")
	adminGroupGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Get group config
		adminGroupGroupRouter.GET("/config", adminGroup.GetGroupConfigHandler(serverCtx))

		// Update group config
		adminGroupGroupRouter.PUT("/config", adminGroup.UpdateGroupConfigHandler(serverCtx))

		// Export group result
		adminGroupGroupRouter.GET("/export", adminGroup.ExportGroupResultHandler(serverCtx))

		// Get group history
		adminGroupGroupRouter.GET("/history", adminGroup.GetGroupHistoryHandler(serverCtx))

		// Get group history detail
		adminGroupGroupRouter.GET("/history/detail", adminGroup.GetGroupHistoryDetailHandler(serverCtx))

		// Create node group
		adminGroupGroupRouter.POST("/node", adminGroup.CreateNodeGroupHandler(serverCtx))

		// Update node group
		adminGroupGroupRouter.PUT("/node", adminGroup.UpdateNodeGroupHandler(serverCtx))

		// Delete node group
		adminGroupGroupRouter.DELETE("/node", adminGroup.DeleteNodeGroupHandler(serverCtx))

		// Get node group list
		adminGroupGroupRouter.GET("/node/list", adminGroup.GetNodeGroupListHandler(serverCtx))

		// Preview user nodes
		adminGroupGroupRouter.GET("/preview", adminGroup.PreviewUserNodesHandler(serverCtx))

		// Recalculate group
		adminGroupGroupRouter.POST("/recalculate", adminGroup.RecalculateGroupHandler(serverCtx))

		// Get recalculation status
		adminGroupGroupRouter.GET("/recalculation/status", adminGroup.GetRecalculationStatusHandler(serverCtx))

		// Reset all groups
		adminGroupGroupRouter.POST("/reset", adminGroup.ResetGroupsHandler(serverCtx))

		// Get subscribe group mapping
		adminGroupGroupRouter.GET("/subscribe/mapping", adminGroup.GetSubscribeGroupMappingHandler(serverCtx))
	}

	adminLogGroupRouter := router.Group("/v1/admin/log")
	adminLogGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Filter balance log
		adminLogGroupRouter.GET("/balance/list", adminLog.FilterBalanceLogHandler(serverCtx))

		// Filter commission log
		adminLogGroupRouter.GET("/commission/list", adminLog.FilterCommissionLogHandler(serverCtx))

		// Filter order refund log
		adminLogGroupRouter.GET("/order/refund/list", adminLog.FilterOrderRefundLogHandler(serverCtx))

		// Filter email log
		adminLogGroupRouter.GET("/email/list", adminLog.FilterEmailLogHandler(serverCtx))

		// Get error log message detail
		adminLogGroupRouter.GET("/error_message/detail", adminLog.GetErrorLogMessageDetailHandler(serverCtx))

		// Get log message raw detail (temporary)
		adminLogGroupRouter.GET("/message/detail", adminLog.GetLogMessageRawHandler(serverCtx))

		// Get error log message list
		adminLogGroupRouter.GET("/error_message/list", adminLog.GetErrorLogMessageListHandler(serverCtx))

		// Filter gift log
		adminLogGroupRouter.GET("/gift/list", adminLog.FilterGiftLogHandler(serverCtx))

		// Filter login log
		adminLogGroupRouter.GET("/login/list", adminLog.FilterLoginLogHandler(serverCtx))

		// Get message log list
		adminLogGroupRouter.GET("/message/list", adminLog.GetMessageLogListHandler(serverCtx))

		// Filter mobile log
		adminLogGroupRouter.GET("/mobile/list", adminLog.FilterMobileLogHandler(serverCtx))

		// Filter register log
		adminLogGroupRouter.GET("/register/list", adminLog.FilterRegisterLogHandler(serverCtx))

		// Filter server traffic log
		adminLogGroupRouter.GET("/server/traffic/list", adminLog.FilterServerTrafficLogHandler(serverCtx))

		// Get log setting
		adminLogGroupRouter.GET("/setting", adminLog.GetLogSettingHandler(serverCtx))

		// Update log setting
		adminLogGroupRouter.POST("/setting", adminLog.UpdateLogSettingHandler(serverCtx))

		// Filter subscribe log
		adminLogGroupRouter.GET("/subscribe/list", adminLog.FilterSubscribeLogHandler(serverCtx))

		// Filter reset subscribe log
		adminLogGroupRouter.GET("/subscribe/reset/list", adminLog.FilterResetSubscribeLogHandler(serverCtx))

		// Filter user subscribe traffic log
		adminLogGroupRouter.GET("/subscribe/traffic/list", adminLog.FilterUserSubscribeTrafficLogHandler(serverCtx))

		// Filter traffic log details
		adminLogGroupRouter.GET("/traffic/details", adminLog.FilterTrafficLogDetailsHandler(serverCtx))
	}

	adminMarketingGroupRouter := router.Group("/v1/admin/marketing")
	adminMarketingGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Get batch send email task list
		adminMarketingGroupRouter.GET("/email/batch/list", adminMarketing.GetBatchSendEmailTaskListHandler(serverCtx))

		// Get pre-send email count
		adminMarketingGroupRouter.POST("/email/batch/pre-send-count", adminMarketing.GetPreSendEmailCountHandler(serverCtx))

		// Create a batch send email task
		adminMarketingGroupRouter.POST("/email/batch/send", adminMarketing.CreateBatchSendEmailTaskHandler(serverCtx))

		// Get batch send email task status
		adminMarketingGroupRouter.POST("/email/batch/status", adminMarketing.GetBatchSendEmailTaskStatusHandler(serverCtx))

		// Stop a batch send email task
		adminMarketingGroupRouter.POST("/email/batch/stop", adminMarketing.StopBatchSendEmailTaskHandler(serverCtx))

		// Create a quota task
		adminMarketingGroupRouter.POST("/quota/create", adminMarketing.CreateQuotaTaskHandler(serverCtx))

		// Query quota task list
		adminMarketingGroupRouter.GET("/quota/list", adminMarketing.QueryQuotaTaskListHandler(serverCtx))

		// Query quota task pre-count
		adminMarketingGroupRouter.POST("/quota/pre-count", adminMarketing.QueryQuotaTaskPreCountHandler(serverCtx))

		// Query quota task status
		adminMarketingGroupRouter.POST("/quota/status", adminMarketing.QueryQuotaTaskStatusHandler(serverCtx))
	}

	adminOrderGroupRouter := router.Group("/v1/admin/order")
	adminOrderGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create order
		adminOrderGroupRouter.POST("/", adminOrder.CreateOrderHandler(serverCtx))

		// Get order list
		adminOrderGroupRouter.GET("/list", adminOrder.GetOrderListHandler(serverCtx))

		// Update order status
		adminOrderGroupRouter.PUT("/status", adminOrder.UpdateOrderStatusHandler(serverCtx))

		// Refund order
		adminOrderGroupRouter.POST("/refund", adminOrder.RefundOrderHandler(serverCtx))

		// Manually activate order
		adminOrderGroupRouter.POST("/activate", adminOrder.ActivateOrderHandler(serverCtx))
	}

	adminPaymentGroupRouter := router.Group("/v1/admin/payment")
	adminPaymentGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create Payment Method
		adminPaymentGroupRouter.POST("/", adminPayment.CreatePaymentMethodHandler(serverCtx))

		// Update Payment Method
		adminPaymentGroupRouter.PUT("/", adminPayment.UpdatePaymentMethodHandler(serverCtx))

		// Delete Payment Method
		adminPaymentGroupRouter.DELETE("/", adminPayment.DeletePaymentMethodHandler(serverCtx))

		// Get Payment Method List
		adminPaymentGroupRouter.GET("/list", adminPayment.GetPaymentMethodListHandler(serverCtx))

		// Get supported payment platform
		adminPaymentGroupRouter.GET("/platform", adminPayment.GetPaymentPlatformHandler(serverCtx))
	}

	adminRedemptionGroupRouter := router.Group("/v1/admin/redemption")
	adminRedemptionGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create redemption code
		adminRedemptionGroupRouter.POST("/code", adminRedemption.CreateRedemptionCodeHandler(serverCtx))

		// Update redemption code
		adminRedemptionGroupRouter.PUT("/code", adminRedemption.UpdateRedemptionCodeHandler(serverCtx))

		// Delete redemption code
		adminRedemptionGroupRouter.DELETE("/code", adminRedemption.DeleteRedemptionCodeHandler(serverCtx))

		// Batch delete redemption code
		adminRedemptionGroupRouter.DELETE("/code/batch", adminRedemption.BatchDeleteRedemptionCodeHandler(serverCtx))

		// Get redemption code list
		adminRedemptionGroupRouter.GET("/code/list", adminRedemption.GetRedemptionCodeListHandler(serverCtx))

		// Toggle redemption code status
		adminRedemptionGroupRouter.PUT("/code/status", adminRedemption.ToggleRedemptionCodeStatusHandler(serverCtx))

		// Get redemption record list
		adminRedemptionGroupRouter.GET("/record/list", adminRedemption.GetRedemptionRecordListHandler(serverCtx))
	}

	adminServerGroupRouter := router.Group("/v1/admin/server")
	adminServerGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create Server
		adminServerGroupRouter.POST("/create", adminServer.CreateServerHandler(serverCtx))

		// Delete Server
		adminServerGroupRouter.POST("/delete", adminServer.DeleteServerHandler(serverCtx))

		// Filter Server List
		adminServerGroupRouter.GET("/list", adminServer.FilterServerListHandler(serverCtx))

		// Create Node
		adminServerGroupRouter.POST("/node/create", adminServer.CreateNodeHandler(serverCtx))

		// Delete Node
		adminServerGroupRouter.POST("/node/delete", adminServer.DeleteNodeHandler(serverCtx))

		// Filter Node List
		adminServerGroupRouter.GET("/node/list", adminServer.FilterNodeListHandler(serverCtx))

		// Reset node sort
		adminServerGroupRouter.POST("/node/sort", adminServer.ResetSortWithNodeHandler(serverCtx))

		// Toggle Node Status
		adminServerGroupRouter.POST("/node/status/toggle", adminServer.ToggleNodeStatusHandler(serverCtx))

		// Query all node tags
		adminServerGroupRouter.GET("/node/tags", adminServer.QueryNodeTagHandler(serverCtx))

		// Update Node
		adminServerGroupRouter.POST("/node/update", adminServer.UpdateNodeHandler(serverCtx))

		// Get Server Protocols
		adminServerGroupRouter.GET("/protocols", adminServer.GetServerProtocolsHandler(serverCtx))

		// Reset server sort
		adminServerGroupRouter.POST("/server/sort", adminServer.ResetSortWithServerHandler(serverCtx))

		// Update Server
		adminServerGroupRouter.POST("/update", adminServer.UpdateServerHandler(serverCtx))
	}

	adminSubscribeGroupRouter := router.Group("/v1/admin/subscribe")
	adminSubscribeGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Create subscribe
		adminSubscribeGroupRouter.POST("/", adminSubscribe.CreateSubscribeHandler(serverCtx))

		// Update subscribe
		adminSubscribeGroupRouter.PUT("/", adminSubscribe.UpdateSubscribeHandler(serverCtx))

		// Delete subscribe
		adminSubscribeGroupRouter.DELETE("/", adminSubscribe.DeleteSubscribeHandler(serverCtx))

		// Batch delete subscribe
		adminSubscribeGroupRouter.DELETE("/batch", adminSubscribe.BatchDeleteSubscribeHandler(serverCtx))

		// Get subscribe details
		adminSubscribeGroupRouter.GET("/details", adminSubscribe.GetSubscribeDetailsHandler(serverCtx))

		// Create subscribe group
		adminSubscribeGroupRouter.POST("/group", adminSubscribe.CreateSubscribeGroupHandler(serverCtx))

		// Update subscribe group
		adminSubscribeGroupRouter.PUT("/group", adminSubscribe.UpdateSubscribeGroupHandler(serverCtx))

		// Delete subscribe group
		adminSubscribeGroupRouter.DELETE("/group", adminSubscribe.DeleteSubscribeGroupHandler(serverCtx))

		// Batch delete subscribe group
		adminSubscribeGroupRouter.DELETE("/group/batch", adminSubscribe.BatchDeleteSubscribeGroupHandler(serverCtx))

		// Get subscribe group list
		adminSubscribeGroupRouter.GET("/group/list", adminSubscribe.GetSubscribeGroupListHandler(serverCtx))

		// Get subscribe list
		adminSubscribeGroupRouter.GET("/list", adminSubscribe.GetSubscribeListHandler(serverCtx))

		// Reset all subscribe tokens
		adminSubscribeGroupRouter.POST("/reset_all_token", adminSubscribe.ResetAllSubscribeTokenHandler(serverCtx))

		// Subscribe sort
		adminSubscribeGroupRouter.POST("/sort", adminSubscribe.SubscribeSortHandler(serverCtx))
	}

	adminSystemGroupRouter := router.Group("/v1/admin/system")
	adminSystemGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Get Currency Config
		adminSystemGroupRouter.GET("/currency_config", adminSystem.GetCurrencyConfigHandler(serverCtx))

		// Update Currency Config
		adminSystemGroupRouter.PUT("/currency_config", adminSystem.UpdateCurrencyConfigHandler(serverCtx))

		// Get Node Multiplier
		adminSystemGroupRouter.GET("/get_node_multiplier", adminSystem.GetNodeMultiplierHandler(serverCtx))

		// Get invite config
		adminSystemGroupRouter.GET("/invite_config", adminSystem.GetInviteConfigHandler(serverCtx))

		// Update invite config
		adminSystemGroupRouter.PUT("/invite_config", adminSystem.UpdateInviteConfigHandler(serverCtx))

		// Get Module Config
		adminSystemGroupRouter.GET("/module", adminSystem.GetModuleConfigHandler(serverCtx))

		// Get node config
		adminSystemGroupRouter.GET("/node_config", adminSystem.GetNodeConfigHandler(serverCtx))

		// Update node config
		adminSystemGroupRouter.PUT("/node_config", adminSystem.UpdateNodeConfigHandler(serverCtx))

		// PreView Node Multiplier
		adminSystemGroupRouter.GET("/node_multiplier/preview", adminSystem.PreViewNodeMultiplierHandler(serverCtx))

		// get Privacy Policy Config
		adminSystemGroupRouter.GET("/privacy", adminSystem.GetPrivacyPolicyConfigHandler(serverCtx))

		// Update Privacy Policy Config
		adminSystemGroupRouter.PUT("/privacy", adminSystem.UpdatePrivacyPolicyConfigHandler(serverCtx))

		// Get register config
		adminSystemGroupRouter.GET("/register_config", adminSystem.GetRegisterConfigHandler(serverCtx))

		// Update register config
		adminSystemGroupRouter.PUT("/register_config", adminSystem.UpdateRegisterConfigHandler(serverCtx))

		// Set Node Multiplier
		adminSystemGroupRouter.POST("/set_node_multiplier", adminSystem.SetNodeMultiplierHandler(serverCtx))

		// setting telegram bot
		adminSystemGroupRouter.POST("/setting_telegram_bot", adminSystem.SettingTelegramBotHandler(serverCtx))

		// Get Signature Config
		adminSystemGroupRouter.GET("/signature_config", adminSystem.GetSignatureConfigHandler(serverCtx))

		// Update Signature Config
		adminSystemGroupRouter.PUT("/signature_config", adminSystem.UpdateSignatureConfigHandler(serverCtx))

		// Get site config
		adminSystemGroupRouter.GET("/site_config", adminSystem.GetSiteConfigHandler(serverCtx))

		// Update site config
		adminSystemGroupRouter.PUT("/site_config", adminSystem.UpdateSiteConfigHandler(serverCtx))

		// Get subscribe config
		adminSystemGroupRouter.GET("/subscribe_config", adminSystem.GetSubscribeConfigHandler(serverCtx))

		// Update subscribe config
		adminSystemGroupRouter.PUT("/subscribe_config", adminSystem.UpdateSubscribeConfigHandler(serverCtx))

		// Get Team of Service Config
		adminSystemGroupRouter.GET("/tos_config", adminSystem.GetTosConfigHandler(serverCtx))

		// Update Team of Service Config
		adminSystemGroupRouter.PUT("/tos_config", adminSystem.UpdateTosConfigHandler(serverCtx))

		// Get Verify Code Config
		adminSystemGroupRouter.GET("/verify_code_config", adminSystem.GetVerifyCodeConfigHandler(serverCtx))

		// Update Verify Code Config
		adminSystemGroupRouter.PUT("/verify_code_config", adminSystem.UpdateVerifyCodeConfigHandler(serverCtx))

		// Get verify config
		adminSystemGroupRouter.GET("/verify_config", adminSystem.GetVerifyConfigHandler(serverCtx))

		// Update verify config
		adminSystemGroupRouter.PUT("/verify_config", adminSystem.UpdateVerifyConfigHandler(serverCtx))
	}

	adminTicketGroupRouter := router.Group("/v1/admin/ticket")
	adminTicketGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Update ticket status
		adminTicketGroupRouter.PUT("/", adminTicket.UpdateTicketStatusHandler(serverCtx))

		// Get ticket detail
		adminTicketGroupRouter.GET("/detail", adminTicket.GetTicketHandler(serverCtx))

		// Create ticket follow
		adminTicketGroupRouter.POST("/follow", adminTicket.CreateTicketFollowHandler(serverCtx))

		// Get ticket list
		adminTicketGroupRouter.GET("/list", adminTicket.GetTicketListHandler(serverCtx))
	}

	adminToolGroupRouter := router.Group("/v1/admin/tool")
	adminToolGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Query IP Location
		adminToolGroupRouter.GET("/ip/location", adminTool.QueryIPLocationHandler(serverCtx))

		// Get System Log
		adminToolGroupRouter.GET("/log", adminTool.GetSystemLogHandler(serverCtx))

		// Restart System
		adminToolGroupRouter.GET("/restart", adminTool.RestartSystemHandler(serverCtx))

		// Get Version
		adminToolGroupRouter.GET("/version", adminTool.GetVersionHandler(serverCtx))
	}

	adminUserGroupRouter := router.Group("/v1/admin/user")
	adminUserGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Delete user
		adminUserGroupRouter.DELETE("/", adminUser.DeleteUserHandler(serverCtx))

		// Create user
		adminUserGroupRouter.POST("/", adminUser.CreateUserHandler(serverCtx))

		// Create user auth method
		adminUserGroupRouter.POST("/auth_method", adminUser.CreateUserAuthMethodHandler(serverCtx))

		// Delete user auth method
		adminUserGroupRouter.DELETE("/auth_method", adminUser.DeleteUserAuthMethodHandler(serverCtx))

		// Update user auth method
		adminUserGroupRouter.PUT("/auth_method", adminUser.UpdateUserAuthMethodHandler(serverCtx))

		// Get user auth method
		adminUserGroupRouter.GET("/auth_method", adminUser.GetUserAuthMethodHandler(serverCtx))

		// Update user basic info
		adminUserGroupRouter.PUT("/basic", adminUser.UpdateUserBasicInfoHandler(serverCtx))

		// Batch delete user
		adminUserGroupRouter.DELETE("/batch", adminUser.BatchDeleteUserHandler(serverCtx))

		// Current user
		adminUserGroupRouter.GET("/current", adminUser.CurrentUserHandler(serverCtx))

		// Get user detail
		adminUserGroupRouter.GET("/detail", adminUser.GetUserDetailHandler(serverCtx))

		// User device
		adminUserGroupRouter.PUT("/device", adminUser.UpdateUserDeviceHandler(serverCtx))

		// Delete user device
		adminUserGroupRouter.DELETE("/device", adminUser.DeleteUserDeviceHandler(serverCtx))

		// kick offline user device
		adminUserGroupRouter.PUT("/device/kick_offline", adminUser.KickOfflineByUserDeviceHandler(serverCtx))

		// Get family detail
		adminUserGroupRouter.GET("/family/detail", adminUser.GetFamilyDetailHandler(serverCtx))

		// Dissolve family
		adminUserGroupRouter.PUT("/family/dissolve", adminUser.DissolveFamilyHandler(serverCtx))

		// Get family list
		adminUserGroupRouter.GET("/family/list", adminUser.GetFamilyListHandler(serverCtx))

		// Update family max members
		adminUserGroupRouter.PUT("/family/max_members", adminUser.UpdateFamilyMaxMembersHandler(serverCtx))

		// Remove family member
		adminUserGroupRouter.PUT("/family/member/remove", adminUser.RemoveFamilyMemberHandler(serverCtx))

		// Get user list
		adminUserGroupRouter.GET("/list", adminUser.GetUserListHandler(serverCtx))

		// Get user login logs
		adminUserGroupRouter.GET("/login/logs", adminUser.GetUserLoginLogsHandler(serverCtx))

		// Update user notify setting
		adminUserGroupRouter.PUT("/notify", adminUser.UpdateUserNotifySettingHandler(serverCtx))

		// Get user subcribe
		adminUserGroupRouter.GET("/subscribe", adminUser.GetUserSubscribeHandler(serverCtx))

		// Create user subcribe
		adminUserGroupRouter.POST("/subscribe", adminUser.CreateUserSubscribeHandler(serverCtx))

		// Update user subcribe
		adminUserGroupRouter.PUT("/subscribe", adminUser.UpdateUserSubscribeHandler(serverCtx))

		// Delete user subcribe
		adminUserGroupRouter.DELETE("/subscribe", adminUser.DeleteUserSubscribeHandler(serverCtx))

		// Get user subcribe by id
		adminUserGroupRouter.GET("/subscribe/detail", adminUser.GetUserSubscribeByIdHandler(serverCtx))

		// Get user subcribe devices
		adminUserGroupRouter.GET("/subscribe/device", adminUser.GetUserSubscribeDevicesHandler(serverCtx))

		// Get user subcribe logs
		adminUserGroupRouter.GET("/subscribe/logs", adminUser.GetUserSubscribeLogsHandler(serverCtx))

		// Get user subcribe reset traffic logs
		adminUserGroupRouter.GET("/subscribe/reset/logs", adminUser.GetUserSubscribeResetTrafficLogsHandler(serverCtx))

		// Reset user subscribe token
		adminUserGroupRouter.POST("/subscribe/reset/token", adminUser.ResetUserSubscribeTokenHandler(serverCtx))

		// Reset user subscribe traffic
		adminUserGroupRouter.POST("/subscribe/reset/traffic", adminUser.ResetUserSubscribeTrafficHandler(serverCtx))

		// Stop user subscribe
		adminUserGroupRouter.POST("/subscribe/toggle", adminUser.ToggleUserSubscribeStatusHandler(serverCtx))

		// Get user subcribe traffic logs
		adminUserGroupRouter.GET("/subscribe/traffic_logs", adminUser.GetUserSubscribeTrafficLogsHandler(serverCtx))

		// Get admin user invite stats
		adminUserGroupRouter.GET("/invite/stats", adminUser.GetAdminUserInviteStatsHandler(serverCtx))

		// Get admin user invite list
		adminUserGroupRouter.GET("/invite/list", adminUser.GetAdminUserInviteListHandler(serverCtx))

		// Get withdrawal list
		adminUserGroupRouter.GET("/withdrawal/list", adminUser.GetWithdrawalListHandler(serverCtx))

		// Approve withdrawal
		adminUserGroupRouter.POST("/withdrawal/approve", adminUser.ApproveWithdrawalHandler(serverCtx))

		// Reject withdrawal
		adminUserGroupRouter.POST("/withdrawal/reject", adminUser.RejectWithdrawalHandler(serverCtx))
	}

	authGroupRouter := router.Group("/v1/auth")
	authGroupRouter.Use(middleware.DeviceMiddleware(serverCtx))

	{
		// Generate captcha
		authGroupRouter.POST("/captcha/generate", auth.GenerateCaptchaHandler(serverCtx))

		// Verify slider captcha
		authGroupRouter.POST("/captcha/slider/verify", auth.SliderVerifyCaptchaHandler(serverCtx))

		// Check user is exist
		authGroupRouter.GET("/check", auth.CheckUserHandler(serverCtx))

		// Check user telephone is exist
		authGroupRouter.GET("/check/telephone", auth.CheckUserTelephoneHandler(serverCtx))

		// User login
		authGroupRouter.POST("/login", auth.UserLoginHandler(serverCtx))

		// Device Login
		authGroupRouter.POST("/login/device", auth.DeviceLoginHandler(serverCtx))

		// Email Login
		authGroupRouter.POST("/login/email", auth.EmailLoginHandler(serverCtx))

		// User Telephone login
		authGroupRouter.POST("/login/telephone", auth.TelephoneLoginHandler(serverCtx))

		// User register
		authGroupRouter.POST("/register", auth.UserRegisterHandler(serverCtx))

		// User Telephone register
		authGroupRouter.POST("/register/telephone", auth.TelephoneRegisterHandler(serverCtx))

		// Reset password
		authGroupRouter.POST("/reset", auth.ResetPasswordHandler(serverCtx))

		// Reset password by telephone
		authGroupRouter.POST("/reset/telephone", auth.TelephoneResetPasswordHandler(serverCtx))
	}

	authAdminGroupRouter := router.Group("/v1/auth/admin")
	authAdminGroupRouter.Use(middleware.DeviceMiddleware(serverCtx))

	{
		// Generate captcha
		authAdminGroupRouter.POST("/captcha/generate", authAdmin.AdminGenerateCaptchaHandler(serverCtx))

		// Verify slider captcha
		authAdminGroupRouter.POST("/captcha/slider/verify", authAdmin.AdminSliderVerifyCaptchaHandler(serverCtx))

		// Admin login
		authAdminGroupRouter.POST("/login", authAdmin.AdminLoginHandler(serverCtx))

		// Admin reset password
		authAdminGroupRouter.POST("/reset", authAdmin.AdminResetPasswordHandler(serverCtx))
	}

	authOauthGroupRouter := router.Group("/v1/auth/oauth")

	{
		// Apple Login Callback
		authOauthGroupRouter.POST("/callback/apple", authOauth.AppleLoginCallbackHandler(serverCtx))

		// OAuth login
		authOauthGroupRouter.POST("/login", authOauth.OAuthLoginHandler(serverCtx))

		// OAuth login get token
		authOauthGroupRouter.POST("/login/token", authOauth.OAuthLoginGetTokenHandler(serverCtx))
	}

	commonGroupRouter := router.Group("/v1/common")
	commonGroupRouter.Use(middleware.DeviceMiddleware(serverCtx))

	{
		// Get Ads
		commonGroupRouter.GET("/ads", common.GetAdsHandler(serverCtx))

		// Check verification code
		commonGroupRouter.POST("/check_verification_code", common.CheckVerificationCodeHandler(serverCtx))

		// Get Client
		commonGroupRouter.GET("/client", common.GetClientHandler(serverCtx))

		// Get Download Link
		commonGroupRouter.GET("/client/download", common.GetDownloadLinkHandler(serverCtx))

		// Heartbeat
		commonGroupRouter.GET("/heartbeat", common.HeartbeatHandler(serverCtx))

		// Get verification code
		commonGroupRouter.POST("/send_code", common.SendEmailCodeHandler(serverCtx))

		// Get sms verification code
		commonGroupRouter.POST("/send_sms_code", common.SendSmsCodeHandler(serverCtx))

		// Get global config
		commonGroupRouter.GET("/site/config", common.GetGlobalConfigHandler(serverCtx))

		// Get Privacy Policy
		commonGroupRouter.GET("/site/privacy", common.GetPrivacyPolicyHandler(serverCtx))

		// Get stat
		commonGroupRouter.GET("/site/stat", common.GetStatHandler(serverCtx))

		// Get Tos Content
		commonGroupRouter.GET("/site/tos", common.GetTosHandler(serverCtx))

		// Submit contact info
		commonGroupRouter.POST("/contact", common.SubmitContactHandler(serverCtx))

		// Report log message
		commonGroupRouter.POST("/log/report", common.ReportLogMessageHandler(serverCtx))

		// Check verification code (legacy v1)
		commonGroupRouter.POST("/check_code", auth.CheckCodeLegacyV1Handler(serverCtx))

		// Check verification code (legacy v2, consume code)
		commonGroupRouter.POST("/check_code/v2", auth.CheckCodeLegacyV2Handler(serverCtx))
	}

	publicAnnouncementGroupRouter := router.Group("/v1/public/announcement")
	publicAnnouncementGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Query announcement
		publicAnnouncementGroupRouter.GET("/list", publicAnnouncement.QueryAnnouncementHandler(serverCtx))
	}

	publicIapAppleGroupRouter := router.Group("/v1/public/iap/apple")
	publicIapAppleGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Attach Apple Transaction
		publicIapAppleGroupRouter.POST("/transactions/attach", publicIapApple.AttachAppleTransactionHandler(serverCtx))

		// Attach Apple Transaction By Id
		publicIapAppleGroupRouter.POST("/transactions/attach/id", publicIapApple.AttachAppleTransactionByIdHandler(serverCtx))

		// Restore Apple Transactions
		publicIapAppleGroupRouter.POST("/transactions/restore", publicIapApple.RestoreAppleTransactionsHandler(serverCtx))

		// Get Apple IAP Status
		publicIapAppleGroupRouter.GET("/status", publicIapApple.GetAppleStatusHandler(serverCtx))
	}

	publicDocumentGroupRouter := router.Group("/v1/public/document")
	publicDocumentGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Get document detail
		publicDocumentGroupRouter.GET("/detail", publicDocument.QueryDocumentDetailHandler(serverCtx))

		// Get document list
		publicDocumentGroupRouter.GET("/list", publicDocument.QueryDocumentListHandler(serverCtx))
	}

	publicFileGroupRouter := router.Group("/v1/public/file")
	publicFileGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Upload file to RustFS
		publicFileGroupRouter.POST("/upload", publicFile.FileUploadHandler(serverCtx))

		// Init file upload
		publicFileGroupRouter.POST("/upload/init", publicFile.FileUploadInitHandler(serverCtx))

		// Complete file upload
		publicFileGroupRouter.POST("/upload/complete", publicFile.FileUploadCompleteHandler(serverCtx))
	}

	publicOrderGroupRouter := router.Group("/v1/public/order")
	publicOrderGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Close order
		publicOrderGroupRouter.POST("/close", publicOrder.CloseOrderHandler(serverCtx))

		// Get order
		publicOrderGroupRouter.GET("/detail", publicOrder.QueryOrderDetailHandler(serverCtx))

		// Get order list
		publicOrderGroupRouter.GET("/list", publicOrder.QueryOrderListHandler(serverCtx))

		// Pre create order
		publicOrderGroupRouter.POST("/pre", publicOrder.PreCreateOrderHandler(serverCtx))

		// purchase Subscription
		publicOrderGroupRouter.POST("/purchase", publicOrder.PurchaseHandler(serverCtx))

		// Recharge
		publicOrderGroupRouter.POST("/recharge", publicOrder.RechargeHandler(serverCtx))

		// Renewal Subscription
		publicOrderGroupRouter.POST("/renewal", publicOrder.RenewalHandler(serverCtx))

		// Reset traffic
		publicOrderGroupRouter.POST("/reset", publicOrder.ResetTrafficHandler(serverCtx))
	}

	publicPaymentGroupRouter := router.Group("/v1/public/payment")
	publicPaymentGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Get available payment methods
		publicPaymentGroupRouter.GET("/methods", publicPayment.GetAvailablePaymentMethodsHandler(serverCtx))
	}

	publicPortalGroupRouter := router.Group("/v1/public/portal")
	publicPortalGroupRouter.Use(middleware.DeviceMiddleware(serverCtx))

	{
		// Purchase Checkout
		publicPortalGroupRouter.POST("/order/checkout", publicPortal.PurchaseCheckoutHandler(serverCtx))

		// Query Purchase Order
		publicPortalGroupRouter.GET("/order/status", publicPortal.QueryPurchaseOrderHandler(serverCtx))

		// Get available payment methods
		publicPortalGroupRouter.GET("/payment-method", publicPortal.GetAvailablePaymentMethodsHandler(serverCtx))

		// Pre Purchase Order
		publicPortalGroupRouter.POST("/pre", publicPortal.PrePurchaseOrderHandler(serverCtx))

		// Purchase subscription
		publicPortalGroupRouter.POST("/purchase", publicPortal.PurchaseHandler(serverCtx))

		// Get Subscription
		publicPortalGroupRouter.GET("/subscribe", publicPortal.GetSubscriptionHandler(serverCtx))
	}

	publicRedemptionGroupRouter := router.Group("/v1/public/redemption")
	publicRedemptionGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Redeem code
		publicRedemptionGroupRouter.POST("/", publicRedemption.RedeemCodeHandler(serverCtx))
	}

	publicRecoveryGroupRouter := router.Group("/v1/public/recovery")
	publicRecoveryGroupRouter.Use(middleware.DeviceMiddleware(serverCtx))

	{
		// Send recovery verification code
		publicRecoveryGroupRouter.POST("/send_code", publicRecovery.SendCodeHandler(serverCtx))

		// Recover order subscription
		publicRecoveryGroupRouter.POST("/order", publicRecovery.RecoverOrderHandler(serverCtx))
	}

	publicSubscribeGroupRouter := router.Group("/v1/public/subscribe")
	publicSubscribeGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Get subscribe list
		publicSubscribeGroupRouter.GET("/list", publicSubscribe.QuerySubscribeListHandler(serverCtx))

		// Get user subscribe node info
		publicSubscribeGroupRouter.GET("/node/list", publicSubscribe.QueryUserSubscribeNodeListHandler(serverCtx))

		// Get subscribe group list
		publicSubscribeGroupRouter.GET("/group/list", publicSubscribe.QuerySubscribeGroupListHandler(serverCtx))
	}

	publicTicketGroupRouter := router.Group("/v1/public/ticket")
	publicTicketGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Update ticket status
		publicTicketGroupRouter.PUT("/", publicTicket.UpdateUserTicketStatusHandler(serverCtx))

		// Create ticket
		publicTicketGroupRouter.POST("/", publicTicket.CreateUserTicketHandler(serverCtx))

		// Get ticket detail
		publicTicketGroupRouter.GET("/detail", publicTicket.GetUserTicketDetailsHandler(serverCtx))

		// Create ticket follow
		publicTicketGroupRouter.POST("/follow", publicTicket.CreateUserTicketFollowHandler(serverCtx))

		// Get ticket list
		publicTicketGroupRouter.GET("/list", publicTicket.GetUserTicketListHandler(serverCtx))
	}

	publicUserGroupRouter := router.Group("/v1/public/user")
	publicUserGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))

	{
		// Query User Affiliate Count
		publicUserGroupRouter.GET("/affiliate/count", publicUser.QueryUserAffiliateHandler(serverCtx))

		// Query User Affiliate List
		publicUserGroupRouter.GET("/affiliate/list", publicUser.QueryUserAffiliateListHandler(serverCtx))

		// Get Agent Downloads
		publicUserGroupRouter.GET("/agent_downloads", publicUser.GetAgentDownloadsHandler(serverCtx))
		publicUserGroupRouter.GET("/agent/downloads", publicUser.GetAgentDownloadsHandler(serverCtx)) // alias: backward-compat

		// Get Agent Realtime
		publicUserGroupRouter.GET("/agent_realtime", publicUser.GetAgentRealtimeHandler(serverCtx))
		publicUserGroupRouter.GET("/agent/realtime", publicUser.GetAgentRealtimeHandler(serverCtx)) // alias: backward-compat

		// Query User Balance Log
		publicUserGroupRouter.GET("/balance_log", publicUser.QueryUserBalanceLogHandler(serverCtx))

		// Update Bind Email
		publicUserGroupRouter.PUT("/bind_email", publicUser.UpdateBindEmailHandler(serverCtx))

		// Bind Email With Verification
		publicUserGroupRouter.POST("/bind_email_with_verification", publicUser.BindEmailWithVerificationHandler(serverCtx))

		// Bind Invite Code
		publicUserGroupRouter.POST("/bind_invite_code", publicUser.BindInviteCodeHandler(serverCtx))

		// Update Bind Mobile
		publicUserGroupRouter.PUT("/bind_mobile", publicUser.UpdateBindMobileHandler(serverCtx))

		// Bind OAuth
		publicUserGroupRouter.POST("/bind_oauth", publicUser.BindOAuthHandler(serverCtx))

		// Bind OAuth Callback
		publicUserGroupRouter.POST("/bind_oauth/callback", publicUser.BindOAuthCallbackHandler(serverCtx))

		// Bind Telegram
		publicUserGroupRouter.GET("/bind_telegram", publicUser.BindTelegramHandler(serverCtx))

		// Query User Commission Log
		publicUserGroupRouter.GET("/commission_log", publicUser.QueryUserCommissionLogHandler(serverCtx))

		// Commission Withdraw
		publicUserGroupRouter.POST("/commission_withdraw", publicUser.CommissionWithdrawHandler(serverCtx))

		// Delete Current User Account
		publicUserGroupRouter.DELETE("/current_user_account", publicUser.DeleteCurrentUserAccountHandler(serverCtx))

		// Delete Account
		publicUserGroupRouter.POST("/delete_account", publicUser.DeleteAccountHandler(serverCtx))

		// Device Online Statistics
		publicUserGroupRouter.GET("/device_online_statistics", publicUser.DeviceOnlineStatisticsHandler(serverCtx))

		// Get Device List
		publicUserGroupRouter.GET("/devices", publicUser.GetDeviceListHandler(serverCtx))

		// Query User Info
		publicUserGroupRouter.GET("/info", publicUser.QueryUserInfoHandler(serverCtx))

		// Get Invite Sales
		publicUserGroupRouter.GET("/invite_sales", publicUser.GetInviteSalesHandler(serverCtx))
		publicUserGroupRouter.GET("/invite/sales", publicUser.GetInviteSalesHandler(serverCtx)) // alias: backward-compat

		// Get User Invite Stats
		publicUserGroupRouter.GET("/invite_stats", publicUser.GetUserInviteStatsHandler(serverCtx))
		publicUserGroupRouter.GET("/invite/stats", publicUser.GetUserInviteStatsHandler(serverCtx)) // alias: backward-compat

		// Get Login Log
		publicUserGroupRouter.GET("/login_log", publicUser.GetLoginLogHandler(serverCtx))

		// Update User Notify
		publicUserGroupRouter.PUT("/notify", publicUser.UpdateUserNotifyHandler(serverCtx))

		// Get OAuth Methods
		publicUserGroupRouter.GET("/oauth_methods", publicUser.GetOAuthMethodsHandler(serverCtx))

		// Update User Password
		publicUserGroupRouter.PUT("/password", publicUser.UpdateUserPasswordHandler(serverCtx))

		// Update User Rules
		publicUserGroupRouter.PUT("/rules", publicUser.UpdateUserRulesHandler(serverCtx))

		// Query User Subscribe
		publicUserGroupRouter.GET("/subscribe", publicUser.QueryUserSubscribeHandler(serverCtx))

		// Get Subscribe Log
		publicUserGroupRouter.GET("/subscribe_log", publicUser.GetSubscribeLogHandler(serverCtx))

		// Update User Subscribe Note
		publicUserGroupRouter.PUT("/subscribe_note", publicUser.UpdateUserSubscribeNoteHandler(serverCtx))

		// Get Subscribe Status
		publicUserGroupRouter.POST("/subscribe_status", publicUser.GetSubscribeStatusHandler(serverCtx))

		// Reset User Subscribe Token
		publicUserGroupRouter.PUT("/subscribe_token", publicUser.ResetUserSubscribeTokenHandler(serverCtx))

		// Get User Traffic Statistics
		publicUserGroupRouter.GET("/traffic_stats", publicUser.GetUserTrafficStatsHandler(serverCtx))

		// Unbind Device
		publicUserGroupRouter.PUT("/unbind_device", publicUser.UnbindDeviceHandler(serverCtx))

		// Unbind OAuth
		publicUserGroupRouter.POST("/unbind_oauth", publicUser.UnbindOAuthHandler(serverCtx))

		// Unbind Telegram
		publicUserGroupRouter.POST("/unbind_telegram", publicUser.UnbindTelegramHandler(serverCtx))

		// Unsubscribe
		publicUserGroupRouter.POST("/unsubscribe", publicUser.UnsubscribeHandler(serverCtx))

		// Pre Unsubscribe
		publicUserGroupRouter.POST("/unsubscribe/pre", publicUser.PreUnsubscribeHandler(serverCtx))

		// Verify Email
		publicUserGroupRouter.POST("/verify_email", publicUser.VerifyEmailHandler(serverCtx))

		// Query Withdrawal Log
		publicUserGroupRouter.GET("/withdrawal_log", publicUser.QueryWithdrawalLogHandler(serverCtx))
	}

	publicUserWsGroupRouter := router.Group("/v1/public/user")
	publicUserWsGroupRouter.Use(middleware.AuthMiddleware(serverCtx))

	{
		// Webosocket Device Connect
		publicUserWsGroupRouter.GET("/device_ws_connect", publicUserWs.DeviceWsConnectHandler(serverCtx))
	}

	serverGroupRouter := router.Group("/v1/server")
	serverGroupRouter.Use(middleware.ServerMiddleware(serverCtx))

	{
		// Get server config
		serverGroupRouter.GET("/config", server.GetServerConfigHandler(serverCtx))

		// Push online users
		serverGroupRouter.POST("/online", server.PushOnlineUsersHandler(serverCtx))

		// Push user Traffic
		serverGroupRouter.POST("/push", server.ServerPushUserTrafficHandler(serverCtx))

		// Push server status
		serverGroupRouter.POST("/status", server.ServerPushStatusHandler(serverCtx))

		// Get user list
		serverGroupRouter.GET("/user", server.GetServerUserListHandler(serverCtx))
	}

	serverGroupRouterV2 := router.Group("/v2/server")

	{
		// Get Server Protocol Config
		serverGroupRouterV2.GET("/:server_id", server.QueryServerProtocolConfigHandler(serverCtx))
	}
}
