✨ feat(log): Add message log retrieval functionality and update related typings
This commit is contained in:
@@ -24,12 +24,9 @@ import { toast } from 'sonner';
|
||||
import { z } from 'zod';
|
||||
|
||||
function MobileBindDialog({
|
||||
method,
|
||||
|
||||
onSuccess,
|
||||
children,
|
||||
}: {
|
||||
method?: API.UserAuthMethod;
|
||||
onSuccess: () => void;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
@@ -47,8 +44,8 @@ function MobileBindDialog({
|
||||
const form = useForm<MobileBindFormValues>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
area_code: method?.area_code || '1',
|
||||
mobile: method?.auth_identifier || '',
|
||||
area_code: '1',
|
||||
mobile: '',
|
||||
code: '',
|
||||
},
|
||||
});
|
||||
@@ -270,7 +267,7 @@ export default function ThirdPartyAccounts() {
|
||||
}}
|
||||
/>
|
||||
{account.id === 'mobile' ? (
|
||||
<MobileBindDialog method={method} onSuccess={getUserInfo}>
|
||||
<MobileBindDialog onSuccess={getUserInfo}>
|
||||
<Button
|
||||
variant={method?.auth_identifier ? 'outline' : 'default'}
|
||||
className='whitespace-nowrap'
|
||||
|
||||
@@ -32,6 +32,7 @@ export async function appleLoginCallback(
|
||||
return request<API.Response & { data?: any }>('/v1/auth/oauth/callback/apple', {
|
||||
method: 'POST',
|
||||
data: formData,
|
||||
requestType: 'form',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
+15
@@ -193,6 +193,18 @@ declare namespace API {
|
||||
token: string;
|
||||
};
|
||||
|
||||
type MessageLog = {
|
||||
id: number;
|
||||
type: string;
|
||||
platform: string;
|
||||
to: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
status: number;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type MobileAuthenticateConfig = {
|
||||
enable: boolean;
|
||||
limit: number;
|
||||
@@ -300,6 +312,9 @@ declare namespace API {
|
||||
type RegisterConfig = {
|
||||
stop_register: boolean;
|
||||
enable_trial: boolean;
|
||||
trial_subscribe: number;
|
||||
trial_time: number;
|
||||
trial_time_unit: string;
|
||||
enable_ip_register_limit: boolean;
|
||||
ip_register_limit: number;
|
||||
ip_register_limit_duration: number;
|
||||
|
||||
Vendored
+15
@@ -250,6 +250,18 @@ declare namespace API {
|
||||
only_first_purchase: boolean;
|
||||
};
|
||||
|
||||
type MessageLog = {
|
||||
id: number;
|
||||
type: string;
|
||||
platform: string;
|
||||
to: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
status: number;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type MobileAuthenticateConfig = {
|
||||
enable: boolean;
|
||||
limit: number;
|
||||
@@ -493,6 +505,9 @@ declare namespace API {
|
||||
type RegisterConfig = {
|
||||
stop_register: boolean;
|
||||
enable_trial: boolean;
|
||||
trial_subscribe: number;
|
||||
trial_time: number;
|
||||
trial_time_unit: string;
|
||||
enable_ip_register_limit: boolean;
|
||||
ip_register_limit: number;
|
||||
ip_register_limit_duration: number;
|
||||
|
||||
Reference in New Issue
Block a user