feat(auth): Add SMS and email configuration options to global store and update localization

This commit is contained in:
web@ppanel
2025-01-15 15:49:11 +07:00
parent 9b8258ce5a
commit 4acf7b1837
52 changed files with 675 additions and 385 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';
+22 -4
View File
@@ -35,6 +35,12 @@ declare namespace API {
ios: Application[];
};
type AuthConfig = {
sms: SmsAuthenticateConfig;
email: EmailAuthticateConfig;
register: RegisterConfig;
};
type BatchDeleteCouponRequest = {
ids: number[];
};
@@ -122,6 +128,8 @@ declare namespace API {
type CreateNodeRequest = {
name: string;
tags: string[];
country: string;
city: string;
server_addr: string;
relay_mode: string;
relay_node: NodeRelay[];
@@ -252,7 +260,14 @@ declare namespace API {
updated_at: number;
};
type EmailAuthticateConfig = {
email_enable_verify: boolean;
email_enable_domain_suffix: boolean;
email_domain_suffix_list: string;
};
type EmailSmtpConfig = {
email_enabled: boolean;
email_smtp_host: string;
email_smtp_port: number;
email_smtp_user: string;
@@ -262,6 +277,9 @@ declare namespace API {
verify_email_template: string;
maintenance_email_template: string;
expiration_email_template: string;
email_enable_verify: boolean;
email_enable_domain_suffix: boolean;
email_domain_suffix_list: string;
};
type EpayConfig = {
@@ -634,13 +652,9 @@ declare namespace API {
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
enable_email_verify: boolean;
enable_email_domain_suffix: boolean;
email_domain_suffix_list: string;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;
sms: SmsAuthenticateConfig;
};
type Response = {
@@ -678,6 +692,8 @@ declare namespace API {
type Server = {
id: number;
tags: string[];
country: string;
city: string;
name: string;
server_addr: string;
relay_mode: string;
@@ -1018,6 +1034,8 @@ declare namespace API {
type UpdateNodeRequest = {
id: number;
tags: string[];
country: string;
city: string;
name: string;
server_addr: string;
relay_mode: string;
+19 -5
View File
@@ -27,6 +27,12 @@ declare namespace API {
ios: Application[];
};
type AuthConfig = {
sms: SmsAuthenticateConfig;
email: EmailAuthticateConfig;
register: RegisterConfig;
};
type CheckUserParams = {
email: string;
};
@@ -75,7 +81,14 @@ declare namespace API {
updated_at: number;
};
type EmailAuthticateConfig = {
email_enable_verify: boolean;
email_enable_domain_suffix: boolean;
email_domain_suffix_list: string;
};
type EmailSmtpConfig = {
email_enabled: boolean;
email_smtp_host: string;
email_smtp_port: number;
email_smtp_user: string;
@@ -85,6 +98,9 @@ declare namespace API {
verify_email_template: string;
maintenance_email_template: string;
expiration_email_template: string;
email_enable_verify: boolean;
email_enable_domain_suffix: boolean;
email_domain_suffix_list: string;
};
type Follow = {
@@ -99,7 +115,7 @@ declare namespace API {
type GetGlobalConfigResponse = {
site: SiteConfig;
verify: VeifyConfig;
register: RegisterConfig;
auth: AuthConfig;
invite: InviteConfig;
currency: CurrencyConfig;
subscribe: SubscribeConfig;
@@ -222,13 +238,9 @@ declare namespace API {
type RegisterConfig = {
stop_register: boolean;
enable_trial: boolean;
enable_email_verify: boolean;
enable_email_domain_suffix: boolean;
email_domain_suffix_list: string;
enable_ip_register_limit: boolean;
ip_register_limit: number;
ip_register_limit_duration: number;
sms: SmsAuthenticateConfig;
};
type ResetPasswordRequest = {
@@ -275,6 +287,8 @@ declare namespace API {
type Server = {
id: number;
tags: string[];
country: string;
city: string;
name: string;
server_addr: string;
relay_mode: string;