/** * Hook d'inscription Mobile SSO v1.0 * Gère le flow: init → verify-otp → complete * * @version 2.7.9 */ import type { MobileRegistrationFormData, AccountType } from '../types/mobile'; interface RegistrationConflict { type: 'email' | 'phone'; masked_identifier: string; options: { can_login: boolean; can_recover_by_email: boolean; can_recover_by_sms: boolean; masked_email?: string; masked_phone?: string; }; } export interface UseMobileRegistrationOptions { saasApiUrl: string; iamApiUrl: string; } export declare function useMobileRegistration(options?: UseMobileRegistrationOptions): { processToken: string | null; status: "pending_password" | "pending_otp" | "pending_registration" | "completed" | "idle"; formData: Partial; loading: boolean; error: string | null; conflict: RegistrationConflict | null; otpMethod: "email" | "sms" | null; otpSentTo: string | null; isCompleted: boolean; hasConflict: boolean; accountType: AccountType; setAccountType: import("react").Dispatch>; isPhoneOnly: boolean; updateFormData: (data: Partial) => void; initRegistration: (data: Omit) => Promise<{ success: boolean; otp_code_dev: string | undefined; otp_method: "email" | "sms" | undefined; otp_sent_to: string | undefined; error_type?: undefined; } | { success: boolean; error_type: string | undefined; otp_code_dev?: undefined; otp_method?: undefined; otp_sent_to?: undefined; } | { success: boolean; otp_code_dev?: undefined; otp_method?: undefined; otp_sent_to?: undefined; error_type?: undefined; }>; verifyOtp: (otpCode: string) => Promise<{ success: boolean; error: string; completed?: undefined; callback_token?: undefined; error_type?: undefined; } | { success: boolean; completed: boolean; callback_token: string; error?: undefined; error_type?: undefined; } | { success: boolean; completed: boolean; error?: undefined; callback_token?: undefined; error_type?: undefined; } | { success: boolean; error_type: string | undefined; error?: undefined; completed?: undefined; callback_token?: undefined; } | { success: boolean; error?: undefined; completed?: undefined; callback_token?: undefined; error_type?: undefined; }>; completeRegistration: (password: string) => Promise<{ success: boolean; error: string; callback_token?: undefined; error_type?: undefined; } | { success: boolean; callback_token: string; error?: undefined; error_type?: undefined; } | { success: boolean; error_type: string | undefined; error?: undefined; callback_token?: undefined; } | { success: boolean; error?: undefined; callback_token?: undefined; error_type?: undefined; }>; completePhoneOnlyRegistration: () => Promise<{ success: boolean; error: string; callback_token?: undefined; error_type?: undefined; } | { success: boolean; callback_token: string; error?: undefined; error_type?: undefined; } | { success: boolean; error_type: string | undefined; error?: undefined; callback_token?: undefined; } | { success: boolean; error?: undefined; callback_token?: undefined; error_type?: undefined; }>; resendOtp: () => Promise<{ success: boolean; error: string; cooldown?: undefined; otp_code_dev?: undefined; otp_method?: undefined; otp_sent_to?: undefined; } | { success: boolean; cooldown: number | undefined; otp_code_dev: string | undefined; otp_method: "email" | "sms" | undefined; otp_sent_to: string | undefined; error?: undefined; } | { success: boolean; error?: undefined; cooldown?: undefined; otp_code_dev?: undefined; otp_method?: undefined; otp_sent_to?: undefined; }>; reset: () => void; clearError: () => void; }; export default useMobileRegistration;