@truworth/twc-auth 1.1.0 → 1.2.1
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/README.md +239 -306
- 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/gender-diversity.svg +22 -0
- package/build/assets/logo.svg +55 -0
- package/build/assets/okay_icon copy.svg +3 -0
- package/build/assets/okay_icon.svg +3 -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 +380 -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/EmailOTPVerify/index.js +20 -0
- package/build/src/components/EmailOTPVerify/index.native.js +26 -0
- package/build/src/components/EmailOTPVerify/type.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/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 +78 -0
- package/build/src/components/PasswordCriteria/index.js +47 -0
- package/build/src/components/PasswordCriteria/index.native.js +19 -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/VerifyOTP/index.js +23 -0
- package/build/src/components/VerifyOTP/index.native.js +38 -0
- package/build/src/components/VerifyOTP/types.js +1 -0
- package/build/src/constants/cdn-url/index.js +1 -0
- package/build/src/constants/cdn-url/index.native.js +5 -0
- package/build/src/contexts/AuthContext.js +184 -0
- package/build/src/contexts/type.js +1 -0
- package/build/src/helpers/Network.js +93 -0
- package/build/src/helpers/Validation.js +12 -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/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/useRequest.js +38 -0
- package/build/src/index.js +12 -0
- package/build/src/navigator/index.js +10 -0
- package/build/src/navigator/index.native.js +16 -0
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/index.js +38 -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 +52 -0
- package/build/src/screens/CreatePassword/index.js +43 -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 +86 -0
- package/build/src/screens/EnterEmail/index.js +30 -0
- package/build/src/screens/EnterEmail/index.native.js +34 -0
- package/build/src/screens/EnterPassword/hooks/internal/useEnterPassword.js +47 -0
- package/build/src/screens/EnterPassword/index.js +22 -0
- package/build/src/screens/EnterPassword/index.native.js +23 -0
- package/build/src/screens/EnterPassword/types.js +1 -0
- package/build/src/screens/Login/components/LoginWebComponent/index.js +44 -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/SignUp/components/SignUpForm/index.js +181 -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 +82 -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 +138 -0
- package/build/src/screens/SignUp/index.js +6 -0
- package/build/src/screens/SignUp/index.native.js +185 -0
- package/build/src/screens/SignUp/types.js +1 -0
- package/build/src/screens/UserConsent/hooks/internal/useConsent.js +48 -0
- package/build/src/screens/UserConsent/index.js +69 -0
- package/build/src/screens/UserConsent/index.native.js +46 -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/VerifyMobile/hooks/internal/useVerifyMobile.js +73 -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/Welcome/hooks/internal/useWelcome.js +21 -0
- package/build/src/screens/Welcome/index.js +28 -0
- package/build/src/screens/Welcome/index.native.js +41 -0
- package/build/src/types/types.js +1 -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 +13 -0
- package/build/types/components/EmailOTPVerify/index.d.ts +3 -0
- package/build/types/components/EmailOTPVerify/index.native.d.ts +3 -0
- package/build/types/components/EmailOTPVerify/type.d.ts +9 -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/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 +13 -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 +12 -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/VerifyOTP/index.d.ts +3 -0
- package/build/types/components/VerifyOTP/index.native.d.ts +3 -0
- package/build/types/components/VerifyOTP/types.d.ts +10 -0
- package/build/types/constants/cdn-url/index.d.ts +1 -0
- package/build/types/constants/cdn-url/index.native.d.ts +3 -0
- package/build/types/contexts/AuthContext.d.ts +36 -0
- package/build/types/contexts/type.d.ts +58 -0
- package/build/types/helpers/Network.d.ts +5 -0
- package/build/types/helpers/Validation.d.ts +2 -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 +2 -0
- package/build/types/helpers/types.d.ts +13 -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/useRequest.d.ts +5 -0
- package/build/types/index.d.ts +8 -0
- package/build/types/navigator/index.d.ts +2 -0
- package/build/types/navigator/index.native.d.ts +36 -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 +26 -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 +24 -0
- package/build/types/screens/EnterEmail/index.d.ts +7 -0
- package/build/types/screens/EnterEmail/index.native.d.ts +4 -0
- package/build/types/screens/EnterPassword/hooks/internal/useEnterPassword.d.ts +20 -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 +5 -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/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 +9 -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 +24 -0
- package/build/types/screens/SignUp/hooks/internal/useSignUp.d.ts +50 -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 +18 -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 +27 -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/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/Welcome/hooks/internal/useWelcome.d.ts +14 -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 +90 -0
- package/get-metro-config.js +40 -0
- package/get-next-config.js +26 -0
- package/package.json +86 -38
- package/dist/index.esm.js +0 -2028
- package/dist/index.umd.js +0 -70
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type NativeStackScreenProps } from '@react-navigation/native-stack';
|
|
2
|
+
import type { PersonalDetails } from '../types/types';
|
|
3
|
+
declare const AuthNavigator: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { AuthNavigator };
|
|
5
|
+
export type AuthStackParamList = {
|
|
6
|
+
Welcome: undefined;
|
|
7
|
+
EnterEmail: undefined;
|
|
8
|
+
EnterPassword: {
|
|
9
|
+
email: string;
|
|
10
|
+
};
|
|
11
|
+
SignUp: {
|
|
12
|
+
email?: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
firstName?: string;
|
|
15
|
+
lastName?: string;
|
|
16
|
+
countryCode?: string;
|
|
17
|
+
registrationToken?: string;
|
|
18
|
+
clientId?: number | string;
|
|
19
|
+
registrationMethod?: string;
|
|
20
|
+
};
|
|
21
|
+
CountryCode: {
|
|
22
|
+
prevRoute: 'LoginMobile' | 'MobileNumber' | 'SignUp' | 'EnterMobile';
|
|
23
|
+
};
|
|
24
|
+
CreatePassword: PersonalDetails;
|
|
25
|
+
UserConsent: PersonalDetails;
|
|
26
|
+
VerifyMobile: {
|
|
27
|
+
phone: string;
|
|
28
|
+
sessionToken: string;
|
|
29
|
+
};
|
|
30
|
+
VerifyEmail: {
|
|
31
|
+
email: string;
|
|
32
|
+
sessionToken: string;
|
|
33
|
+
phone: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Internal hook for managing CreatePassword screen state and auth context integration.
|
|
4
|
+
* Not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useCreatePassword: () => {
|
|
7
|
+
password: string;
|
|
8
|
+
setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
9
|
+
confirmPassword: string;
|
|
10
|
+
setConfirmPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
11
|
+
passwordVisible: boolean;
|
|
12
|
+
setPasswordVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
13
|
+
confirmPasswordVisible: boolean;
|
|
14
|
+
setConfirmPasswordVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
setMaxLength: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
17
|
+
criteria: Record<string, boolean>;
|
|
18
|
+
setCriteria: import("react").Dispatch<import("react").SetStateAction<Record<string, boolean>>>;
|
|
19
|
+
handlePassword: (text: string) => void;
|
|
20
|
+
handleConfirmPassword: (text: string) => void;
|
|
21
|
+
handleSkip: ({ onResult }: {
|
|
22
|
+
onResult: () => void;
|
|
23
|
+
}) => void;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
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,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Internal hook for managing EnterEmail screen state and auth context integration. Not exposed to package consumers.
|
|
4
|
+
*/
|
|
5
|
+
declare const useEnterEmail: () => {
|
|
6
|
+
email: string;
|
|
7
|
+
appName: string | undefined;
|
|
8
|
+
isInvalidEmail: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
enterEmail: (text: string) => void;
|
|
11
|
+
handleValidateEmail: ({ onResult }: {
|
|
12
|
+
onResult: (params: {
|
|
13
|
+
email: string;
|
|
14
|
+
emailExist: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
}) => void;
|
|
17
|
+
clearText: () => void;
|
|
18
|
+
loginConflictModalVisible: boolean;
|
|
19
|
+
setLoginConflictModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
20
|
+
onRegistrationMethodChange: (method: import("../../../../types/types").RegistrationMethod) => void;
|
|
21
|
+
loginConflictErrorTitle: string;
|
|
22
|
+
loginConflictErrorDescription: string;
|
|
23
|
+
};
|
|
24
|
+
export { useEnterEmail };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Internal hook for managing EnterPassword screen state and auth context integration. Not exposed to package consumers.
|
|
4
|
+
*/
|
|
5
|
+
declare const useEnterPassword: () => {
|
|
6
|
+
loading: boolean;
|
|
7
|
+
password: string;
|
|
8
|
+
setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
9
|
+
isPasswordVisible: boolean;
|
|
10
|
+
togglePasswordVisibility: () => void;
|
|
11
|
+
isInvalidPassword: boolean;
|
|
12
|
+
setInvalidPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
13
|
+
handleSubmit: ({ email, source }: {
|
|
14
|
+
email: string;
|
|
15
|
+
source: string;
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
onPassword: (text: string) => void;
|
|
18
|
+
appName: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
export { useEnterPassword };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RegistrationFormComponentProps } from "./type";
|
|
2
|
+
declare const SignUpFormComponent: ({ email, registrationMethod, userDetails, onContinue, onGoToLogin }: RegistrationFormComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export { SignUpFormComponent };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Country, RegistrationMethod, PersonalDetails } from "../../../../types/types";
|
|
2
|
+
interface RegistrationFormComponentProps {
|
|
3
|
+
email: string;
|
|
4
|
+
registrationMethod: RegistrationMethod | undefined;
|
|
5
|
+
userDetails: PersonalDetails;
|
|
6
|
+
onContinue: (data: PersonalDetails) => void;
|
|
7
|
+
onGoToLogin: () => void;
|
|
8
|
+
}
|
|
9
|
+
export type { RegistrationFormComponentProps, Country };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { PersonalDetails } from "../../../../types/types";
|
|
3
|
+
interface UserDetailsProps {
|
|
4
|
+
setUserConsent: (consent: boolean) => void;
|
|
5
|
+
setUserDetails: React.Dispatch<React.SetStateAction<PersonalDetails | undefined>>;
|
|
6
|
+
setValidDetail: (valid: boolean) => void;
|
|
7
|
+
userDetails?: PersonalDetails;
|
|
8
|
+
}
|
|
9
|
+
interface VerifyMobileProps {
|
|
10
|
+
visible: boolean;
|
|
11
|
+
hide: () => void;
|
|
12
|
+
sessionToken: string;
|
|
13
|
+
phone: string;
|
|
14
|
+
}
|
|
15
|
+
interface VerifyEmailProps {
|
|
16
|
+
visible: boolean;
|
|
17
|
+
hide: () => void;
|
|
18
|
+
sessionToken: string;
|
|
19
|
+
email: string;
|
|
20
|
+
onVerifiedOTP: (params: {
|
|
21
|
+
sessionToken: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
}
|
|
24
|
+
export type { UserDetailsProps, VerifyMobileProps, VerifyEmailProps };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Hook for managing SignUp screen state and auth context integration.
|
|
4
|
+
* This hook is not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useSignUp: () => {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
gender: string;
|
|
11
|
+
setGender: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
12
|
+
datePicker: boolean;
|
|
13
|
+
showDatePicker: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
|
+
selectedDOB: string;
|
|
15
|
+
setSelectedDOB: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
16
|
+
phone: string;
|
|
17
|
+
setPhone: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
18
|
+
referralCode: string;
|
|
19
|
+
setReferralCode: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
20
|
+
countryCode: string;
|
|
21
|
+
setCountryCode: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
22
|
+
error: {
|
|
23
|
+
[key: string]: boolean;
|
|
24
|
+
};
|
|
25
|
+
setError: import("react").Dispatch<import("react").SetStateAction<{
|
|
26
|
+
[key: string]: boolean;
|
|
27
|
+
}>>;
|
|
28
|
+
email: string;
|
|
29
|
+
setEmail: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
30
|
+
phoneError: boolean;
|
|
31
|
+
setPhoneError: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
32
|
+
isPhoneValid: boolean;
|
|
33
|
+
setIsPhoneValid: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
34
|
+
emailLinkedError: string;
|
|
35
|
+
existingAccounts: any[];
|
|
36
|
+
existingAccountModal: boolean;
|
|
37
|
+
setExistingAccountModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
38
|
+
onFirstName: (text: string) => void;
|
|
39
|
+
onLastName: (text: string) => void;
|
|
40
|
+
handleEmail: (text: string) => void;
|
|
41
|
+
handleSubmit: ({ onResult }: {
|
|
42
|
+
onResult: () => void;
|
|
43
|
+
}) => void;
|
|
44
|
+
getLoginTypeText: (loginType: number) => "Facebook" | "Google" | "Apple" | "Email" | "Microsoft";
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
registrationMethod: import("../../../../types/types").RegistrationMethod;
|
|
47
|
+
appName: string | undefined;
|
|
48
|
+
termsAndConditionsUrl: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
export { useSignUp };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PersonalDetails } from "../../types/types";
|
|
2
|
+
interface UseSignUpProps {
|
|
3
|
+
preFirstName?: string;
|
|
4
|
+
preLastName?: string;
|
|
5
|
+
registrationMethod?: string;
|
|
6
|
+
onNavigateToCreatePassword: (registrationParams: PersonalDetails) => void;
|
|
7
|
+
}
|
|
8
|
+
interface MobileInputProps {
|
|
9
|
+
phone: string;
|
|
10
|
+
setPhone: (v: string) => void;
|
|
11
|
+
countryCode: string;
|
|
12
|
+
setCountryCode: (v: string) => void;
|
|
13
|
+
phoneError: boolean;
|
|
14
|
+
setPhoneError: (v: boolean) => void;
|
|
15
|
+
isValid: boolean;
|
|
16
|
+
setIsValid: (v: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
export type { UseSignUpProps, MobileInputProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { onAgreeHandlerProps } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Internal hook for managing UserConsent screen state and auth context integration. Not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useConsent: () => {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
onAgree: ({ registrationParams, source, onResult }: onAgreeHandlerProps) => void;
|
|
9
|
+
};
|
|
10
|
+
export { useConsent };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { MemberProfile, PersonalDetails } from "../../types/types";
|
|
2
|
+
interface UserConsentProps {
|
|
3
|
+
routeParams: PersonalDetails;
|
|
4
|
+
onVerifyEmail: ({ phone, email, sessionToken }: {
|
|
5
|
+
phone: string;
|
|
6
|
+
email: string;
|
|
7
|
+
sessionToken: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
onVerifyMobile: ({ phone, sessionToken }: {
|
|
10
|
+
phone: string;
|
|
11
|
+
sessionToken: string;
|
|
12
|
+
}) => void;
|
|
13
|
+
onBackHandler: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface onAgreeHandlerResponse {
|
|
16
|
+
token: string;
|
|
17
|
+
member: MemberProfile;
|
|
18
|
+
emailVerificationRequired: boolean;
|
|
19
|
+
mobileVerificationRequired: boolean;
|
|
20
|
+
sessionToken: string;
|
|
21
|
+
}
|
|
22
|
+
interface onAgreeHandlerProps {
|
|
23
|
+
registrationParams: PersonalDetails;
|
|
24
|
+
source: string;
|
|
25
|
+
onResult: (res: onAgreeHandlerResponse) => void;
|
|
26
|
+
}
|
|
27
|
+
export type { UserConsentProps, onAgreeHandlerProps, onAgreeHandlerResponse };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Hook for managing VerifyEmail screen state and auth context integration.
|
|
4
|
+
* This hook is not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useVerifyEmail: ({ sessionToken }: {
|
|
7
|
+
sessionToken: string;
|
|
8
|
+
}) => {
|
|
9
|
+
resendOTP: () => void;
|
|
10
|
+
validateOTP: ({ otp, onVerifiedOTP }: {
|
|
11
|
+
otp: string;
|
|
12
|
+
onVerifiedOTP: (result: {
|
|
13
|
+
sessionToken: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
}) => void;
|
|
16
|
+
status: string;
|
|
17
|
+
resendOTPCounter: number;
|
|
18
|
+
};
|
|
19
|
+
export { useVerifyEmail };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Hook for managing VerifyMobile screen state and auth context integration.
|
|
4
|
+
* This hook is not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useVerifyMobile: ({ sessionToken }: {
|
|
7
|
+
sessionToken: string;
|
|
8
|
+
}) => {
|
|
9
|
+
timer: number;
|
|
10
|
+
status: string;
|
|
11
|
+
resendOTP: () => void;
|
|
12
|
+
validateOTP: (otp: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export { useVerifyMobile };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Hook for managing Welcome screen state and auth context integration.
|
|
4
|
+
* This hook is not exposed to package consumers.
|
|
5
|
+
*/
|
|
6
|
+
declare const useWelcome: () => {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
9
|
+
showSocialLoginModal: boolean;
|
|
10
|
+
setShowSocialLoginModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
+
LogoComponent: import("react").ComponentType<{}> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
12
|
+
onLaunchAuthSession: (() => void) | undefined;
|
|
13
|
+
};
|
|
14
|
+
export { useWelcome };
|