This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package types
|
||||
|
||||
type ContactRequest struct {
|
||||
Name string `json:"name" validate:"required,max=100"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
OtherContact string `json:"other_contact" validate:"max=200"`
|
||||
Notes string `json:"notes" validate:"max=2000"`
|
||||
}
|
||||
|
||||
type GetDownloadLinkRequest struct {
|
||||
InviteCode string `form:"invite_code,optional"`
|
||||
Platform string `form:"platform" validate:"required,oneof=windows mac ios android"`
|
||||
}
|
||||
|
||||
type GetDownloadLinkResponse struct {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
type ReportLogMessageRequest struct {
|
||||
Platform string `json:"platform" validate:"required,max=32"`
|
||||
AppVersion string `json:"app_version" validate:"required,max=64"`
|
||||
OsName string `json:"os_name" validate:"max=64"`
|
||||
OsVersion string `json:"os_version" validate:"max=64"`
|
||||
DeviceId string `json:"device_id" validate:"required,max=255"`
|
||||
UserId int64 `json:"user_id"`
|
||||
SessionId string `json:"session_id" validate:"max=255"`
|
||||
Level uint8 `json:"level"`
|
||||
ErrorCode string `json:"error_code" validate:"max=128"`
|
||||
Message string `json:"message" validate:"required,max=65535"`
|
||||
Stack string `json:"stack" validate:"max=1048576"`
|
||||
Context interface{} `json:"context"`
|
||||
OccurredAt int64 `json:"occurred_at"`
|
||||
}
|
||||
|
||||
type ReportLogMessageResponse struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
type LegacyCheckVerificationCodeRequest struct {
|
||||
Method string `json:"method" form:"method" validate:"omitempty,oneof=email mobile"`
|
||||
Account string `json:"account" form:"account"`
|
||||
Email string `json:"email" form:"email"`
|
||||
Code string `json:"code" form:"code" validate:"required"`
|
||||
Type uint8 `json:"type" form:"type" validate:"required"`
|
||||
}
|
||||
|
||||
type LegacyCheckVerificationCodeResponse struct {
|
||||
Status bool `json:"status"`
|
||||
Exist bool `json:"exist"`
|
||||
}
|
||||
|
||||
type EmailLoginRequest struct {
|
||||
Identifier string `json:"identifier" form:"identifier"`
|
||||
Email string `json:"email" form:"email" validate:"required,email"`
|
||||
Code string `json:"code" form:"code" validate:"required"`
|
||||
Invite string `json:"invite" form:"invite"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional" form:"cf_token"`
|
||||
}
|
||||
+70
-302
@@ -221,19 +221,6 @@ type CheckVerificationCodeRespone struct {
|
||||
Exist bool `json:"exist,omitempty"`
|
||||
}
|
||||
|
||||
type LegacyCheckVerificationCodeRequest struct {
|
||||
Method string `json:"method" form:"method"`
|
||||
Account string `json:"account" form:"account"`
|
||||
Email string `json:"email" form:"email"`
|
||||
Code string `json:"code" form:"code" validate:"required"`
|
||||
Type uint8 `json:"type" form:"type" validate:"required"`
|
||||
}
|
||||
|
||||
type LegacyCheckVerificationCodeResponse struct {
|
||||
Status bool `json:"status"`
|
||||
Exist bool `json:"exist"`
|
||||
}
|
||||
|
||||
type CheckoutOrderRequest struct {
|
||||
OrderNo string `json:"orderNo"`
|
||||
ReturnUrl string `json:"returnUrl,omitempty"`
|
||||
@@ -576,6 +563,11 @@ type DeviceLoginRequest struct {
|
||||
ShortCode string `json:"short_code,optional"`
|
||||
}
|
||||
|
||||
type DissolveFamilyRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type Document struct {
|
||||
Id int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
@@ -615,6 +607,34 @@ type EmailAuthticateConfig struct {
|
||||
DomainSuffixList string `json:"domain_suffix_list"`
|
||||
}
|
||||
|
||||
type FamilyDetail struct {
|
||||
Summary FamilySummary `json:"summary"`
|
||||
Members []FamilyMemberItem `json:"members"`
|
||||
}
|
||||
|
||||
type FamilyMemberItem struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
Identifier string `json:"identifier"`
|
||||
Role uint8 `json:"role"`
|
||||
RoleName string `json:"role_name"`
|
||||
Status uint8 `json:"status"`
|
||||
StatusName string `json:"status_name"`
|
||||
JoinSource string `json:"join_source"`
|
||||
JoinedAt int64 `json:"joined_at"`
|
||||
LeftAt int64 `json:"left_at,omitempty"`
|
||||
}
|
||||
|
||||
type FamilySummary struct {
|
||||
FamilyId int64 `json:"family_id"`
|
||||
OwnerUserId int64 `json:"owner_user_id"`
|
||||
OwnerIdentifier string `json:"owner_identifier"`
|
||||
Status string `json:"status"`
|
||||
ActiveMemberCount int64 `json:"active_member_count"`
|
||||
MaxMembers int64 `json:"max_members"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type FilterBalanceLogRequest struct {
|
||||
FilterLogParams
|
||||
UserId int64 `form:"user_id,optional"`
|
||||
@@ -887,6 +907,25 @@ type GetDocumentListResponse struct {
|
||||
List []Document `json:"list"`
|
||||
}
|
||||
|
||||
type GetFamilyDetailRequest struct {
|
||||
Id int64 `form:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type GetFamilyListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Keyword string `form:"keyword,omitempty"`
|
||||
Status string `form:"status,omitempty"`
|
||||
OwnerUserId *int64 `form:"owner_user_id,omitempty"`
|
||||
FamilyId *int64 `form:"family_id,omitempty"`
|
||||
UserId *int64 `form:"user_id,omitempty"`
|
||||
}
|
||||
|
||||
type GetFamilyListResponse struct {
|
||||
List []FamilySummary `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type GetGlobalConfigResponse struct {
|
||||
Site SiteConfig `json:"site"`
|
||||
Verify VeifyConfig `json:"verify"`
|
||||
@@ -894,6 +933,7 @@ type GetGlobalConfigResponse struct {
|
||||
Invite InviteConfig `json:"invite"`
|
||||
Currency Currency `json:"currency"`
|
||||
Subscribe SubscribeConfig `json:"subscribe"`
|
||||
Signature SignatureConfig `json:"signature"`
|
||||
VerifyCode PubilcVerifyCodeConfig `json:"verify_code"`
|
||||
OAuthMethods []string `json:"oauth_methods"`
|
||||
WebAd bool `json:"web_ad"`
|
||||
@@ -1188,41 +1228,6 @@ type GetUserSubscribeResetTrafficLogsResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type GetFamilyListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Keyword string `form:"keyword,omitempty"`
|
||||
Status string `form:"status,omitempty"`
|
||||
OwnerUserId *int64 `form:"owner_user_id,omitempty"`
|
||||
FamilyId *int64 `form:"family_id,omitempty"`
|
||||
UserId *int64 `form:"user_id,omitempty"`
|
||||
}
|
||||
|
||||
type GetFamilyListResponse struct {
|
||||
List []FamilySummary `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type GetFamilyDetailRequest struct {
|
||||
Id int64 `form:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type UpdateFamilyMaxMembersRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
MaxMembers int64 `json:"max_members" validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
type RemoveFamilyMemberRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
UserId int64 `json:"user_id" validate:"required,gt=0"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type DissolveFamilyRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type GetUserSubscribeTrafficLogsRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
@@ -1706,10 +1711,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"`
|
||||
Page int `form:"page" validate:"required"`
|
||||
Size int `form:"size" validate:"required"`
|
||||
}
|
||||
|
||||
type QueryOrderListResponse struct {
|
||||
@@ -1932,6 +1935,12 @@ type RegisterLog struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
||||
type RemoveFamilyMemberRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
UserId int64 `json:"user_id" validate:"required,gt=0"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type RenewalOrderRequest struct {
|
||||
UserSubscribeID int64 `json:"user_subscribe_id"`
|
||||
Quantity int64 `json:"quantity" validate:"lte=1000"`
|
||||
@@ -2163,6 +2172,10 @@ type ShadowsocksProtocol struct {
|
||||
Method string `json:"method"`
|
||||
}
|
||||
|
||||
type SignatureConfig struct {
|
||||
EnableSignature bool `json:"enable_signature"`
|
||||
}
|
||||
|
||||
type SiteConfig struct {
|
||||
Host string `json:"host"`
|
||||
SiteName string `json:"site_name"`
|
||||
@@ -2523,6 +2536,11 @@ type UpdateDocumentRequest struct {
|
||||
Show *bool `json:"show"`
|
||||
}
|
||||
|
||||
type UpdateFamilyMaxMembersRequest struct {
|
||||
FamilyId int64 `json:"family_id" validate:"required,gt=0"`
|
||||
MaxMembers int64 `json:"max_members" validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
type UpdateNodeRequest struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@@ -2699,7 +2717,6 @@ type User struct {
|
||||
GiftAmount int64 `json:"gift_amount"`
|
||||
Telegram int64 `json:"telegram"`
|
||||
ReferCode string `json:"refer_code"`
|
||||
ShareLink string `json:"share_link,omitempty"`
|
||||
RefererId int64 `json:"referer_id"`
|
||||
Enable bool `json:"enable"`
|
||||
IsAdmin bool `json:"is_admin,omitempty"`
|
||||
@@ -2716,8 +2733,6 @@ type User struct {
|
||||
IsDel bool `json:"is_del,omitempty"`
|
||||
Remark string `json:"remark,omitempty"`
|
||||
PurchasedPackage string `json:"purchased_package,omitempty"`
|
||||
LastLoginTime int64 `json:"last_login_time"`
|
||||
MemberStatus string `json:"member_status"`
|
||||
FamilyJoined bool `json:"family_joined,omitempty"`
|
||||
FamilyId int64 `json:"family_id,omitempty"`
|
||||
FamilyRole uint8 `json:"family_role,omitempty"`
|
||||
@@ -2761,34 +2776,6 @@ type UserLoginLog struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
||||
type FamilySummary struct {
|
||||
FamilyId int64 `json:"family_id"`
|
||||
OwnerUserId int64 `json:"owner_user_id"`
|
||||
OwnerIdentifier string `json:"owner_identifier"`
|
||||
Status string `json:"status"`
|
||||
ActiveMemberCount int64 `json:"active_member_count"`
|
||||
MaxMembers int64 `json:"max_members"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type FamilyMemberItem struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
Identifier string `json:"identifier"`
|
||||
Role uint8 `json:"role"`
|
||||
RoleName string `json:"role_name"`
|
||||
Status uint8 `json:"status"`
|
||||
StatusName string `json:"status_name"`
|
||||
JoinSource string `json:"join_source"`
|
||||
JoinedAt int64 `json:"joined_at"`
|
||||
LeftAt int64 `json:"left_at,omitempty"`
|
||||
}
|
||||
|
||||
type FamilyDetail struct {
|
||||
Summary FamilySummary `json:"summary"`
|
||||
Members []FamilyMemberItem `json:"members"`
|
||||
}
|
||||
|
||||
type UserLoginRequest struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
@@ -2844,7 +2831,6 @@ type UserSubscribe struct {
|
||||
EntitlementOwnerUserId int64 `json:"entitlement_owner_user_id"`
|
||||
ReadOnly bool `json:"read_only"`
|
||||
Short string `json:"short"`
|
||||
IsGift bool `json:"is_gift"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
@@ -3023,221 +3009,3 @@ type WithdrawalLog struct {
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type EmailLoginRequest struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
Invite string `json:"invite,optional"`
|
||||
IP string `header:"X-Original-Forwarded-For"`
|
||||
UserAgent string `header:"User-Agent"`
|
||||
LoginType string `header:"Login-Type"`
|
||||
CfToken string `json:"cf_token,optional"`
|
||||
}
|
||||
|
||||
type BindEmailWithVerificationRequest struct {
|
||||
Email string `json:"email" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
type BindEmailWithVerificationResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Token string `json:"token,omitempty"`
|
||||
UserId int64 `json:"user_id,omitempty"`
|
||||
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" validate:"required"`
|
||||
}
|
||||
|
||||
type GetSubscribeStatusResponse struct {
|
||||
DeviceStatus bool `json:"device_status"`
|
||||
EmailStatus bool `json:"email_status"`
|
||||
}
|
||||
|
||||
type GetSubscribeStatusRequest struct {
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
}
|
||||
|
||||
type DeleteAccountResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message,omitempty"`
|
||||
UserId int64 `json:"user_id"`
|
||||
Code int `json:"code"`
|
||||
}
|
||||
|
||||
type GetDownloadLinkRequest struct {
|
||||
InviteCode string `form:"invite_code,optional"`
|
||||
Platform string `form:"platform" validate:"required,oneof=windows mac ios android"`
|
||||
}
|
||||
|
||||
type GetDownloadLinkResponse struct {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
type ContactRequest struct {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
OtherContact string `json:"other_contact,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
||||
type ReportLogMessageRequest struct {
|
||||
Platform string `json:"platform" validate:"required"`
|
||||
AppVersion string `json:"appVersion"`
|
||||
OsName string `json:"osName"`
|
||||
OsVersion string `json:"osVersion"`
|
||||
DeviceId string `json:"deviceId"`
|
||||
UserId int64 `json:"userId"`
|
||||
SessionId string `json:"sessionId"`
|
||||
Level uint8 `json:"level"`
|
||||
ErrorCode string `json:"errorCode"`
|
||||
Message string `json:"message" validate:"required"`
|
||||
Stack string `json:"stack"`
|
||||
Context map[string]interface{} `json:"context"`
|
||||
OccurredAt int64 `json:"occurredAt"`
|
||||
}
|
||||
|
||||
type ReportLogMessageResponse struct {
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
|
||||
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"`
|
||||
Context map[string]interface{} `json:"context"`
|
||||
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 AttachAppleTransactionRequest struct {
|
||||
SignedTransactionJWS string `json:"signed_transaction_jws" validate:"required"`
|
||||
DurationDays int64 `json:"duration_days,omitempty"`
|
||||
Tier string `json:"tier,omitempty"`
|
||||
SubscribeId int64 `json:"subscribe_id,omitempty"`
|
||||
OrderNo string `json:"order_no" validate:"required"`
|
||||
}
|
||||
|
||||
type AttachAppleTransactionResponse struct {
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
Tier string `json:"tier"`
|
||||
}
|
||||
|
||||
type AttachAppleTransactionByIdRequest struct {
|
||||
TransactionId string `json:"transaction_id" validate:"required"`
|
||||
OrderNo string `json:"order_no" validate:"required"`
|
||||
Sandbox *bool `json:"sandbox,omitempty"`
|
||||
}
|
||||
|
||||
type RestoreAppleTransactionsRequest struct {
|
||||
Transactions []string `json:"transactions" validate:"required"`
|
||||
}
|
||||
|
||||
type GetAppleStatusResponse struct {
|
||||
Active bool `json:"active"`
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
Tier string `json:"tier"`
|
||||
}
|
||||
|
||||
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 GetAgentDownloadsRequest struct{}
|
||||
|
||||
type GetAgentDownloadsResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
Platforms *PlatformDownloads `json:"platforms"`
|
||||
ComparisonRate *string `json:"comparison_rate,omitempty"`
|
||||
}
|
||||
|
||||
type PlatformDownloads struct {
|
||||
IOS int64 `json:"ios"`
|
||||
Android int64 `json:"android"`
|
||||
Windows int64 `json:"windows"`
|
||||
Mac int64 `json:"mac"`
|
||||
}
|
||||
|
||||
type GetUserInviteStatsRequest struct{}
|
||||
|
||||
type GetUserInviteStatsResponse struct {
|
||||
FriendlyCount int64 `json:"friendly_count"`
|
||||
HistoryCount int64 `json:"history_count"`
|
||||
}
|
||||
|
||||
type GetInviteSalesRequest struct {
|
||||
Page int `form:"page" validate:"required"`
|
||||
Size int `form:"size" validate:"required"`
|
||||
StartTime int64 `form:"start_time,optional"`
|
||||
EndTime int64 `form:"end_time,optional"`
|
||||
}
|
||||
|
||||
type GetInviteSalesResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []InvitedUserSale `json:"list"`
|
||||
}
|
||||
|
||||
type InvitedUserSale struct {
|
||||
Amount float64 `json:"amount"`
|
||||
UpdatedAt int64 `json:"update_at"`
|
||||
UserHash string `json:"user_hash"`
|
||||
ProductName string `json:"product_name"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user