feat(types): update request types with captcha fields

- Add CaptchaId and CaptchaCode to UserLoginRequest
- Add CaptchaId and CaptchaCode to UserRegisterRequest
- Add CaptchaId and CaptchaCode to ResetPasswordRequest
- Add CaptchaId and CaptchaCode to TelephoneLoginRequest
- Add CaptchaId and CaptchaCode to TelephoneUserRegisterRequest
- Add CaptchaId and CaptchaCode to TelephoneResetPasswordRequest
- Add GenerateCaptchaResponse type
- Add AdminLoginRequest and AdminResetPasswordRequest types
This commit is contained in:
EUForest 2026-03-09 22:54:21 +08:00
parent eb327b26b9
commit f224d09d09

View File

@ -774,6 +774,12 @@ type Follow struct {
CreatedAt int64 `json:"created_at"` CreatedAt int64 `json:"created_at"`
} }
type GenerateCaptchaResponse struct {
Id string `json:"id"`
Image string `json:"image"`
Type string `json:"type"`
}
type GetAdsDetailRequest struct { type GetAdsDetailRequest struct {
Id int64 `form:"id"` Id int64 `form:"id"`
} }
@ -2035,6 +2041,8 @@ type ResetPasswordRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"` LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type ResetSortRequest struct { type ResetSortRequest struct {
@ -2403,6 +2411,8 @@ type TelephoneLoginRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"` LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type TelephoneRegisterRequest struct { type TelephoneRegisterRequest struct {
@ -2416,6 +2426,8 @@ type TelephoneRegisterRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type,optional"` LoginType string `header:"Login-Type,optional"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type TelephoneResetPasswordRequest struct { type TelephoneResetPasswordRequest struct {
@ -2428,6 +2440,8 @@ type TelephoneResetPasswordRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type,optional"` LoginType string `header:"Login-Type,optional"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type TestEmailSendRequest struct { type TestEmailSendRequest struct {
@ -2859,6 +2873,8 @@ type UserLoginRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"` LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type UserRegisterRequest struct { type UserRegisterRequest struct {
@ -2871,6 +2887,8 @@ type UserRegisterRequest struct {
UserAgent string `header:"User-Agent"` UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"` LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"` CfToken string `json:"cf_token,optional"`
CaptchaId string `json:"captcha_id,optional"`
CaptchaCode string `json:"captcha_code,optional"`
} }
type UserStatistics struct { type UserStatistics struct {
@ -2893,6 +2911,8 @@ type UserSubscribe struct {
OrderId int64 `json:"order_id"` OrderId int64 `json:"order_id"`
SubscribeId int64 `json:"subscribe_id"` SubscribeId int64 `json:"subscribe_id"`
Subscribe Subscribe `json:"subscribe"` Subscribe Subscribe `json:"subscribe"`
NodeGroupId int64 `json:"node_group_id"`
GroupLocked bool `json:"group_locked"`
StartTime int64 `json:"start_time"` StartTime int64 `json:"start_time"`
ExpireTime int64 `json:"expire_time"` ExpireTime int64 `json:"expire_time"`
FinishedAt int64 `json:"finished_at"` FinishedAt int64 `json:"finished_at"`
@ -2914,6 +2934,8 @@ type UserSubscribeDetail struct {
OrderId int64 `json:"order_id"` OrderId int64 `json:"order_id"`
SubscribeId int64 `json:"subscribe_id"` SubscribeId int64 `json:"subscribe_id"`
Subscribe Subscribe `json:"subscribe"` Subscribe Subscribe `json:"subscribe"`
NodeGroupId int64 `json:"node_group_id"`
GroupLocked bool `json:"group_locked"`
StartTime int64 `json:"start_time"` StartTime int64 `json:"start_time"`
ExpireTime int64 `json:"expire_time"` ExpireTime int64 `json:"expire_time"`
ResetTime int64 `json:"reset_time"` ResetTime int64 `json:"reset_time"`
@ -2997,10 +3019,12 @@ type UserTrafficData struct {
} }
type VeifyConfig struct { type VeifyConfig struct {
CaptchaType string `json:"captcha_type"`
TurnstileSiteKey string `json:"turnstile_site_key"` TurnstileSiteKey string `json:"turnstile_site_key"`
EnableLoginVerify bool `json:"enable_login_verify"` EnableUserLoginCaptcha bool `json:"enable_user_login_captcha"`
EnableRegisterVerify bool `json:"enable_register_verify"` EnableUserRegisterCaptcha bool `json:"enable_user_register_captcha"`
EnableResetPasswordVerify bool `json:"enable_reset_password_verify"` EnableAdminLoginCaptcha bool `json:"enable_admin_login_captcha"`
EnableUserResetPasswordCaptcha bool `json:"enable_user_reset_password_captcha"`
} }
type VerifyCodeConfig struct { type VerifyCodeConfig struct {
@ -3010,11 +3034,13 @@ type VerifyCodeConfig struct {
} }
type VerifyConfig struct { type VerifyConfig struct {
CaptchaType string `json:"captcha_type"` // local or turnstile
TurnstileSiteKey string `json:"turnstile_site_key"` TurnstileSiteKey string `json:"turnstile_site_key"`
TurnstileSecret string `json:"turnstile_secret"` TurnstileSecret string `json:"turnstile_secret"`
EnableLoginVerify bool `json:"enable_login_verify"` EnableUserLoginCaptcha bool `json:"enable_user_login_captcha"` // User login captcha
EnableRegisterVerify bool `json:"enable_register_verify"` EnableUserRegisterCaptcha bool `json:"enable_user_register_captcha"` // User register captcha
EnableResetPasswordVerify bool `json:"enable_reset_password_verify"` 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 { type VerifyEmailRequest struct {