Merge remote-tracking branch 'origin/master' into internal
This commit is contained in:
+231
-66
@@ -361,14 +361,28 @@ type CreateDocumentRequest struct {
|
||||
Show *bool `json:"show"`
|
||||
}
|
||||
|
||||
type CreateNodeGroupRequest struct {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
Sort int `json:"sort"`
|
||||
ForCalculation *bool `json:"for_calculation"`
|
||||
IsExpiredGroup *bool `json:"is_expired_group"`
|
||||
ExpiredDaysLimit *int `json:"expired_days_limit"`
|
||||
MaxTrafficGBExpired *int64 `json:"max_traffic_gb_expired,omitempty"`
|
||||
SpeedLimit *int `json:"speed_limit"`
|
||||
MinTrafficGB *int64 `json:"min_traffic_gb,omitempty"`
|
||||
MaxTrafficGB *int64 `json:"max_traffic_gb,omitempty"`
|
||||
}
|
||||
|
||||
type CreateNodeRequest struct {
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
}
|
||||
|
||||
type CreateOrderRequest struct {
|
||||
@@ -462,6 +476,9 @@ type CreateSubscribeRequest struct {
|
||||
NewUserOnly *bool `json:"new_user_only"`
|
||||
Nodes []int64 `json:"nodes"`
|
||||
NodeTags []string `json:"node_tags"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
NodeGroupId int64 `json:"node_group_id"`
|
||||
TrafficLimit []TrafficLimit `json:"traffic_limit"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
@@ -469,6 +486,7 @@ type CreateSubscribeRequest struct {
|
||||
ResetCycle int64 `json:"reset_cycle"`
|
||||
RenewalReset *bool `json:"renewal_reset"`
|
||||
ShowOriginalPrice bool `json:"show_original_price"`
|
||||
AutoCreateGroup bool `json:"auto_create_group"`
|
||||
}
|
||||
|
||||
type CreateTicketFollowRequest struct {
|
||||
@@ -559,6 +577,10 @@ type DeleteDocumentRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type DeleteNodeGroupRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type DeleteNodeRequest struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
@@ -761,9 +783,10 @@ type FilterMobileLogResponse struct {
|
||||
}
|
||||
|
||||
type FilterNodeListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Search string `form:"search,omitempty"`
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Search string `form:"search,omitempty"`
|
||||
NodeGroupId *int64 `form:"node_group_id,omitempty"`
|
||||
}
|
||||
|
||||
type FilterNodeListResponse struct {
|
||||
@@ -855,6 +878,12 @@ type Follow struct {
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
|
||||
type GenerateCaptchaResponse struct {
|
||||
Id string `json:"id"`
|
||||
Image string `json:"image"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type GetAdsDetailRequest struct {
|
||||
Id int64 `form:"id"`
|
||||
}
|
||||
@@ -1107,6 +1136,17 @@ type GetMessageLogListResponse struct {
|
||||
List []MessageLog `json:"list"`
|
||||
}
|
||||
|
||||
type GetNodeGroupListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
GroupId string `form:"group_id,omitempty"`
|
||||
}
|
||||
|
||||
type GetNodeGroupListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []NodeGroup `json:"list"`
|
||||
}
|
||||
|
||||
type GetNodeMultiplierResponse struct {
|
||||
Periods []TimePeriod `json:"periods"`
|
||||
}
|
||||
@@ -1234,11 +1274,19 @@ type GetSubscribeGroupListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type GetSubscribeGroupMappingRequest struct {
|
||||
}
|
||||
|
||||
type GetSubscribeGroupMappingResponse struct {
|
||||
List []SubscribeGroupMappingItem `json:"list"`
|
||||
}
|
||||
|
||||
type GetSubscribeListRequest struct {
|
||||
Page int64 `form:"page" validate:"required"`
|
||||
Size int64 `form:"size" validate:"required"`
|
||||
Language string `form:"language,omitempty"`
|
||||
Search string `form:"search,omitempty"`
|
||||
Page int64 `form:"page" validate:"required"`
|
||||
Size int64 `form:"size" validate:"required"`
|
||||
Language string `form:"language,omitempty"`
|
||||
Search string `form:"search,omitempty"`
|
||||
NodeGroupId int64 `form:"node_group_id,omitempty"`
|
||||
}
|
||||
|
||||
type GetSubscribeListResponse struct {
|
||||
@@ -1423,6 +1471,18 @@ type GetUserTicketListResponse struct {
|
||||
List []Ticket `json:"list"`
|
||||
}
|
||||
|
||||
type GetUserTrafficStatsRequest struct {
|
||||
UserSubscribeId string `form:"user_subscribe_id" validate:"required"`
|
||||
Days int `form:"days" validate:"required,oneof=7 30"`
|
||||
}
|
||||
|
||||
type GetUserTrafficStatsResponse struct {
|
||||
List []DailyTrafficStats `json:"list"`
|
||||
TotalUpload int64 `json:"total_upload"`
|
||||
TotalDownload int64 `json:"total_download"`
|
||||
TotalTraffic int64 `json:"total_traffic"`
|
||||
}
|
||||
|
||||
type GiftLog struct {
|
||||
Type uint16 `json:"type"`
|
||||
UserId int64 `json:"user_id"`
|
||||
@@ -1439,6 +1499,25 @@ type GoogleLoginCallbackRequest struct {
|
||||
State string `form:"state"`
|
||||
}
|
||||
|
||||
type GroupHistory struct {
|
||||
Id int64 `json:"id"`
|
||||
GroupMode string `json:"group_mode"`
|
||||
TriggerType string `json:"trigger_type"`
|
||||
TotalUsers int `json:"total_users"`
|
||||
SuccessCount int `json:"success_count"`
|
||||
FailedCount int `json:"failed_count"`
|
||||
StartTime *int64 `json:"start_time,omitempty"`
|
||||
EndTime *int64 `json:"end_time,omitempty"`
|
||||
Operator string `json:"operator,omitempty"`
|
||||
ErrorLog string `json:"error_log,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
|
||||
type GroupHistoryDetail struct {
|
||||
GroupHistory
|
||||
ConfigSnapshot map[string]interface{} `json:"config_snapshot,omitempty"`
|
||||
}
|
||||
|
||||
type HasMigrateSeverNodeResponse struct {
|
||||
HasMigrate bool `json:"has_migrate"`
|
||||
}
|
||||
@@ -1527,17 +1606,19 @@ type ModuleConfig struct {
|
||||
}
|
||||
|
||||
type Node struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Sort int `json:"sort,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Sort int `json:"sort,omitempty"`
|
||||
NodeGroupId int64 `json:"node_group_id,omitempty"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type NodeConfig struct {
|
||||
@@ -1557,6 +1638,29 @@ type NodeDNS struct {
|
||||
Domains []string `json:"domains"`
|
||||
}
|
||||
|
||||
type NodeGroup struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Sort int `json:"sort"`
|
||||
ForCalculation bool `json:"for_calculation"`
|
||||
IsExpiredGroup bool `json:"is_expired_group"`
|
||||
ExpiredDaysLimit int `json:"expired_days_limit"`
|
||||
MaxTrafficGBExpired int64 `json:"max_traffic_gb_expired,omitempty"`
|
||||
SpeedLimit int `json:"speed_limit"`
|
||||
MinTrafficGB int64 `json:"min_traffic_gb,omitempty"`
|
||||
MaxTrafficGB int64 `json:"max_traffic_gb,omitempty"`
|
||||
NodeCount int64 `json:"node_count,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type NodeGroupItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Nodes []Node `json:"nodes"`
|
||||
}
|
||||
|
||||
type NodeOutbound struct {
|
||||
Name string `json:"name"`
|
||||
Protocol string `json:"protocol"`
|
||||
@@ -1774,6 +1878,15 @@ type PreviewSubscribeTemplateResponse struct {
|
||||
Template string `json:"template"` // 预览的模板内容
|
||||
}
|
||||
|
||||
type PreviewUserNodesRequest struct {
|
||||
UserId int64 `form:"user_id" validate:"required"`
|
||||
}
|
||||
|
||||
type PreviewUserNodesResponse struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
NodeGroups []NodeGroupItem `json:"node_groups"`
|
||||
}
|
||||
|
||||
type PrivacyPolicyConfig struct {
|
||||
PrivacyPolicy string `json:"privacy_policy"`
|
||||
}
|
||||
@@ -2055,6 +2168,17 @@ type QuotaTask struct {
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type RecalculateGroupRequest struct {
|
||||
Mode string `json:"mode" validate:"required"`
|
||||
TriggerType string `json:"trigger_type"` // "manual" or "scheduled"
|
||||
}
|
||||
|
||||
type RecalculationState struct {
|
||||
State string `json:"state"`
|
||||
Progress int `json:"progress"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type RechargeOrderRequest struct {
|
||||
Amount int64 `json:"amount" validate:"required,gt=0,lte=2000000000"`
|
||||
Payment int64 `json:"payment"`
|
||||
@@ -2139,15 +2263,21 @@ type ResetAllSubscribeTokenResponse struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type ResetGroupsRequest struct {
|
||||
Confirm bool `json:"confirm" validate:"required"`
|
||||
}
|
||||
|
||||
type ResetPasswordRequest struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Code string `json:"code,optional"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Code string `json:"code,optional"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type ResetSortRequest struct {
|
||||
@@ -2412,6 +2542,9 @@ type Subscribe struct {
|
||||
NewUserOnly bool `json:"new_user_only"`
|
||||
Nodes []int64 `json:"nodes"`
|
||||
NodeTags []string `json:"node_tags"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
NodeGroupId int64 `json:"node_group_id"`
|
||||
TrafficLimit []TrafficLimit `json:"traffic_limit"`
|
||||
Show bool `json:"show"`
|
||||
Sell bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
@@ -2472,6 +2605,11 @@ type SubscribeGroup struct {
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type SubscribeGroupMappingItem struct {
|
||||
SubscribeName string `json:"subscribe_name"`
|
||||
NodeGroupName string `json:"node_group_name"`
|
||||
}
|
||||
|
||||
type SubscribeItem struct {
|
||||
Subscribe
|
||||
Sold int64 `json:"sold"`
|
||||
@@ -2520,6 +2658,8 @@ type TelephoneLoginRequest struct {
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type TelephoneRegisterRequest struct {
|
||||
@@ -2533,6 +2673,8 @@ type TelephoneRegisterRequest struct {
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type,optional"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type TelephoneResetPasswordRequest struct {
|
||||
@@ -2545,6 +2687,8 @@ type TelephoneResetPasswordRequest struct {
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type,optional"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type TestEmailSendRequest struct {
|
||||
@@ -2595,6 +2739,13 @@ type TosConfig struct {
|
||||
TosContent string `json:"tos_content"`
|
||||
}
|
||||
|
||||
type TrafficLimit struct {
|
||||
StatType string `json:"stat_type"`
|
||||
StatValue int64 `json:"stat_value"`
|
||||
TrafficUsage int64 `json:"traffic_usage"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
}
|
||||
|
||||
type TrafficLog struct {
|
||||
Id int64 `json:"id"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
@@ -2731,14 +2882,15 @@ type UpdateFamilyMaxMembersRequest struct {
|
||||
}
|
||||
|
||||
type UpdateNodeRequest struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
Address string `json:"address"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
Protocol string `json:"protocol"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateOrderStatusRequest struct {
|
||||
@@ -2821,6 +2973,9 @@ type UpdateSubscribeRequest struct {
|
||||
NewUserOnly *bool `json:"new_user_only"`
|
||||
Nodes []int64 `json:"nodes"`
|
||||
NodeTags []string `json:"node_tags"`
|
||||
NodeGroupIds []int64 `json:"node_group_ids,omitempty"`
|
||||
NodeGroupId int64 `json:"node_group_id"`
|
||||
TrafficLimit []TrafficLimit `json:"traffic_limit"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
@@ -2975,25 +3130,29 @@ type UserLoginLog struct {
|
||||
}
|
||||
|
||||
type UserLoginRequest struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type UserRegisterRequest struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Invite string `json:"invite,optional"`
|
||||
Code string `json:"code,optional"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Invite string `json:"invite,optional"`
|
||||
Code string `json:"code,optional"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
CaptchaId string `json:"captcha_id,optional"`
|
||||
CaptchaCode string `json:"captcha_code,optional"`
|
||||
}
|
||||
|
||||
type UserStatistics struct {
|
||||
@@ -3041,6 +3200,8 @@ type UserSubscribeDetail struct {
|
||||
OrderId int64 `json:"order_id"`
|
||||
SubscribeId int64 `json:"subscribe_id"`
|
||||
Subscribe Subscribe `json:"subscribe"`
|
||||
NodeGroupId int64 `json:"node_group_id"`
|
||||
GroupLocked bool `json:"group_locked"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
ExpireTime int64 `json:"expire_time"`
|
||||
ResetTime int64 `json:"reset_time"`
|
||||
@@ -3127,10 +3288,12 @@ type UserTrafficData struct {
|
||||
}
|
||||
|
||||
type VeifyConfig struct {
|
||||
TurnstileSiteKey string `json:"turnstile_site_key"`
|
||||
EnableLoginVerify bool `json:"enable_login_verify"`
|
||||
EnableRegisterVerify bool `json:"enable_register_verify"`
|
||||
EnableResetPasswordVerify bool `json:"enable_reset_password_verify"`
|
||||
CaptchaType string `json:"captcha_type"`
|
||||
TurnstileSiteKey string `json:"turnstile_site_key"`
|
||||
EnableUserLoginCaptcha bool `json:"enable_user_login_captcha"`
|
||||
EnableUserRegisterCaptcha bool `json:"enable_user_register_captcha"`
|
||||
EnableAdminLoginCaptcha bool `json:"enable_admin_login_captcha"`
|
||||
EnableUserResetPasswordCaptcha bool `json:"enable_user_reset_password_captcha"`
|
||||
}
|
||||
|
||||
type VerifyCodeConfig struct {
|
||||
@@ -3140,11 +3303,13 @@ type VerifyCodeConfig struct {
|
||||
}
|
||||
|
||||
type VerifyConfig struct {
|
||||
TurnstileSiteKey string `json:"turnstile_site_key"`
|
||||
TurnstileSecret string `json:"turnstile_secret"`
|
||||
EnableLoginVerify bool `json:"enable_login_verify"`
|
||||
EnableRegisterVerify bool `json:"enable_register_verify"`
|
||||
EnableResetPasswordVerify bool `json:"enable_reset_password_verify"`
|
||||
CaptchaType string `json:"captcha_type"` // local or turnstile
|
||||
TurnstileSiteKey string `json:"turnstile_site_key"`
|
||||
TurnstileSecret string `json:"turnstile_secret"`
|
||||
EnableUserLoginCaptcha bool `json:"enable_user_login_captcha"` // User login captcha
|
||||
EnableUserRegisterCaptcha bool `json:"enable_user_register_captcha"` // User register captcha
|
||||
EnableAdminLoginCaptcha bool `json:"enable_admin_login_captcha"` // Admin login captcha
|
||||
EnableUserResetPasswordCaptcha bool `json:"enable_user_reset_password_captcha"` // User reset password captcha
|
||||
}
|
||||
|
||||
type VerifyEmailRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user