From 6e13e67dc8a20c1f5e4ea28cefd0cbc87f493154 Mon Sep 17 00:00:00 2001 From: shanshanzhong Date: Thu, 5 Mar 2026 23:31:45 -0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AD=BE=E5=90=8D=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/admin/log.api | 57 ++++++ apis/common.api | 1 + apis/public/user.api | 108 ++++++++++ apis/types.api | 35 +++- internal/handler/routes.go | 36 +++- .../public/user/getAgentDownloadsLogic.go | 4 +- internal/middleware/signatureMiddleware.go | 8 +- internal/types/compat_types.go | 142 -------------- internal/types/types.go | 184 +++++++++++++++++- 9 files changed, 416 insertions(+), 159 deletions(-) diff --git a/apis/admin/log.api b/apis/admin/log.api index 3b117c8..8575ca3 100644 --- a/apis/admin/log.api +++ b/apis/admin/log.api @@ -190,6 +190,55 @@ type ( AutoClear *bool `json:"auto_clear"` ClearDays int64 `json:"clear_days"` } + GetErrorLogMessageListRequest { + Page int `form:"page"` + Size int `form:"size"` + Platform string `form:"platform,optional"` + Level uint8 `form:"level,optional"` + UserId int64 `form:"user_id,optional"` + DeviceId string `form:"device_id,optional"` + ErrorCode string `form:"error_code,optional"` + Keyword string `form:"keyword,optional"` + Start int64 `form:"start,optional"` + End int64 `form:"end,optional"` + } + ErrorLogMessage { + Id int64 `json:"id"` + Platform string `json:"platform"` + AppVersion string `json:"app_version"` + OsName string `json:"os_name"` + OsVersion string `json:"os_version"` + DeviceId string `json:"device_id"` + UserId int64 `json:"user_id"` + SessionId string `json:"session_id"` + Level uint8 `json:"level"` + ErrorCode string `json:"error_code"` + Message string `json:"message"` + CreatedAt int64 `json:"created_at"` + } + GetErrorLogMessageListResponse { + Total int64 `json:"total"` + List []ErrorLogMessage `json:"list"` + } + GetErrorLogMessageDetailResponse { + Id int64 `json:"id"` + Platform string `json:"platform"` + AppVersion string `json:"app_version"` + OsName string `json:"os_name"` + OsVersion string `json:"os_version"` + DeviceId string `json:"device_id"` + UserId int64 `json:"user_id"` + SessionId string `json:"session_id"` + Level uint8 `json:"level"` + ErrorCode string `json:"error_code"` + Message string `json:"message"` + Stack string `json:"stack"` + ClientIP string `json:"client_ip"` + UserAgent string `json:"user_agent"` + Locale string `json:"locale"` + OccurredAt int64 `json:"occurred_at"` + CreatedAt int64 `json:"created_at"` + } ) @server ( @@ -257,5 +306,13 @@ service ppanel { @doc "Update log setting" @handler UpdateLogSetting post /setting (LogSetting) + + @doc "Get error log message list" + @handler GetErrorLogMessageList + get /error_message/list (GetErrorLogMessageListRequest) returns (GetErrorLogMessageListResponse) + + @doc "Get error log message detail" + @handler GetErrorLogMessageDetail + get /error_message/detail returns (GetErrorLogMessageDetailResponse) } diff --git a/apis/common.api b/apis/common.api index e6d9414..d264b43 100644 --- a/apis/common.api +++ b/apis/common.api @@ -74,6 +74,7 @@ type ( } CheckVerificationCodeRespone { Status bool `json:"status"` + Exist bool `json:"exist"` } SubscribeClient { Id int64 `json:"id"` diff --git a/apis/public/user.api b/apis/public/user.api index a6eb50f..498bbcb 100644 --- a/apis/public/user.api +++ b/apis/public/user.api @@ -144,6 +144,82 @@ type ( HistoryContinuousDays int64 `json:"history_continuous_days"` LongestSingleConnection int64 `json:"longest_single_connection"` } + BindEmailWithVerificationRequest { + Email string `json:"email" form:"email" validate:"required,email"` + Code string `json:"code" form:"code" validate:"required"` + } + BindEmailWithVerificationResponse { + Success bool `json:"success"` + Message string `json:"message"` + Token string `json:"token,omitempty"` + UserId int64 `json:"user_id"` + FamilyJoined bool `json:"family_joined,omitempty"` + FamilyId int64 `json:"family_id,omitempty"` + OwnerUserId int64 `json:"owner_user_id,omitempty"` + } + BindInviteCodeRequest { + InviteCode string `json:"invite_code" form:"invite_code" validate:"required"` + } + DeleteAccountRequest { + Email string `json:"email" validate:"required,email"` + Code string `json:"code" validate:"required"` + } + DeleteAccountResponse { + Success bool `json:"success"` + Message string `json:"message"` + UserId int64 `json:"user_id"` + Code int64 `json:"code"` + } + GetAgentDownloadsRequest {} + PlatformDownloads { + IOS int64 `json:"ios"` + Android int64 `json:"android"` + Windows int64 `json:"windows"` + Mac int64 `json:"mac"` + } + GetAgentDownloadsResponse { + Total int64 `json:"total"` + Platforms PlatformDownloads `json:"platforms"` + ComparisonRate string `json:"comparison_rate,omitempty"` + } + GetAgentRealtimeRequest {} + GetAgentRealtimeResponse { + Total int64 `json:"total"` + Clicks int64 `json:"clicks"` + Views int64 `json:"views"` + Installs int64 `json:"installs"` + PaidCount int64 `json:"paid_count"` + GrowthRate string `json:"growth_rate"` + PaidGrowthRate string `json:"paid_growth_rate"` + } + GetInviteSalesRequest { + Page int `form:"page"` + Size int `form:"size"` + StartTime int64 `form:"start_time"` + EndTime int64 `form:"end_time"` + } + InvitedUserSale { + Amount float64 `json:"amount"` + UpdatedAt int64 `json:"updated_at"` + UserHash string `json:"user_hash"` + ProductName string `json:"product_name"` + } + GetInviteSalesResponse { + Total int64 `json:"total"` + List []InvitedUserSale `json:"list"` + } + GetSubscribeStatusRequest { + Email string `form:"email" json:"email" validate:"omitempty,email"` + } + GetSubscribeStatusResponse { + DeviceStatus bool `json:"device_status"` + EmailStatus bool `json:"email_status"` + } + GetUserInviteStatsRequest {} + GetUserInviteStatsResponse { + FriendlyCount int64 `json:"friendly_count"` + HistoryCount int64 `json:"history_count"` + } ) @server ( @@ -271,6 +347,38 @@ service ppanel { @doc "Delete Current User Account" @handler DeleteCurrentUserAccount delete /current_user_account + + @doc "Bind Email With Verification" + @handler BindEmailWithVerification + post /bind_email_with_verification (BindEmailWithVerificationRequest) returns (BindEmailWithVerificationResponse) + + @doc "Bind Invite Code" + @handler BindInviteCode + post /bind_invite_code (BindInviteCodeRequest) + + @doc "Delete Account" + @handler DeleteAccount + post /delete_account (DeleteAccountRequest) returns (DeleteAccountResponse) + + @doc "Get Agent Downloads" + @handler GetAgentDownloads + get /agent_downloads (GetAgentDownloadsRequest) returns (GetAgentDownloadsResponse) + + @doc "Get Agent Realtime" + @handler GetAgentRealtime + get /agent_realtime (GetAgentRealtimeRequest) returns (GetAgentRealtimeResponse) + + @doc "Get Invite Sales" + @handler GetInviteSales + get /invite_sales (GetInviteSalesRequest) returns (GetInviteSalesResponse) + + @doc "Get Subscribe Status" + @handler GetSubscribeStatus + get /subscribe_status (GetSubscribeStatusRequest) returns (GetSubscribeStatusResponse) + + @doc "Get User Invite Stats" + @handler GetUserInviteStats + get /invite_stats (GetUserInviteStatsRequest) returns (GetUserInviteStatsResponse) } @server ( diff --git a/apis/types.api b/apis/types.api index b58c62f..6543c3e 100644 --- a/apis/types.api +++ b/apis/types.api @@ -20,6 +20,7 @@ type ( Telegram int64 `json:"telegram"` ReferCode string `json:"refer_code"` RefererId int64 `json:"referer_id"` + ShareLink string `json:"share_link,omitempty"` Enable bool `json:"enable"` IsAdmin bool `json:"is_admin,omitempty"` EnableBalanceNotify bool `json:"enable_balance_notify"` @@ -29,6 +30,8 @@ type ( AuthMethods []UserAuthMethod `json:"auth_methods"` UserDevices []UserDevice `json:"user_devices"` Rules []string `json:"rules"` + LastLoginTime int64 `json:"last_login_time,omitempty"` + MemberStatus string `json:"member_status,omitempty"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` DeletedAt int64 `json:"deleted_at,omitempty"` @@ -513,6 +516,7 @@ type ( EntitlementSource string `json:"entitlement_source"` EntitlementOwnerUserId int64 `json:"entitlement_owner_user_id"` ReadOnly bool `json:"read_only"` + IsGift bool `json:"is_gift"` Short string `json:"short"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` @@ -701,8 +705,10 @@ type ( PublishableKey string `json:"publishable_key"` } QueryOrderListRequest { - Page int `form:"page" validate:"required"` - Size int `form:"size" validate:"required"` + Page int `form:"page" validate:"required"` + Size int `form:"size" validate:"required"` + Status int `form:"status,optional"` + Search string `form:"search,optional"` } QueryOrderListResponse { Total int64 `json:"total"` @@ -791,6 +797,31 @@ type ( Type string `json:"type"` CheckoutUrl string `json:"checkout_url,omitempty"` Stripe *StripePayment `json:"stripe,omitempty"` + ProductIds []string `json:"product_ids,omitempty"` + } + AttachAppleTransactionRequest { + OrderNo string `json:"order_no" validate:"required"` + SignedTransactionJWS string `json:"signed_transaction_jws" validate:"required"` + SubscribeId int64 `json:"subscribe_id,omitempty"` + DurationDays int64 `json:"duration_days,omitempty"` + Tier string `json:"tier,omitempty"` + } + AttachAppleTransactionByIdRequest { + OrderNo string `json:"order_no" validate:"required"` + TransactionId string `json:"transaction_id" validate:"required"` + Sandbox *bool `json:"sandbox,omitempty"` + } + AttachAppleTransactionResponse { + ExpiresAt int64 `json:"expires_at"` + Tier string `json:"tier"` + } + RestoreAppleTransactionsRequest { + Transactions []string `json:"transactions" validate:"required"` + } + GetAppleStatusResponse { + Active bool `json:"active"` + ExpiresAt int64 `json:"expires_at"` + Tier string `json:"tier"` } SiteCustomDataContacts { Email string `json:"email"` diff --git a/internal/handler/routes.go b/internal/handler/routes.go index ab75fcc..5872aa8 100644 --- a/internal/handler/routes.go +++ b/internal/handler/routes.go @@ -201,6 +201,12 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { // Filter email log adminLogGroupRouter.GET("/email/list", adminLog.FilterEmailLogHandler(serverCtx)) + // Get error log message detail + adminLogGroupRouter.GET("/error_message/detail", adminLog.GetErrorLogMessageDetailHandler(serverCtx)) + + // Get error log message list + adminLogGroupRouter.GET("/error_message/list", adminLog.GetErrorLogMessageListHandler(serverCtx)) + // Filter gift log adminLogGroupRouter.GET("/gift/list", adminLog.FilterGiftLogHandler(serverCtx)) @@ -847,12 +853,24 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { // Query User Affiliate List publicUserGroupRouter.GET("/affiliate/list", publicUser.QueryUserAffiliateListHandler(serverCtx)) + // Get Agent Downloads + publicUserGroupRouter.GET("/agent_downloads", publicUser.GetAgentDownloadsHandler(serverCtx)) + + // Get Agent Realtime + publicUserGroupRouter.GET("/agent_realtime", publicUser.GetAgentRealtimeHandler(serverCtx)) + // 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)) @@ -874,6 +892,9 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { // 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)) @@ -883,6 +904,12 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { // Query User Info publicUserGroupRouter.GET("/info", publicUser.QueryUserInfoHandler(serverCtx)) + // Get Invite Sales + publicUserGroupRouter.GET("/invite_sales", publicUser.GetInviteSalesHandler(serverCtx)) + + // Get User Invite Stats + publicUserGroupRouter.GET("/invite_stats", publicUser.GetUserInviteStatsHandler(serverCtx)) + // Get Login Log publicUserGroupRouter.GET("/login_log", publicUser.GetLoginLogHandler(serverCtx)) @@ -907,6 +934,9 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { // Update User Subscribe Note publicUserGroupRouter.PUT("/subscribe_note", publicUser.UpdateUserSubscribeNoteHandler(serverCtx)) + // Get Subscribe Status + publicUserGroupRouter.GET("/subscribe_status", publicUser.GetSubscribeStatusHandler(serverCtx)) + // Reset User Subscribe Token publicUserGroupRouter.PUT("/subscribe_token", publicUser.ResetUserSubscribeTokenHandler(serverCtx)) @@ -960,10 +990,10 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { serverGroupRouter.GET("/user", server.GetServerUserListHandler(serverCtx)) } - { - serverGroupRouter := router.Group("/v2/server") + serverV2GroupRouter := router.Group("/v2/server") + { // Get Server Protocol Config - serverGroupRouter.GET("/:server_id", server.QueryServerProtocolConfigHandler(serverCtx)) + serverV2GroupRouter.GET("/:server_id", server.QueryServerProtocolConfigHandler(serverCtx)) } } diff --git a/internal/logic/public/user/getAgentDownloadsLogic.go b/internal/logic/public/user/getAgentDownloadsLogic.go index e3811a7..3489edd 100644 --- a/internal/logic/public/user/getAgentDownloadsLogic.go +++ b/internal/logic/public/user/getAgentDownloadsLogic.go @@ -83,12 +83,12 @@ func (l *GetAgentDownloadsLogic) GetAgentDownloads(req *types.GetAgentDownloadsR // 3. 构造响应 return &types.GetAgentDownloadsResponse{ Total: stats.Total, - Platforms: &types.PlatformDownloads{ + Platforms: types.PlatformDownloads{ IOS: stats.IOS, Android: stats.Android, Windows: stats.Windows, Mac: stats.Mac, }, - ComparisonRate: nil, // 不再计算环比 + ComparisonRate: "", // 不再计算环比 }, nil } diff --git a/internal/middleware/signatureMiddleware.go b/internal/middleware/signatureMiddleware.go index 36afff5..516fbf6 100644 --- a/internal/middleware/signatureMiddleware.go +++ b/internal/middleware/signatureMiddleware.go @@ -46,15 +46,9 @@ func SignatureMiddleware(srvCtx *svc.ServiceContext) func(c *gin.Context) { c.Next() return } - if c.GetHeader("X-Signature-Enabled") != "1" { - c.Next() - return - } - appId := c.GetHeader("X-App-Id") if appId == "" { - result.HttpResult(c, nil, xerr.NewErrCode(xerr.InvalidAccess)) - c.Abort() + c.Next() return } diff --git a/internal/types/compat_types.go b/internal/types/compat_types.go index 862ba38..dd5b5d4 100644 --- a/internal/types/compat_types.go +++ b/internal/types/compat_types.go @@ -59,145 +59,3 @@ type EmailLoginRequest struct { LoginType string `header:"Login-Type"` CfToken string `json:"cf_token,optional" form:"cf_token"` } - -// Compatibility types for custom endpoints not included in generated types.go. -type BindEmailWithVerificationRequest struct { - Email string `json:"email" form:"email" validate:"required,email"` - Code string `json:"code" form:"code" validate:"required"` -} - -type BindEmailWithVerificationResponse struct { - Success bool `json:"success"` - Message string `json:"message"` - Token string `json:"token,omitempty"` - UserId int64 `json:"user_id"` - FamilyJoined bool `json:"family_joined,omitempty"` - FamilyId int64 `json:"family_id,omitempty"` - OwnerUserId int64 `json:"owner_user_id,omitempty"` -} - -type BindInviteCodeRequest struct { - InviteCode string `json:"invite_code" form:"invite_code" validate:"required"` -} - -type DeleteAccountResponse struct { - Success bool `json:"success"` - Message string `json:"message"` - UserId int64 `json:"user_id"` - Code int64 `json:"code"` -} - -type GetAgentDownloadsRequest struct{} - -type PlatformDownloads struct { - IOS int64 `json:"ios"` - Android int64 `json:"android"` - Windows int64 `json:"windows"` - Mac int64 `json:"mac"` -} - -type GetAgentDownloadsResponse struct { - Total int64 `json:"total"` - Platforms *PlatformDownloads `json:"platforms,omitempty"` - ComparisonRate *string `json:"comparison_rate,omitempty"` -} - -type GetAgentRealtimeRequest struct{} - -type GetAgentRealtimeResponse struct { - Total int64 `json:"total"` - Clicks int64 `json:"clicks"` - Views int64 `json:"views"` - Installs int64 `json:"installs"` - PaidCount int64 `json:"paid_count"` - GrowthRate string `json:"growth_rate"` - PaidGrowthRate string `json:"paid_growth_rate"` -} - -type GetInviteSalesRequest struct { - Page int `form:"page"` - Size int `form:"size"` - StartTime int64 `form:"start_time"` - EndTime int64 `form:"end_time"` -} - -type InvitedUserSale struct { - Amount float64 `json:"amount"` - UpdatedAt int64 `json:"updated_at"` - UserHash string `json:"user_hash"` - ProductName string `json:"product_name"` -} - -type GetInviteSalesResponse struct { - Total int64 `json:"total"` - List []InvitedUserSale `json:"list"` -} - -type GetSubscribeStatusRequest struct { - Email string `form:"email" json:"email" validate:"omitempty,email"` -} - -type GetSubscribeStatusResponse struct { - DeviceStatus bool `json:"device_status"` - EmailStatus bool `json:"email_status"` -} - -type GetUserInviteStatsRequest struct{} - -type GetUserInviteStatsResponse struct { - FriendlyCount int64 `json:"friendly_count"` - HistoryCount int64 `json:"history_count"` -} - -type GetErrorLogMessageListRequest struct { - Page int `form:"page"` - Size int `form:"size"` - Platform string `form:"platform"` - Level uint8 `form:"level"` - UserId int64 `form:"user_id"` - DeviceId string `form:"device_id"` - ErrorCode string `form:"error_code"` - Keyword string `form:"keyword"` - Start int64 `form:"start"` - End int64 `form:"end"` -} - -type ErrorLogMessage struct { - Id int64 `json:"id"` - Platform string `json:"platform"` - AppVersion string `json:"app_version"` - OsName string `json:"os_name"` - OsVersion string `json:"os_version"` - DeviceId string `json:"device_id"` - UserId int64 `json:"user_id"` - SessionId string `json:"session_id"` - Level uint8 `json:"level"` - ErrorCode string `json:"error_code"` - Message string `json:"message"` - CreatedAt int64 `json:"created_at"` -} - -type GetErrorLogMessageListResponse struct { - Total int64 `json:"total"` - List []ErrorLogMessage `json:"list"` -} - -type GetErrorLogMessageDetailResponse struct { - Id int64 `json:"id"` - Platform string `json:"platform"` - AppVersion string `json:"app_version"` - OsName string `json:"os_name"` - OsVersion string `json:"os_version"` - DeviceId string `json:"device_id"` - UserId int64 `json:"user_id"` - SessionId string `json:"session_id"` - Level uint8 `json:"level"` - ErrorCode string `json:"error_code"` - Message string `json:"message"` - Stack string `json:"stack"` - ClientIP string `json:"client_ip"` - UserAgent string `json:"user_agent"` - Locale string `json:"locale"` - OccurredAt int64 `json:"occurred_at"` - CreatedAt int64 `json:"created_at"` -} diff --git a/internal/types/types.go b/internal/types/types.go index 3cc0116..3a7ce0f 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -115,6 +115,25 @@ type ApplicationVersion struct { IsDefault bool `json:"is_default"` } +type AttachAppleTransactionByIdRequest struct { + OrderNo string `json:"order_no" validate:"required"` + TransactionId string `json:"transaction_id" validate:"required"` + Sandbox *bool `json:"sandbox,omitempty"` +} + +type AttachAppleTransactionRequest struct { + OrderNo string `json:"order_no" validate:"required"` + SignedTransactionJWS string `json:"signed_transaction_jws" validate:"required"` + SubscribeId int64 `json:"subscribe_id,omitempty"` + DurationDays int64 `json:"duration_days,omitempty"` + Tier string `json:"tier,omitempty"` +} + +type AttachAppleTransactionResponse struct { + ExpiresAt int64 `json:"expires_at"` + Tier string `json:"tier"` +} + type AuthConfig struct { Mobile MobileAuthenticateConfig `json:"mobile"` Email EmailAuthticateConfig `json:"email"` @@ -182,6 +201,25 @@ type BatchSendEmailTask struct { UpdatedAt int64 `json:"updated_at"` } +type BindEmailWithVerificationRequest struct { + Email string `json:"email" form:"email" validate:"required,email"` + Code string `json:"code" form:"code" validate:"required"` +} + +type BindEmailWithVerificationResponse struct { + Success bool `json:"success"` + Message string `json:"message"` + Token string `json:"token,omitempty"` + UserId int64 `json:"user_id"` + FamilyJoined bool `json:"family_joined,omitempty"` + FamilyId int64 `json:"family_id,omitempty"` + OwnerUserId int64 `json:"owner_user_id,omitempty"` +} + +type BindInviteCodeRequest struct { + InviteCode string `json:"invite_code" form:"invite_code" validate:"required"` +} + type BindOAuthCallbackRequest struct { Method string `json:"method"` Callback interface{} `json:"callback"` @@ -218,7 +256,7 @@ type CheckVerificationCodeRequest struct { type CheckVerificationCodeRespone struct { Status bool `json:"status"` - Exist bool `json:"exist,omitempty"` + Exist bool `json:"exist"` } type CheckoutOrderRequest struct { @@ -491,6 +529,18 @@ type CurrencyConfig struct { CurrencySymbol string `json:"currency_symbol"` } +type DeleteAccountRequest struct { + Email string `json:"email" validate:"required,email"` + Code string `json:"code" validate:"required"` +} + +type DeleteAccountResponse struct { + Success bool `json:"success"` + Message string `json:"message"` + UserId int64 `json:"user_id"` + Code int64 `json:"code"` +} + type DeleteAdsRequest struct { Id int64 `json:"id"` } @@ -607,6 +657,21 @@ type EmailAuthticateConfig struct { DomainSuffixList string `json:"domain_suffix_list"` } +type ErrorLogMessage struct { + Id int64 `json:"id"` + Platform string `json:"platform"` + AppVersion string `json:"app_version"` + OsName string `json:"os_name"` + OsVersion string `json:"os_version"` + DeviceId string `json:"device_id"` + UserId int64 `json:"user_id"` + SessionId string `json:"session_id"` + Level uint8 `json:"level"` + ErrorCode string `json:"error_code"` + Message string `json:"message"` + CreatedAt int64 `json:"created_at"` +} + type FamilyDetail struct { Summary FamilySummary `json:"summary"` Members []FamilyMemberItem `json:"members"` @@ -812,6 +877,28 @@ type GetAdsResponse struct { List []Ads `json:"list"` } +type GetAgentDownloadsRequest struct { +} + +type GetAgentDownloadsResponse struct { + Total int64 `json:"total"` + Platforms PlatformDownloads `json:"platforms"` + ComparisonRate string `json:"comparison_rate,omitempty"` +} + +type GetAgentRealtimeRequest struct { +} + +type GetAgentRealtimeResponse struct { + Total int64 `json:"total"` + Clicks int64 `json:"clicks"` + Views int64 `json:"views"` + Installs int64 `json:"installs"` + PaidCount int64 `json:"paid_count"` + GrowthRate string `json:"growth_rate"` + PaidGrowthRate string `json:"paid_growth_rate"` +} + type GetAnnouncementListRequest struct { Page int64 `form:"page"` Size int64 `form:"size"` @@ -830,6 +917,12 @@ type GetAnnouncementRequest struct { Id int64 `form:"id" validate:"required"` } +type GetAppleStatusResponse struct { + Active bool `json:"active"` + ExpiresAt int64 `json:"expires_at"` + Tier string `json:"tier"` +} + type GetAuthMethodConfigRequest struct { Method string `form:"method"` } @@ -907,6 +1000,44 @@ type GetDocumentListResponse struct { List []Document `json:"list"` } +type GetErrorLogMessageDetailResponse struct { + Id int64 `json:"id"` + Platform string `json:"platform"` + AppVersion string `json:"app_version"` + OsName string `json:"os_name"` + OsVersion string `json:"os_version"` + DeviceId string `json:"device_id"` + UserId int64 `json:"user_id"` + SessionId string `json:"session_id"` + Level uint8 `json:"level"` + ErrorCode string `json:"error_code"` + Message string `json:"message"` + Stack string `json:"stack"` + ClientIP string `json:"client_ip"` + UserAgent string `json:"user_agent"` + Locale string `json:"locale"` + OccurredAt int64 `json:"occurred_at"` + CreatedAt int64 `json:"created_at"` +} + +type GetErrorLogMessageListRequest struct { + Page int `form:"page"` + Size int `form:"size"` + Platform string `form:"platform,optional"` + Level uint8 `form:"level,optional"` + UserId int64 `form:"user_id,optional"` + DeviceId string `form:"device_id,optional"` + ErrorCode string `form:"error_code,optional"` + Keyword string `form:"keyword,optional"` + Start int64 `form:"start,optional"` + End int64 `form:"end,optional"` +} + +type GetErrorLogMessageListResponse struct { + Total int64 `json:"total"` + List []ErrorLogMessage `json:"list"` +} + type GetFamilyDetailRequest struct { Id int64 `form:"id" validate:"required"` } @@ -939,6 +1070,18 @@ type GetGlobalConfigResponse struct { WebAd bool `json:"web_ad"` } +type GetInviteSalesRequest struct { + Page int `form:"page"` + Size int `form:"size"` + StartTime int64 `form:"start_time"` + EndTime int64 `form:"end_time"` +} + +type GetInviteSalesResponse struct { + Total int64 `json:"total"` + List []InvitedUserSale `json:"list"` +} + type GetLoginLogRequest struct { Page int `form:"page"` Size int `form:"size"` @@ -1110,6 +1253,15 @@ type GetSubscribeLogResponse struct { Total int64 `json:"total"` } +type GetSubscribeStatusRequest struct { + Email string `form:"email" json:"email" validate:"omitempty,email"` +} + +type GetSubscribeStatusResponse struct { + DeviceStatus bool `json:"device_status"` + EmailStatus bool `json:"email_status"` +} + type GetSubscriptionRequest struct { Language string `form:"language"` } @@ -1147,6 +1299,14 @@ type GetUserAuthMethodResponse struct { AuthMethods []UserAuthMethod `json:"auth_methods"` } +type GetUserInviteStatsRequest struct { +} + +type GetUserInviteStatsResponse struct { + FriendlyCount int64 `json:"friendly_count"` + HistoryCount int64 `json:"history_count"` +} + type GetUserListRequest struct { Page int `form:"page"` Size int `form:"size"` @@ -1299,6 +1459,13 @@ type InviteConfig struct { GiftDays int64 `json:"gift_days"` } +type InvitedUserSale struct { + Amount float64 `json:"amount"` + UpdatedAt int64 `json:"updated_at"` + UserHash string `json:"user_hash"` + ProductName string `json:"product_name"` +} + type KickOfflineRequest struct { Id int64 `json:"id"` } @@ -1518,6 +1685,13 @@ type PaymentMethodDetail struct { NotifyURL string `json:"notify_url"` } +type PlatformDownloads struct { + IOS int64 `json:"ios"` + Android int64 `json:"android"` + Windows int64 `json:"windows"` + Mac int64 `json:"mac"` +} + type PlatformInfo struct { Platform string `json:"platform"` PlatformUrl string `json:"platform_url"` @@ -1713,8 +1887,8 @@ type QueryOrderDetailRequest struct { type QueryOrderListRequest struct { Page int `form:"page" validate:"required"` Size int `form:"size" validate:"required"` - Status int `form:"status"` - Search string `form:"search"` + Status int `form:"status,optional"` + Search string `form:"search,optional"` } type QueryOrderListResponse struct { @@ -2006,6 +2180,10 @@ type ResetUserSubscribeTrafficRequest struct { UserSubscribeId int64 `json:"user_subscribe_id"` } +type RestoreAppleTransactionsRequest struct { + Transactions []string `json:"transactions" validate:"required"` +} + type RevenueStatisticsResponse struct { Today OrdersStatistics `json:"today"` Monthly OrdersStatistics `json:"monthly"`