@truworth/twc-auth 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/animation/redirect-home.json +1101 -0
- package/build/assets/cross_icon copy.svg +5 -0
- package/build/assets/cross_icon.svg +5 -0
- package/build/assets/email_icon.svg +6 -0
- package/build/assets/gender-diversity.svg +22 -0
- package/build/assets/loading-spinner.json +1 -0
- package/build/assets/logo.svg +55 -0
- package/build/assets/okay_icon.svg +3 -0
- package/build/src/api/auth.js +36 -0
- package/build/src/api/axiosClient/index.js +5 -0
- package/build/src/api/axiosClient/index.native.js +5 -0
- package/build/src/components/AdvancedTransitionWrapper/index.js +374 -0
- package/build/src/components/AdvancedTransitionWrapper/index.native.js +10 -0
- package/build/src/components/AdvancedTransitionWrapper/types.js +1 -0
- package/build/src/components/ConfirmationModal/index.js +11 -0
- package/build/src/components/ConfirmationModal/index.native.js +15 -0
- package/build/src/components/ConfirmationModal/types.js +1 -0
- package/build/src/components/IonIcon/index.js +11 -0
- package/build/src/components/IonIcon/index.native.js +9 -0
- package/build/src/components/IonIcon/types.js +1 -0
- package/build/src/components/LoadingAnimation/index.js +50 -0
- package/build/src/components/OTPStatusLabel/index.js +10 -0
- package/build/src/components/OTPStatusLabel/index.native.js +21 -0
- package/build/src/components/OTPStatusLabel/types.js +1 -0
- package/build/src/components/PasswordCriteria/hooks/usePasswordCriteria.js +71 -0
- package/build/src/components/PasswordCriteria/index.js +47 -0
- package/build/src/components/PasswordCriteria/index.native.js +22 -0
- package/build/src/components/PasswordCriteria/types.js +1 -0
- package/build/src/components/ScreenLayout/index.js +12 -0
- package/build/src/components/ScreenLayout/index.native.js +18 -0
- package/build/src/components/ScreenLayout/types.js +1 -0
- package/build/src/components/SupportDetails/index.js +9 -0
- package/build/src/components/SupportDetails/index.native.js +6 -0
- package/build/src/components/VerifyEmailOTP/index.js +20 -0
- package/build/src/components/VerifyEmailOTP/index.native.js +22 -0
- package/build/src/components/VerifyEmailOTP/types.js +1 -0
- package/build/src/components/VerifyMobileOTP/index.js +25 -0
- package/build/src/components/VerifyMobileOTP/index.native.js +38 -0
- package/build/src/components/VerifyMobileOTP/types.js +1 -0
- package/build/src/constants/base-url/index.js +5 -0
- package/build/src/constants/base-url/index.native.js +1 -0
- package/build/src/constants/cdn-url/index.js +2 -0
- package/build/src/constants/cdn-url/index.native.js +5 -0
- package/build/src/constants/defaultPolicy.js +9 -0
- package/build/src/constants/password-requirements.js +7 -0
- package/build/src/constants/social-login-options.js +16 -0
- package/build/src/contexts/AuthContext.js +192 -0
- package/build/src/contexts/type.js +1 -0
- package/build/src/enums/index.js +3 -0
- package/build/src/enums/loginMethod.enum.js +8 -0
- package/build/src/enums/registrationMethod.enum.js +7 -0
- package/build/src/enums/socialLogins.enum.js +6 -0
- package/build/src/helpers/network.js +93 -0
- package/build/src/helpers/show-message/index.js +19 -0
- package/build/src/helpers/show-message/index.native.js +14 -0
- package/build/src/helpers/show-message/types.js +1 -0
- package/build/src/helpers/types.js +1 -0
- package/build/src/helpers/validation.js +12 -0
- package/build/src/hooks/internal/useAuthPackageContext.js +9 -0
- package/build/src/hooks/internal/useTimer.js +40 -0
- package/build/src/hooks/useAuthContext.js +10 -0
- package/build/src/hooks/useNavigator.js +83 -0
- package/build/src/hooks/useRequest.js +34 -0
- package/build/src/index.js +23 -0
- package/build/src/navigator/index.js +10 -0
- package/build/src/navigator/index.native.js +27 -0
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/index.js +37 -0
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/index.native.js +6 -0
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/types.js +1 -0
- package/build/src/screens/CountryCode/hooks/internal/useCountryCode.js +38 -0
- package/build/src/screens/CountryCode/index.js +10 -0
- package/build/src/screens/CountryCode/index.native.js +37 -0
- package/build/src/screens/CountryCode/type.js +1 -0
- package/build/src/screens/CreatePassword/hooks/internal/useCreatePassword.js +46 -0
- package/build/src/screens/CreatePassword/index.js +19 -0
- package/build/src/screens/CreatePassword/index.native.js +32 -0
- package/build/src/screens/CreatePassword/type.js +1 -0
- package/build/src/screens/EnterEmail/hooks/internal/useEnterEmail.js +77 -0
- package/build/src/screens/EnterEmail/index.js +58 -0
- package/build/src/screens/EnterEmail/index.native.js +31 -0
- package/build/src/screens/EnterEmail/types.js +1 -0
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/hooks/internal/useExistingAccountsSheet.js +36 -0
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/index.js +33 -0
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/index.native.js +73 -0
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/types.js +1 -0
- package/build/src/screens/EnterMobile/hooks/internal/useEnterMobile.js +70 -0
- package/build/src/screens/EnterMobile/index.js +82 -0
- package/build/src/screens/EnterMobile/index.native.js +56 -0
- package/build/src/screens/EnterMobile/types.js +1 -0
- package/build/src/screens/EnterPassword/hooks/internal/useEnterPassword.js +79 -0
- package/build/src/screens/EnterPassword/index.js +68 -0
- package/build/src/screens/EnterPassword/index.native.js +41 -0
- package/build/src/screens/EnterPassword/types.js +1 -0
- package/build/src/screens/Login/components/LoginWebComponent/index.js +63 -0
- package/build/src/screens/Login/components/LoginWebComponent/index.native.js +6 -0
- package/build/src/screens/Login/index.js +10 -0
- package/build/src/screens/Login/index.native.js +6 -0
- package/build/src/screens/LoginWithEmailOTP/hooks/internal/useLoginWithEmailOTP.js +85 -0
- package/build/src/screens/LoginWithEmailOTP/index.js +8 -0
- package/build/src/screens/LoginWithEmailOTP/index.native.js +10 -0
- package/build/src/screens/LoginWithMobileOTP/hooks/internal/useLoginWithMobileOTP.js +72 -0
- package/build/src/screens/LoginWithMobileOTP/index.js +8 -0
- package/build/src/screens/LoginWithMobileOTP/index.native.js +10 -0
- package/build/src/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.js +71 -0
- package/build/src/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.native.js +6 -0
- package/build/src/screens/PartnerSSO/PartnerLogin/hooks/internal/usePartnerLogin.js +52 -0
- package/build/src/screens/PartnerSSO/PartnerLogin/index.js +2 -0
- package/build/src/screens/PartnerSSO/PartnerLogin/types.js +1 -0
- package/build/src/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.js +207 -0
- package/build/src/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.native.js +6 -0
- package/build/src/screens/PartnerSSO/PartnerRegistration/hooks/internal/usePartnerRegistration.js +90 -0
- package/build/src/screens/PartnerSSO/PartnerRegistration/index.js +2 -0
- package/build/src/screens/PartnerSSO/PartnerRegistration/types.js +1 -0
- package/build/src/screens/PartnerSSO/index.js +2 -0
- package/build/src/screens/Profile/components/EditMobileNumber/index.js +31 -0
- package/build/src/screens/Profile/components/EditMobileNumber/index.native.js +8 -0
- package/build/src/screens/Profile/components/EditPassword/index.js +29 -0
- package/build/src/screens/Profile/components/EditPassword/index.native.js +8 -0
- package/build/src/screens/Profile/components/EditProfile/index.js +89 -0
- package/build/src/screens/Profile/components/EditProfile/index.native.js +8 -0
- package/build/src/screens/Profile/components/OtpVerificationModal/index.js +61 -0
- package/build/src/screens/Profile/components/OtpVerificationModal/index.native.js +7 -0
- package/build/src/screens/Profile/components/ProfileWebComponent/index.js +80 -0
- package/build/src/screens/Profile/components/ProfileWebComponent/index.native.js +9 -0
- package/build/src/screens/Profile/hooks/internal/useProfile.js +185 -0
- package/build/src/screens/Profile/index.js +6 -0
- package/build/src/screens/Profile/index.native.js +6 -0
- package/build/src/screens/Profile/types.js +1 -0
- package/build/src/screens/ResetPassword/hooks/internal/useResetPassword.js +57 -0
- package/build/src/screens/ResetPassword/index.js +46 -0
- package/build/src/screens/ResetPassword/index.native.js +26 -0
- package/build/src/screens/ResetPassword/types.js +1 -0
- package/build/src/screens/SSOLogin/AuthWebView/index.js +9 -0
- package/build/src/screens/SSOLogin/AuthWebView/index.native.js +42 -0
- package/build/src/screens/SSOLogin/AuthWebView/types.js +1 -0
- package/build/src/screens/SSOLogin/AuthenticationMethods/hooks/internal/useSSOAuthenticationMethods.js +39 -0
- package/build/src/screens/SSOLogin/AuthenticationMethods/index.js +50 -0
- package/build/src/screens/SSOLogin/AuthenticationMethods/index.native.js +59 -0
- package/build/src/screens/SSOLogin/AuthenticationMethods/types.js +1 -0
- package/build/src/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.js +62 -0
- package/build/src/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.native.js +6 -0
- package/build/src/screens/SSOLogin/SSOCallback/hooks/internal/useSSOCallback.js +58 -0
- package/build/src/screens/SSOLogin/SSOCallback/index.js +9 -0
- package/build/src/screens/SSOLogin/SSOCallback/index.native.js +35 -0
- package/build/src/screens/SSOLogin/SSOCallback/types.js +1 -0
- package/build/src/screens/SSOLogin/SearchOrganization/hooks/internal/useSSOSearchOrganization.js +71 -0
- package/build/src/screens/SSOLogin/SearchOrganization/index.js +46 -0
- package/build/src/screens/SSOLogin/SearchOrganization/index.native.js +37 -0
- package/build/src/screens/SSOLogin/SearchOrganization/types.js +1 -0
- package/build/src/screens/SignUp/components/SignUpForm/index.js +215 -0
- package/build/src/screens/SignUp/components/SignUpForm/index.native.js +6 -0
- package/build/src/screens/SignUp/components/SignUpForm/type.js +1 -0
- package/build/src/screens/SignUp/components/SignUpWebComponent/index.js +62 -0
- package/build/src/screens/SignUp/components/SignUpWebComponent/index.native.js +6 -0
- package/build/src/screens/SignUp/components/SignUpWebComponent/types.js +1 -0
- package/build/src/screens/SignUp/hooks/internal/useSignUp.js +134 -0
- package/build/src/screens/SignUp/index.js +6 -0
- package/build/src/screens/SignUp/index.native.js +188 -0
- package/build/src/screens/SignUp/types.js +1 -0
- package/build/src/screens/UserConsent/hooks/internal/useConsent.js +64 -0
- package/build/src/screens/UserConsent/index.js +84 -0
- package/build/src/screens/UserConsent/index.native.js +47 -0
- package/build/src/screens/UserConsent/types.js +1 -0
- package/build/src/screens/VerifyEmail/hooks/internal/useVerifyEmail.js +69 -0
- package/build/src/screens/VerifyEmail/index.js +8 -0
- package/build/src/screens/VerifyEmail/index.native.js +14 -0
- package/build/src/screens/VerifyEmail/types.js +1 -0
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/hooks/internal/useVerifyLinkPrimaryAccountEmailOTP.js +73 -0
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/index.js +8 -0
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/index.native.js +14 -0
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/types.js +1 -0
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/hooks/internal/useVerifyLinkPrimaryAccountMobileOTP.js +83 -0
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/index.js +8 -0
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/index.native.js +10 -0
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/types.js +1 -0
- package/build/src/screens/VerifyMobile/hooks/internal/useVerifyMobile.js +74 -0
- package/build/src/screens/VerifyMobile/index.js +8 -0
- package/build/src/screens/VerifyMobile/index.native.js +9 -0
- package/build/src/screens/VerifyMobile/types.js +1 -0
- package/build/src/screens/VerifyResetPasswordOTP/hooks/internal/useVerifyResetPasswordOTP.js +74 -0
- package/build/src/screens/VerifyResetPasswordOTP/index.js +8 -0
- package/build/src/screens/VerifyResetPasswordOTP/index.native.js +14 -0
- package/build/src/screens/Welcome/SocialAuth/commonSocialAuth.js +127 -0
- package/build/src/screens/Welcome/SocialAuth/hooks/useSocialAuth.native.js +187 -0
- package/build/src/screens/Welcome/SocialAuth/hooks/useSocialAuth.web.js +13 -0
- package/build/src/screens/Welcome/SocialAuth/hooks/web/useFacebookAuth.web.js +115 -0
- package/build/src/screens/Welcome/SocialAuth/hooks/web/useGoogleAuth.web.js +72 -0
- package/build/src/screens/Welcome/components/SocialLoginModal/index.js +9 -0
- package/build/src/screens/Welcome/components/SocialLoginModal/index.native.js +21 -0
- package/build/src/screens/Welcome/components/SocialLoginModal/types.js +1 -0
- package/build/src/screens/Welcome/hooks/internal/useWelcome.js +26 -0
- package/build/src/screens/Welcome/index.js +28 -0
- package/build/src/screens/Welcome/index.native.js +78 -0
- package/build/src/types/types.js +2 -0
- package/build/types/api/auth.d.ts +11 -0
- package/build/types/api/axiosClient/index.d.ts +1 -0
- package/build/types/api/axiosClient/index.native.d.ts +1 -0
- package/build/types/components/AdvancedTransitionWrapper/index.d.ts +3 -0
- package/build/types/components/AdvancedTransitionWrapper/index.native.d.ts +5 -0
- package/build/types/components/AdvancedTransitionWrapper/types.d.ts +25 -0
- package/build/types/components/ConfirmationModal/index.d.ts +3 -0
- package/build/types/components/ConfirmationModal/index.native.d.ts +3 -0
- package/build/types/components/ConfirmationModal/types.d.ts +16 -0
- package/build/types/components/IonIcon/index.d.ts +3 -0
- package/build/types/components/IonIcon/index.native.d.ts +4 -0
- package/build/types/components/IonIcon/types.d.ts +6 -0
- package/build/types/components/LoadingAnimation/index.d.ts +6 -0
- package/build/types/components/OTPStatusLabel/index.d.ts +2 -0
- package/build/types/components/OTPStatusLabel/index.native.d.ts +3 -0
- package/build/types/components/OTPStatusLabel/types.d.ts +6 -0
- package/build/types/components/PasswordCriteria/hooks/usePasswordCriteria.d.ts +8 -0
- package/build/types/components/PasswordCriteria/index.d.ts +3 -0
- package/build/types/components/PasswordCriteria/index.native.d.ts +3 -0
- package/build/types/components/PasswordCriteria/types.d.ts +15 -0
- package/build/types/components/ScreenLayout/index.d.ts +3 -0
- package/build/types/components/ScreenLayout/index.native.d.ts +3 -0
- package/build/types/components/ScreenLayout/types.d.ts +13 -0
- package/build/types/components/SupportDetails/index.d.ts +2 -0
- package/build/types/components/SupportDetails/index.native.d.ts +2 -0
- package/build/types/components/VerifyEmailOTP/index.d.ts +3 -0
- package/build/types/components/VerifyEmailOTP/index.native.d.ts +3 -0
- package/build/types/components/VerifyEmailOTP/types.d.ts +9 -0
- package/build/types/components/VerifyMobileOTP/index.d.ts +3 -0
- package/build/types/components/VerifyMobileOTP/index.native.d.ts +3 -0
- package/build/types/components/VerifyMobileOTP/types.d.ts +9 -0
- package/build/types/constants/base-url/index.d.ts +1 -0
- package/build/types/constants/base-url/index.native.d.ts +1 -0
- package/build/types/constants/cdn-url/index.d.ts +2 -0
- package/build/types/constants/cdn-url/index.native.d.ts +3 -0
- package/build/types/constants/defaultPolicy.d.ts +9 -0
- package/build/types/constants/password-requirements.d.ts +4 -0
- package/build/types/constants/social-login-options.d.ts +3 -0
- package/build/types/contexts/AuthContext.d.ts +40 -0
- package/build/types/contexts/type.d.ts +94 -0
- package/build/types/enums/index.d.ts +3 -0
- package/build/types/enums/loginMethod.enum.d.ts +7 -0
- package/build/types/enums/registrationMethod.enum.d.ts +6 -0
- package/build/types/enums/socialLogins.enum.d.ts +5 -0
- package/build/types/helpers/network.d.ts +5 -0
- package/build/types/helpers/show-message/index.d.ts +3 -0
- package/build/types/helpers/show-message/index.native.d.ts +3 -0
- package/build/types/helpers/show-message/types.d.ts +6 -0
- package/build/types/helpers/types.d.ts +19 -0
- package/build/types/helpers/validation.d.ts +2 -0
- package/build/types/hooks/internal/useAuthPackageContext.d.ts +1 -0
- package/build/types/hooks/internal/useTimer.d.ts +3 -0
- package/build/types/hooks/useAuthContext.d.ts +2 -0
- package/build/types/hooks/useNavigator.d.ts +66 -0
- package/build/types/hooks/useRequest.d.ts +5 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/navigator/index.d.ts +2 -0
- package/build/types/navigator/index.native.d.ts +82 -0
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/index.d.ts +3 -0
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/index.native.d.ts +2 -0
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/types.d.ts +17 -0
- package/build/types/screens/CountryCode/hooks/internal/useCountryCode.d.ts +12 -0
- package/build/types/screens/CountryCode/index.d.ts +2 -0
- package/build/types/screens/CountryCode/index.native.d.ts +2 -0
- package/build/types/screens/CountryCode/type.d.ts +11 -0
- package/build/types/screens/CreatePassword/hooks/internal/useCreatePassword.d.ts +37 -0
- package/build/types/screens/CreatePassword/index.d.ts +3 -0
- package/build/types/screens/CreatePassword/index.native.d.ts +4 -0
- package/build/types/screens/CreatePassword/type.d.ts +43 -0
- package/build/types/screens/EnterEmail/hooks/internal/useEnterEmail.d.ts +19 -0
- package/build/types/screens/EnterEmail/index.d.ts +3 -0
- package/build/types/screens/EnterEmail/index.native.d.ts +4 -0
- package/build/types/screens/EnterEmail/types.d.ts +13 -0
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/hooks/internal/useExistingAccountsSheet.d.ts +13 -0
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/index.d.ts +3 -0
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/index.native.d.ts +3 -0
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/types.d.ts +28 -0
- package/build/types/screens/EnterMobile/hooks/internal/useEnterMobile.d.ts +15 -0
- package/build/types/screens/EnterMobile/index.d.ts +4 -0
- package/build/types/screens/EnterMobile/index.native.d.ts +4 -0
- package/build/types/screens/EnterMobile/types.d.ts +44 -0
- package/build/types/screens/EnterPassword/hooks/internal/useEnterPassword.d.ts +25 -0
- package/build/types/screens/EnterPassword/index.d.ts +3 -0
- package/build/types/screens/EnterPassword/index.native.d.ts +4 -0
- package/build/types/screens/EnterPassword/types.d.ts +24 -0
- package/build/types/screens/Login/components/LoginWebComponent/index.d.ts +2 -0
- package/build/types/screens/Login/components/LoginWebComponent/index.native.d.ts +2 -0
- package/build/types/screens/Login/index.d.ts +2 -0
- package/build/types/screens/Login/index.native.d.ts +2 -0
- package/build/types/screens/LoginWithEmailOTP/hooks/internal/useLoginWithEmailOTP.d.ts +17 -0
- package/build/types/screens/LoginWithEmailOTP/index.d.ts +7 -0
- package/build/types/screens/LoginWithEmailOTP/index.native.d.ts +4 -0
- package/build/types/screens/LoginWithMobileOTP/hooks/internal/useLoginWithMobileOTP.d.ts +11 -0
- package/build/types/screens/LoginWithMobileOTP/index.d.ts +5 -0
- package/build/types/screens/LoginWithMobileOTP/index.native.d.ts +4 -0
- package/build/types/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.d.ts +25 -0
- package/build/types/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.native.d.ts +2 -0
- package/build/types/screens/PartnerSSO/PartnerLogin/hooks/internal/usePartnerLogin.d.ts +8 -0
- package/build/types/screens/PartnerSSO/PartnerLogin/index.d.ts +2 -0
- package/build/types/screens/PartnerSSO/PartnerLogin/types.d.ts +35 -0
- package/build/types/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.d.ts +24 -0
- package/build/types/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.native.d.ts +2 -0
- package/build/types/screens/PartnerSSO/PartnerRegistration/hooks/internal/usePartnerRegistration.d.ts +8 -0
- package/build/types/screens/PartnerSSO/PartnerRegistration/index.d.ts +2 -0
- package/build/types/screens/PartnerSSO/PartnerRegistration/types.d.ts +63 -0
- package/build/types/screens/PartnerSSO/index.d.ts +2 -0
- package/build/types/screens/Profile/components/EditMobileNumber/index.d.ts +6 -0
- package/build/types/screens/Profile/components/EditMobileNumber/index.native.d.ts +3 -0
- package/build/types/screens/Profile/components/EditPassword/index.d.ts +6 -0
- package/build/types/screens/Profile/components/EditPassword/index.native.d.ts +3 -0
- package/build/types/screens/Profile/components/EditProfile/index.d.ts +6 -0
- package/build/types/screens/Profile/components/EditProfile/index.native.d.ts +3 -0
- package/build/types/screens/Profile/components/OtpVerificationModal/index.d.ts +4 -0
- package/build/types/screens/Profile/components/OtpVerificationModal/index.native.d.ts +3 -0
- package/build/types/screens/Profile/components/ProfileWebComponent/index.d.ts +4 -0
- package/build/types/screens/Profile/components/ProfileWebComponent/index.native.d.ts +3 -0
- package/build/types/screens/Profile/hooks/internal/useProfile.d.ts +26 -0
- package/build/types/screens/Profile/index.d.ts +7 -0
- package/build/types/screens/Profile/index.native.d.ts +7 -0
- package/build/types/screens/Profile/types.d.ts +53 -0
- package/build/types/screens/ResetPassword/hooks/internal/useResetPassword.d.ts +29 -0
- package/build/types/screens/ResetPassword/index.d.ts +3 -0
- package/build/types/screens/ResetPassword/index.native.d.ts +4 -0
- package/build/types/screens/ResetPassword/types.d.ts +11 -0
- package/build/types/screens/SSOLogin/AuthWebView/index.d.ts +2 -0
- package/build/types/screens/SSOLogin/AuthWebView/index.native.d.ts +4 -0
- package/build/types/screens/SSOLogin/AuthWebView/types.d.ts +8 -0
- package/build/types/screens/SSOLogin/AuthenticationMethods/hooks/internal/useSSOAuthenticationMethods.d.ts +9 -0
- package/build/types/screens/SSOLogin/AuthenticationMethods/index.d.ts +3 -0
- package/build/types/screens/SSOLogin/AuthenticationMethods/index.native.d.ts +4 -0
- package/build/types/screens/SSOLogin/AuthenticationMethods/types.d.ts +14 -0
- package/build/types/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.d.ts +6 -0
- package/build/types/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.native.d.ts +2 -0
- package/build/types/screens/SSOLogin/SSOCallback/hooks/internal/useSSOCallback.d.ts +15 -0
- package/build/types/screens/SSOLogin/SSOCallback/index.d.ts +2 -0
- package/build/types/screens/SSOLogin/SSOCallback/index.native.d.ts +4 -0
- package/build/types/screens/SSOLogin/SSOCallback/types.d.ts +14 -0
- package/build/types/screens/SSOLogin/SearchOrganization/hooks/internal/useSSOSearchOrganization.d.ts +18 -0
- package/build/types/screens/SSOLogin/SearchOrganization/index.d.ts +3 -0
- package/build/types/screens/SSOLogin/SearchOrganization/index.native.d.ts +4 -0
- package/build/types/screens/SSOLogin/SearchOrganization/types.d.ts +13 -0
- package/build/types/screens/SignUp/components/SignUpForm/index.d.ts +3 -0
- package/build/types/screens/SignUp/components/SignUpForm/index.native.d.ts +2 -0
- package/build/types/screens/SignUp/components/SignUpForm/type.d.ts +6 -0
- package/build/types/screens/SignUp/components/SignUpWebComponent/index.d.ts +2 -0
- package/build/types/screens/SignUp/components/SignUpWebComponent/index.native.d.ts +2 -0
- package/build/types/screens/SignUp/components/SignUpWebComponent/types.d.ts +9 -0
- package/build/types/screens/SignUp/hooks/internal/useSignUp.d.ts +48 -0
- package/build/types/screens/SignUp/index.d.ts +2 -0
- package/build/types/screens/SignUp/index.native.d.ts +4 -0
- package/build/types/screens/SignUp/types.d.ts +40 -0
- package/build/types/screens/UserConsent/hooks/internal/useConsent.d.ts +10 -0
- package/build/types/screens/UserConsent/index.d.ts +3 -0
- package/build/types/screens/UserConsent/index.native.d.ts +4 -0
- package/build/types/screens/UserConsent/types.d.ts +33 -0
- package/build/types/screens/VerifyEmail/hooks/internal/useVerifyEmail.d.ts +19 -0
- package/build/types/screens/VerifyEmail/index.d.ts +3 -0
- package/build/types/screens/VerifyEmail/index.native.d.ts +4 -0
- package/build/types/screens/VerifyEmail/types.d.ts +8 -0
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/hooks/internal/useVerifyLinkPrimaryAccountEmailOTP.d.ts +15 -0
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/index.d.ts +3 -0
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/index.native.d.ts +4 -0
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/types.d.ts +14 -0
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/hooks/internal/useVerifyLinkPrimaryAccountMobileOTP.d.ts +17 -0
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/index.d.ts +3 -0
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/index.native.d.ts +4 -0
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/types.d.ts +5 -0
- package/build/types/screens/VerifyMobile/hooks/internal/useVerifyMobile.d.ts +14 -0
- package/build/types/screens/VerifyMobile/index.d.ts +3 -0
- package/build/types/screens/VerifyMobile/index.native.d.ts +4 -0
- package/build/types/screens/VerifyMobile/types.d.ts +5 -0
- package/build/types/screens/VerifyResetPasswordOTP/hooks/internal/useVerifyResetPasswordOTP.d.ts +19 -0
- package/build/types/screens/VerifyResetPasswordOTP/index.d.ts +7 -0
- package/build/types/screens/VerifyResetPasswordOTP/index.native.d.ts +4 -0
- package/build/types/screens/Welcome/SocialAuth/commonSocialAuth.d.ts +50 -0
- package/build/types/screens/Welcome/SocialAuth/hooks/useSocialAuth.native.d.ts +7 -0
- package/build/types/screens/Welcome/SocialAuth/hooks/useSocialAuth.web.d.ts +7 -0
- package/build/types/screens/Welcome/SocialAuth/hooks/web/useFacebookAuth.web.d.ts +5 -0
- package/build/types/screens/Welcome/SocialAuth/hooks/web/useGoogleAuth.web.d.ts +4 -0
- package/build/types/screens/Welcome/components/SocialLoginModal/index.d.ts +3 -0
- package/build/types/screens/Welcome/components/SocialLoginModal/index.native.d.ts +3 -0
- package/build/types/screens/Welcome/components/SocialLoginModal/types.d.ts +8 -0
- package/build/types/screens/Welcome/hooks/internal/useWelcome.d.ts +22 -0
- package/build/types/screens/Welcome/index.d.ts +4 -0
- package/build/types/screens/Welcome/index.native.d.ts +4 -0
- package/build/types/types/types.d.ts +115 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AuthContextProps, AuthContextValue, AuthPackageContextValue } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Public Auth Authentication Context
|
|
5
|
+
*
|
|
6
|
+
* Exposed to consumers of the Auth package.
|
|
7
|
+
* Provides access to user profile, client info, logout, and helper utilities.
|
|
8
|
+
*/
|
|
9
|
+
declare const AuthContext: React.Context<AuthContextValue | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Package Auth Authentication Context
|
|
12
|
+
*
|
|
13
|
+
* Not meant for public use. Contains lower-level auth state such as
|
|
14
|
+
* token, login/logout functions, and refresh session.
|
|
15
|
+
*/
|
|
16
|
+
declare const AuthPackageContext: React.Context<AuthPackageContextValue | null>;
|
|
17
|
+
/**
|
|
18
|
+
* AuthProvider
|
|
19
|
+
*
|
|
20
|
+
* Provides authentication state and actions to children.
|
|
21
|
+
* Wraps both AuthContext (public) and AuthPackageContext (internal).
|
|
22
|
+
*
|
|
23
|
+
* @param children - React children to be rendered inside the provider
|
|
24
|
+
* @param router - Router adapter for navigation in web apps only
|
|
25
|
+
* @param basePath - Base path for web routes where the auth module is mounted (default: '')
|
|
26
|
+
* @param LogoComponent - Optional component for branding/logo in auth flows
|
|
27
|
+
* @param session - Initial session containing token & sessionTimeout (if available)
|
|
28
|
+
* @param supportEmail - Optional support email for auth flows
|
|
29
|
+
* @param appConfig - Optional app config for auth flows
|
|
30
|
+
* @param onLogin - Optional callback after successful login
|
|
31
|
+
* @param onLogout - Optional callback after successful logout
|
|
32
|
+
* @param onLaunchAuthSession - Optional callback after successfully launching the auth session. For example, it can be used to set the Firebase notification token or request Android permissions.
|
|
33
|
+
* @param onRefreshSession - Optional handler for refreshing user session
|
|
34
|
+
* @param openChatSupport - Optional callback to open chat support
|
|
35
|
+
* @param socialLoginConfig - Optional social login configuration
|
|
36
|
+
*/
|
|
37
|
+
declare const AuthProvider: ({ children, router, basePath, LogoComponent, session, appConfig, onLogin, onLogout, onLaunchAuthSession, onRefreshSession, openChatSupport, socialLoginConfig }: AuthContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export { AuthProvider };
|
|
39
|
+
export default AuthContext;
|
|
40
|
+
export { AuthPackageContext };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ClientProfile, MemberProfile, Profile, Partner, RegistrationMethod } from '../types/types';
|
|
3
|
+
import type { SocialLoginsEnum } from '../enums';
|
|
4
|
+
/**
|
|
5
|
+
* Router adapter interface that host apps must implement.
|
|
6
|
+
* This allows the package to be framework-agnostic.
|
|
7
|
+
*/
|
|
8
|
+
type RouterAdapter = {
|
|
9
|
+
push: (path: string, options?: {
|
|
10
|
+
query?: Record<string, string | string[] | undefined>;
|
|
11
|
+
}) => void;
|
|
12
|
+
replace: (path: string, options?: {
|
|
13
|
+
query?: Record<string, string | string[] | undefined>;
|
|
14
|
+
}) => void;
|
|
15
|
+
back: () => void;
|
|
16
|
+
getQuery: () => Record<string, string | string[] | undefined>;
|
|
17
|
+
getPathname: () => string;
|
|
18
|
+
};
|
|
19
|
+
interface LoginResponse {
|
|
20
|
+
token: string;
|
|
21
|
+
member?: MemberProfile;
|
|
22
|
+
}
|
|
23
|
+
interface RefreshSessionResponse {
|
|
24
|
+
token: string;
|
|
25
|
+
}
|
|
26
|
+
interface AppConfig {
|
|
27
|
+
appName?: string;
|
|
28
|
+
supportEmail?: string;
|
|
29
|
+
privacyPolicyUrl?: string;
|
|
30
|
+
termsAndConditionsUrl?: string;
|
|
31
|
+
enableSupportOption?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface AuthContextProps {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
/** Router adapter for navigation - must be provided by web host app */
|
|
36
|
+
router?: RouterAdapter;
|
|
37
|
+
/** Base path where the auth module is mounted (e.g., '' for root or '/auth') */
|
|
38
|
+
basePath?: string;
|
|
39
|
+
LogoComponent?: React.ComponentType | React.ReactElement;
|
|
40
|
+
session: {
|
|
41
|
+
token: string;
|
|
42
|
+
sessionTimeout?: boolean;
|
|
43
|
+
};
|
|
44
|
+
appConfig?: AppConfig;
|
|
45
|
+
socialLoginConfig?: Partial<Record<SocialLoginsEnum, {
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
webClientId?: string;
|
|
48
|
+
}>>;
|
|
49
|
+
onLogin: (result: LoginResponse) => void;
|
|
50
|
+
onLogout: () => Promise<any>;
|
|
51
|
+
onRefreshSession?: (result: RefreshSessionResponse) => Promise<void>;
|
|
52
|
+
onLaunchAuthSession?: () => void;
|
|
53
|
+
openChatSupport?: () => void;
|
|
54
|
+
}
|
|
55
|
+
interface AuthContextValue {
|
|
56
|
+
token: string;
|
|
57
|
+
profile: MemberProfile | null;
|
|
58
|
+
client: ClientProfile | null;
|
|
59
|
+
isLoadingProfile: boolean;
|
|
60
|
+
logout: () => Promise<any>;
|
|
61
|
+
onLaunchAuthSession?: () => void;
|
|
62
|
+
getUserProfile?: () => Promise<any>;
|
|
63
|
+
onOtpReceived?: (otp: string) => void;
|
|
64
|
+
}
|
|
65
|
+
interface AuthPackageContextValue {
|
|
66
|
+
token: string;
|
|
67
|
+
/** Router adapter for navigation */
|
|
68
|
+
router?: RouterAdapter;
|
|
69
|
+
/** Base path where the auth module is mounted */
|
|
70
|
+
basePath?: string;
|
|
71
|
+
LogoComponent?: React.ComponentType | React.ReactElement;
|
|
72
|
+
appConfig: AppConfig;
|
|
73
|
+
socialLoginConfig?: Partial<Record<SocialLoginsEnum, {
|
|
74
|
+
enabled?: boolean;
|
|
75
|
+
webClientId?: string;
|
|
76
|
+
}>>;
|
|
77
|
+
onTokenChange: (token: string) => void;
|
|
78
|
+
onLogin: (result: LoginResponse) => void;
|
|
79
|
+
logout: () => void;
|
|
80
|
+
refreshSession?: (result: RefreshSessionResponse) => Promise<void>;
|
|
81
|
+
onLaunchAuthSession?: () => void;
|
|
82
|
+
registrationMethod: RegistrationMethod;
|
|
83
|
+
onRegistrationMethodChange: (method: RegistrationMethod) => void;
|
|
84
|
+
otpValue?: string;
|
|
85
|
+
openChatSupport?: () => void;
|
|
86
|
+
}
|
|
87
|
+
interface AuthConfigResponse {
|
|
88
|
+
profile: Profile;
|
|
89
|
+
config: any;
|
|
90
|
+
screenRecording: boolean;
|
|
91
|
+
isInternational: boolean;
|
|
92
|
+
defaultCircle: any;
|
|
93
|
+
}
|
|
94
|
+
export type { LoginResponse, AuthContextProps, AuthContextValue, MemberProfile, ClientProfile, AuthConfigResponse, Profile, Partner, AuthPackageContextValue, RefreshSessionResponse, RouterAdapter };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NetworkProps } from './types';
|
|
2
|
+
import type { BaseRequestOptions } from '../types/types';
|
|
3
|
+
export declare const createHttpClient: ({ token, onRefreshSession, onLogout }: NetworkProps) => {
|
|
4
|
+
request: ({ url, method, data, ...axiosOptions }: BaseRequestOptions) => Promise<unknown>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SocialLoginsEnum } from "../enums";
|
|
2
|
+
import type { RefreshSessionResponse } from "../contexts/type";
|
|
3
|
+
import type { AxiosRequestConfig } from "axios";
|
|
4
|
+
interface RequestOptionsProps extends AxiosRequestConfig {
|
|
5
|
+
token?: string;
|
|
6
|
+
logout: () => Promise<any>;
|
|
7
|
+
refreshSession: (result: RefreshSessionResponse) => Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
interface NetworkProps {
|
|
10
|
+
token: string;
|
|
11
|
+
onRefreshSession?: (token: string) => Promise<any>;
|
|
12
|
+
onLogout?: () => Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
interface SocialLoginOptions {
|
|
15
|
+
type: SocialLoginsEnum;
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
iconImageUrl?: string;
|
|
18
|
+
}
|
|
19
|
+
export type { RequestOptionsProps, NetworkProps, SocialLoginOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAuthPackageContext: () => import("../..").AuthPackageContextValue;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useNavigator Hook
|
|
3
|
+
*
|
|
4
|
+
* Provides framework-agnostic navigation capabilities.
|
|
5
|
+
* Uses the RouterAdapter provided by the host app through AuthProvider.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const navigator = useNavigator();
|
|
10
|
+
*
|
|
11
|
+
* // Relative navigation (uses basePath)
|
|
12
|
+
* navigator.push('/registration');
|
|
13
|
+
*
|
|
14
|
+
* // Absolute navigation (ignores basePath)
|
|
15
|
+
* navigator.pushAbsolute('/dashboard');
|
|
16
|
+
*
|
|
17
|
+
* // With query params
|
|
18
|
+
* navigator.push('/registration', { query: { email: 'test@example.com' } });
|
|
19
|
+
*
|
|
20
|
+
* // Access query params
|
|
21
|
+
* const { email } = navigator.query;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const useNavigator: () => {
|
|
25
|
+
/**
|
|
26
|
+
* Navigate to a path relative to basePath
|
|
27
|
+
*/
|
|
28
|
+
push: (path: string, options?: {
|
|
29
|
+
query?: Record<string, string | string[] | undefined>;
|
|
30
|
+
}) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Replace current path with a path relative to basePath
|
|
33
|
+
*/
|
|
34
|
+
replace: (path: string, options?: {
|
|
35
|
+
query?: Record<string, string | string[] | undefined>;
|
|
36
|
+
}) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Navigate to an absolute path (ignores basePath)
|
|
39
|
+
*/
|
|
40
|
+
pushAbsolute: (path: string, options?: {
|
|
41
|
+
query?: Record<string, string | string[] | undefined>;
|
|
42
|
+
}) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Replace with an absolute path (ignores basePath)
|
|
45
|
+
*/
|
|
46
|
+
replaceAbsolute: (path: string, options?: {
|
|
47
|
+
query?: Record<string, string | string[] | undefined>;
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Go back to the previous page
|
|
51
|
+
*/
|
|
52
|
+
back: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Get current query parameters
|
|
55
|
+
*/
|
|
56
|
+
readonly query: Record<string, string | string[] | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Get current pathname
|
|
59
|
+
*/
|
|
60
|
+
readonly pathname: string;
|
|
61
|
+
/**
|
|
62
|
+
* The base path where the auth module is mounted
|
|
63
|
+
*/
|
|
64
|
+
basePath: string;
|
|
65
|
+
};
|
|
66
|
+
export { useNavigator };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './contexts/AuthContext';
|
|
2
|
+
export { default as AuthContext } from './contexts/AuthContext';
|
|
3
|
+
export * from './contexts/type';
|
|
4
|
+
export * from './hooks/useAuthContext';
|
|
5
|
+
export * from './hooks/useRequest';
|
|
6
|
+
export * from './hooks/useNavigator';
|
|
7
|
+
export * from './api/axiosClient';
|
|
8
|
+
export * from './navigator';
|
|
9
|
+
export * from './screens/Login/components/LoginWebComponent/index';
|
|
10
|
+
export * from './screens/SignUp/components/SignUpWebComponent/index';
|
|
11
|
+
export * from './screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index';
|
|
12
|
+
export * from './screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent';
|
|
13
|
+
export * from './screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent';
|
|
14
|
+
export * from './screens/Profile';
|
|
15
|
+
export { strongPasswordRequirements } from './constants/password-requirements';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type NativeStackScreenProps } from '@react-navigation/native-stack';
|
|
2
|
+
import type { Client, PersonalDetails } from '../types/types';
|
|
3
|
+
import type { AuthMethod } from '../screens/SSOLogin/AuthenticationMethods/types';
|
|
4
|
+
declare const AuthNavigator: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { AuthNavigator };
|
|
6
|
+
export type AuthStackParamList = {
|
|
7
|
+
Welcome: undefined;
|
|
8
|
+
EnterEmail: undefined;
|
|
9
|
+
EnterPassword: {
|
|
10
|
+
email: string;
|
|
11
|
+
};
|
|
12
|
+
SignUp: {
|
|
13
|
+
email?: string;
|
|
14
|
+
phone?: string;
|
|
15
|
+
firstName?: string;
|
|
16
|
+
lastName?: string;
|
|
17
|
+
countryCode?: string;
|
|
18
|
+
registrationToken?: string;
|
|
19
|
+
clientId?: number | string;
|
|
20
|
+
registrationMethod?: string;
|
|
21
|
+
googleUserId?: string;
|
|
22
|
+
fbUserId?: string;
|
|
23
|
+
appleUserId?: string;
|
|
24
|
+
};
|
|
25
|
+
CountryCode: {
|
|
26
|
+
prevRoute: 'LoginMobile' | 'MobileNumber' | 'SignUp' | 'EnterMobile';
|
|
27
|
+
};
|
|
28
|
+
CreatePassword: PersonalDetails;
|
|
29
|
+
UserConsent: PersonalDetails;
|
|
30
|
+
VerifyMobile: {
|
|
31
|
+
phone: string;
|
|
32
|
+
sessionToken: string;
|
|
33
|
+
};
|
|
34
|
+
VerifyEmail: {
|
|
35
|
+
email: string;
|
|
36
|
+
sessionToken: string;
|
|
37
|
+
phone: string;
|
|
38
|
+
};
|
|
39
|
+
LoginWithEmailOTP: {
|
|
40
|
+
email: string;
|
|
41
|
+
sessionToken?: string;
|
|
42
|
+
mfaEnabled?: boolean;
|
|
43
|
+
password?: string;
|
|
44
|
+
};
|
|
45
|
+
ResetPassword: {
|
|
46
|
+
sessionToken: string;
|
|
47
|
+
email: string;
|
|
48
|
+
};
|
|
49
|
+
VerifyResetPasswordOTP: {
|
|
50
|
+
email: string;
|
|
51
|
+
};
|
|
52
|
+
SSOSearchOrganization: undefined;
|
|
53
|
+
SSOAuthenticationMethods: {
|
|
54
|
+
client: Client;
|
|
55
|
+
};
|
|
56
|
+
SSOCallback: {
|
|
57
|
+
code?: string;
|
|
58
|
+
clientId: number;
|
|
59
|
+
authMethod?: AuthMethod;
|
|
60
|
+
};
|
|
61
|
+
SSOAuthWebView: {
|
|
62
|
+
clientId: number;
|
|
63
|
+
authenticationUrl: string;
|
|
64
|
+
redirectUri?: string;
|
|
65
|
+
authMethod: AuthMethod;
|
|
66
|
+
};
|
|
67
|
+
EnterMobile: undefined;
|
|
68
|
+
LoginWithMobileOTP: {
|
|
69
|
+
phone: string;
|
|
70
|
+
memberId: string;
|
|
71
|
+
};
|
|
72
|
+
VerifyLinkPrimaryAccountEmailOTP: {
|
|
73
|
+
email: string;
|
|
74
|
+
sessionToken: string;
|
|
75
|
+
phone: string;
|
|
76
|
+
};
|
|
77
|
+
VerifyLinkPrimaryAccountMobileOTP: {
|
|
78
|
+
sessionToken: string;
|
|
79
|
+
phone: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type AuthScreensProps<T extends keyof AuthStackParamList> = NativeStackScreenProps<AuthStackParamList, T>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Country } from "../../../../types/types";
|
|
2
|
+
interface CountryCodeDropdownProps {
|
|
3
|
+
selectedCountry: Country;
|
|
4
|
+
handleSelect: (country: Country) => void;
|
|
5
|
+
}
|
|
6
|
+
interface MobileNumberCountryCodeProps {
|
|
7
|
+
hide: () => void;
|
|
8
|
+
handleSubmit: (data: {
|
|
9
|
+
mobileNo: string;
|
|
10
|
+
countryCode: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
title: string;
|
|
13
|
+
subtitle: string;
|
|
14
|
+
cancellable?: boolean;
|
|
15
|
+
mobile?: string;
|
|
16
|
+
}
|
|
17
|
+
export type { CountryCodeDropdownProps, MobileNumberCountryCodeProps, Country };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CountryCode } from "../../type";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Internal hook for managing CountryCode screen state and auth context integration.
|
|
5
|
+
* Not exposed to package consumers.
|
|
6
|
+
*/
|
|
7
|
+
declare const useCountryCode: () => {
|
|
8
|
+
countryCodes: CountryCode[];
|
|
9
|
+
searchCountry: CountryCode[];
|
|
10
|
+
onSearch: (text: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export { useCountryCode };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface CountryCode {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
countryCode: string;
|
|
5
|
+
phoneCode: string;
|
|
6
|
+
}
|
|
7
|
+
interface CountryCodeProps {
|
|
8
|
+
selectedCountry: CountryCode;
|
|
9
|
+
handleSelect: (country: CountryCode) => void;
|
|
10
|
+
}
|
|
11
|
+
export type { CountryCode, CountryCodeProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface UseCreatePasswordProps {
|
|
2
|
+
/** Initial password value (for preserving state when navigating back) */
|
|
3
|
+
initialPassword?: string;
|
|
4
|
+
/** Initial confirm password value (for preserving state when navigating back) */
|
|
5
|
+
initialConfirmPassword?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* Internal hook for managing CreatePassword screen state and auth context integration.
|
|
10
|
+
* Not exposed to package consumers.
|
|
11
|
+
*
|
|
12
|
+
* Both web and native use the same pattern:
|
|
13
|
+
* - Hook manages password state internally
|
|
14
|
+
* - Use handlePassword/handleConfirmPassword to update state
|
|
15
|
+
* - Optional initial values for preserving state when navigating back
|
|
16
|
+
*/
|
|
17
|
+
declare const useCreatePassword: (props?: UseCreatePasswordProps) => {
|
|
18
|
+
password: string;
|
|
19
|
+
setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
20
|
+
confirmPassword: string;
|
|
21
|
+
setConfirmPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
22
|
+
passwordVisible: boolean;
|
|
23
|
+
setPasswordVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
24
|
+
confirmPasswordVisible: boolean;
|
|
25
|
+
setConfirmPasswordVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
26
|
+
maxLength: number;
|
|
27
|
+
setMaxLength: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
28
|
+
criteria: Record<string, boolean>;
|
|
29
|
+
setCriteria: import("react").Dispatch<import("react").SetStateAction<Record<string, boolean>>>;
|
|
30
|
+
handlePassword: (text: string) => void;
|
|
31
|
+
handleConfirmPassword: (text: string) => void;
|
|
32
|
+
handleSkip: ({ onResult }: {
|
|
33
|
+
onResult: () => void;
|
|
34
|
+
}) => void;
|
|
35
|
+
isContinueDisabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
export { useCreatePassword };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { MemberProfile, PersonalDetails } from "../../types/types";
|
|
3
|
+
interface PasswordFormValues {
|
|
4
|
+
password: string;
|
|
5
|
+
confirmPassword: string;
|
|
6
|
+
}
|
|
7
|
+
interface PasswordFormProps {
|
|
8
|
+
setValidDetail: (value: boolean) => void;
|
|
9
|
+
setUserConsent: (value: boolean) => void;
|
|
10
|
+
setUserDetails: React.Dispatch<React.SetStateAction<any>>;
|
|
11
|
+
}
|
|
12
|
+
interface CreatePasswordProps {
|
|
13
|
+
onContinue: (password?: string, confirmPassword?: string) => void;
|
|
14
|
+
userDetails: PersonalDetails;
|
|
15
|
+
handleBack?: () => void;
|
|
16
|
+
}
|
|
17
|
+
interface useCreatePasswordProps {
|
|
18
|
+
registrationParams: PersonalDetails;
|
|
19
|
+
onNavigateToUserConsent: ({ sessionToken, phone, token, member }: {
|
|
20
|
+
sessionToken: string;
|
|
21
|
+
phone: string;
|
|
22
|
+
token?: string;
|
|
23
|
+
member?: MemberProfile;
|
|
24
|
+
}) => void;
|
|
25
|
+
onVerifyEmail: ({ email, phone, sessionToken }: {
|
|
26
|
+
email: string;
|
|
27
|
+
phone: string;
|
|
28
|
+
sessionToken: string;
|
|
29
|
+
}) => void;
|
|
30
|
+
}
|
|
31
|
+
interface handleSubmitProps {
|
|
32
|
+
sessionToken: string;
|
|
33
|
+
token?: string;
|
|
34
|
+
member?: MemberProfile;
|
|
35
|
+
emailVerificationRequired?: boolean;
|
|
36
|
+
}
|
|
37
|
+
interface SubmitRequestProps {
|
|
38
|
+
password?: string;
|
|
39
|
+
source: string;
|
|
40
|
+
registrationParams: PersonalDetails;
|
|
41
|
+
onResult: (data: handleSubmitProps) => void;
|
|
42
|
+
}
|
|
43
|
+
export type { PasswordFormValues, PasswordFormProps, CreatePasswordProps, handleSubmitProps, useCreatePasswordProps, SubmitRequestProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ValidateEmailParams } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Hook for managing Enter Email screen logic and authentication integration.
|
|
5
|
+
*/
|
|
6
|
+
declare const useEnterEmail: () => {
|
|
7
|
+
email: string;
|
|
8
|
+
isEmailValid: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
handleEmailChange: (value: string) => void;
|
|
11
|
+
handleEmailExists: ({ onValidate }: ValidateEmailParams) => Promise<void>;
|
|
12
|
+
handleClearEmail: () => void;
|
|
13
|
+
isLoginConflictModalVisible: boolean;
|
|
14
|
+
setIsLoginConflictModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
15
|
+
appName: string | undefined;
|
|
16
|
+
loginConflictTitle: string;
|
|
17
|
+
loginConflictDescription: string;
|
|
18
|
+
};
|
|
19
|
+
export { useEnterEmail };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface EnterEmailProps {
|
|
2
|
+
onContinue: (params: {
|
|
3
|
+
email: string;
|
|
4
|
+
emailExist: boolean;
|
|
5
|
+
}) => void;
|
|
6
|
+
onPressSignInWithSSO: () => void;
|
|
7
|
+
}
|
|
8
|
+
type ValidateEmailParams = {
|
|
9
|
+
onValidate: (args: {
|
|
10
|
+
emailExist: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
};
|
|
13
|
+
export type { EnterEmailProps, ValidateEmailParams };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LinkPrimaryAccountParams } from "../../types";
|
|
2
|
+
import type { MultipleAccount } from "../../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* Internal hook for managing useExistingAccountsSheet hook state and auth context integration. Not exposed to package consumers.
|
|
6
|
+
*/
|
|
7
|
+
declare const useExistingAccountsSheet: () => {
|
|
8
|
+
loading: boolean;
|
|
9
|
+
linkPrimaryAccount: ({ phone, onInitiateLinking }: LinkPrimaryAccountParams) => void;
|
|
10
|
+
selectedAccount: MultipleAccount | null;
|
|
11
|
+
setSelectedAccount: import("react").Dispatch<import("react").SetStateAction<MultipleAccount | null>>;
|
|
12
|
+
};
|
|
13
|
+
export { useExistingAccountsSheet };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectPrimaryAccountSheetProps } from './types';
|
|
2
|
+
declare const ExistingAccountsSheet: ({ visible, hide, phone, existingAccounts, onInitiateAccountLinking }: SelectPrimaryAccountSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export { ExistingAccountsSheet };
|