@finspringinnovations/fixeddepositsdk 1.0.0
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 +128 -0
- package/lib/api/applicationApi.d.ts +1 -0
- package/lib/api/applicationApi.js +11 -0
- package/lib/api/bankApi.d.ts +352 -0
- package/lib/api/bankApi.js +54 -0
- package/lib/api/baseApi.d.ts +6 -0
- package/lib/api/baseApi.js +406 -0
- package/lib/api/customerApi.d.ts +855 -0
- package/lib/api/customerApi.js +241 -0
- package/lib/api/fdApi.d.ts +979 -0
- package/lib/api/fdApi.js +112 -0
- package/lib/api/fdCalculatorApi.d.ts +179 -0
- package/lib/api/fdCalculatorApi.js +36 -0
- package/lib/api/index.d.ts +14 -0
- package/lib/api/index.js +45 -0
- package/lib/api/interestRateApi.d.ts +585 -0
- package/lib/api/interestRateApi.js +101 -0
- package/lib/api/kycApi.d.ts +486 -0
- package/lib/api/kycApi.js +71 -0
- package/lib/api/masterDataApi.d.ts +158 -0
- package/lib/api/masterDataApi.js +35 -0
- package/lib/api/nomineeApi.d.ts +325 -0
- package/lib/api/nomineeApi.js +46 -0
- package/lib/api/onboardingApi.d.ts +192 -0
- package/lib/api/onboardingApi.js +41 -0
- package/lib/api/panApi.d.ts +0 -0
- package/lib/api/panApi.js +23 -0
- package/lib/api/paymentApi.d.ts +325 -0
- package/lib/api/paymentApi.js +46 -0
- package/lib/api/workflowApi.d.ts +654 -0
- package/lib/api/workflowApi.js +90 -0
- package/lib/assets/images/images.d.ts +6 -0
- package/lib/assets/images/images.js +12 -0
- package/lib/components/AadhaarInput.d.ts +13 -0
- package/lib/components/AadhaarInput.js +47 -0
- package/lib/components/ActionButton.d.ts +12 -0
- package/lib/components/ActionButton.js +87 -0
- package/lib/components/ActiveFDCard.d.ts +18 -0
- package/lib/components/ActiveFDCard.js +116 -0
- package/lib/components/AmountInput.d.ts +20 -0
- package/lib/components/AmountInput.js +142 -0
- package/lib/components/CheckboxOption.d.ts +11 -0
- package/lib/components/CheckboxOption.js +41 -0
- package/lib/components/CompanyHeader.d.ts +7 -0
- package/lib/components/CompanyHeader.js +59 -0
- package/lib/components/DropdownSelector.d.ts +9 -0
- package/lib/components/DropdownSelector.js +49 -0
- package/lib/components/EmptyState.d.ts +17 -0
- package/lib/components/EmptyState.js +44 -0
- package/lib/components/ErrorDisplay.d.ts +17 -0
- package/lib/components/ErrorDisplay.js +69 -0
- package/lib/components/FAQItem.d.ts +9 -0
- package/lib/components/FAQItem.js +52 -0
- package/lib/components/FDCard.d.ts +23 -0
- package/lib/components/FDCard.js +116 -0
- package/lib/components/FormDropdown.d.ts +18 -0
- package/lib/components/FormDropdown.js +155 -0
- package/lib/components/FormSection.d.ts +14 -0
- package/lib/components/FormSection.js +38 -0
- package/lib/components/Header.d.ts +14 -0
- package/lib/components/Header.js +52 -0
- package/lib/components/IFSCSearchResultCard.d.ts +13 -0
- package/lib/components/IFSCSearchResultCard.js +70 -0
- package/lib/components/InfoBox.d.ts +8 -0
- package/lib/components/InfoBox.js +39 -0
- package/lib/components/InterestRateCard.d.ts +8 -0
- package/lib/components/InterestRateCard.js +46 -0
- package/lib/components/LoadingIndicator.d.ts +12 -0
- package/lib/components/LoadingIndicator.js +30 -0
- package/lib/components/OTPInput.d.ts +17 -0
- package/lib/components/OTPInput.js +144 -0
- package/lib/components/PaymentDetailsCard.d.ts +20 -0
- package/lib/components/PaymentDetailsCard.js +68 -0
- package/lib/components/PendingFDBottomSheet.d.ts +19 -0
- package/lib/components/PendingFDBottomSheet.js +122 -0
- package/lib/components/SafeAreaWrapper.d.ts +13 -0
- package/lib/components/SafeAreaWrapper.js +41 -0
- package/lib/components/ScreenHeader.d.ts +11 -0
- package/lib/components/ScreenHeader.js +46 -0
- package/lib/components/StatusDisplay.d.ts +15 -0
- package/lib/components/StatusDisplay.js +88 -0
- package/lib/components/TextFieldWithLabel.d.ts +46 -0
- package/lib/components/TextFieldWithLabel.js +326 -0
- package/lib/components/TrustBox.d.ts +8 -0
- package/lib/components/TrustBox.js +46 -0
- package/lib/components/ValidationErrorAlert.d.ts +23 -0
- package/lib/components/ValidationErrorAlert.js +39 -0
- package/lib/components/ValidationMessage.d.ts +9 -0
- package/lib/components/ValidationMessage.js +98 -0
- package/lib/components/index.d.ts +35 -0
- package/lib/components/index.js +64 -0
- package/lib/config/apiConfig.d.ts +34 -0
- package/lib/config/apiConfig.js +158 -0
- package/lib/config/appDataConfig.d.ts +159 -0
- package/lib/config/appDataConfig.js +310 -0
- package/lib/config/encryptionConfig.d.ts +21 -0
- package/lib/config/encryptionConfig.js +61 -0
- package/lib/config/workflowConstants.d.ts +62 -0
- package/lib/config/workflowConstants.js +63 -0
- package/lib/constants/strings/bank.d.ts +72 -0
- package/lib/constants/strings/bank.js +86 -0
- package/lib/constants/strings/base64Images.d.ts +26 -0
- package/lib/constants/strings/base64Images.js +29 -0
- package/lib/constants/strings/common.d.ts +53 -0
- package/lib/constants/strings/common.js +62 -0
- package/lib/constants/strings/employee.d.ts +61 -0
- package/lib/constants/strings/employee.js +77 -0
- package/lib/constants/strings/faq.d.ts +14 -0
- package/lib/constants/strings/faq.js +20 -0
- package/lib/constants/strings/fd.d.ts +122 -0
- package/lib/constants/strings/fd.js +151 -0
- package/lib/constants/strings/home.d.ts +49 -0
- package/lib/constants/strings/home.js +62 -0
- package/lib/constants/strings/index.d.ts +16 -0
- package/lib/constants/strings/index.js +44 -0
- package/lib/constants/strings/kyc.d.ts +80 -0
- package/lib/constants/strings/kyc.js +94 -0
- package/lib/constants/strings/nominee.d.ts +64 -0
- package/lib/constants/strings/nominee.js +81 -0
- package/lib/hooks/useAuth.d.ts +25 -0
- package/lib/hooks/useAuth.js +39 -0
- package/lib/hooks/useFDData.d.ts +11 -0
- package/lib/hooks/useFDData.js +40 -0
- package/lib/index.d.ts +48 -0
- package/lib/index.js +161 -0
- package/lib/navigation/RootNavigator.d.ts +9 -0
- package/lib/navigation/RootNavigator.js +459 -0
- package/lib/navigation/SimpleNavigator.d.ts +11 -0
- package/lib/navigation/SimpleNavigator.js +114 -0
- package/lib/navigation/helpers.d.ts +11 -0
- package/lib/navigation/helpers.js +83 -0
- package/lib/navigation/index.d.ts +17 -0
- package/lib/navigation/index.js +42 -0
- package/lib/navigation/types.d.ts +139 -0
- package/lib/navigation/types.js +2 -0
- package/lib/navigation/workflowNavigator.d.ts +22 -0
- package/lib/navigation/workflowNavigator.js +104 -0
- package/lib/providers/ApiProvider.d.ts +7 -0
- package/lib/providers/ApiProvider.js +16 -0
- package/lib/providers/MasterDataProvider.d.ts +10 -0
- package/lib/providers/MasterDataProvider.js +54 -0
- package/lib/screens/AadhaarVerification.d.ts +7 -0
- package/lib/screens/AadhaarVerification.js +627 -0
- package/lib/screens/AddBankAccount.d.ts +22 -0
- package/lib/screens/AddBankAccount.js +381 -0
- package/lib/screens/BankDetail.d.ts +16 -0
- package/lib/screens/BankDetail.js +596 -0
- package/lib/screens/Employee.d.ts +18 -0
- package/lib/screens/Employee.js +594 -0
- package/lib/screens/FDCalculator.d.ts +18 -0
- package/lib/screens/FDCalculator.js +767 -0
- package/lib/screens/FDList.d.ts +28 -0
- package/lib/screens/FDList.js +1853 -0
- package/lib/screens/FindIFSC.d.ts +16 -0
- package/lib/screens/FindIFSC.js +248 -0
- package/lib/screens/NomineeDetail.d.ts +17 -0
- package/lib/screens/NomineeDetail.js +592 -0
- package/lib/screens/PayNow.d.ts +14 -0
- package/lib/screens/PayNow.js +230 -0
- package/lib/screens/Payment.d.ts +11 -0
- package/lib/screens/Payment.js +191 -0
- package/lib/screens/PaymentStatus.d.ts +16 -0
- package/lib/screens/PaymentStatus.js +431 -0
- package/lib/screens/ReviewKYC.d.ts +23 -0
- package/lib/screens/ReviewKYC.js +727 -0
- package/lib/state/paymentSession.d.ts +8 -0
- package/lib/state/paymentSession.js +13 -0
- package/lib/store/fdListSelectedSlice.d.ts +21 -0
- package/lib/store/fdListSelectedSlice.js +26 -0
- package/lib/store/hooks.d.ts +8 -0
- package/lib/store/hooks.js +8 -0
- package/lib/store/index.d.ts +3 -0
- package/lib/store/index.js +8 -0
- package/lib/store/onboardingSlice.d.ts +12 -0
- package/lib/store/onboardingSlice.js +32 -0
- package/lib/store/store.d.ts +13 -0
- package/lib/store/store.js +27 -0
- package/lib/theme/ThemeContext.d.ts +210 -0
- package/lib/theme/ThemeContext.js +92 -0
- package/lib/theme/colors.d.ts +80 -0
- package/lib/theme/colors.js +85 -0
- package/lib/theme/index.d.ts +35 -0
- package/lib/theme/index.js +78 -0
- package/lib/theme/shadows.d.ts +53 -0
- package/lib/theme/shadows.js +58 -0
- package/lib/theme/typography.d.ts +134 -0
- package/lib/theme/typography.js +143 -0
- package/lib/types/dataTypes.d.ts +34 -0
- package/lib/types/dataTypes.js +2 -0
- package/lib/types/workflowTypes.d.ts +2 -0
- package/lib/types/workflowTypes.js +2 -0
- package/lib/utils/apiLogger.d.ts +48 -0
- package/lib/utils/apiLogger.js +105 -0
- package/lib/utils/encryption.d.ts +28 -0
- package/lib/utils/encryption.js +113 -0
- package/lib/utils/getFDData.d.ts +48 -0
- package/lib/utils/getFDData.js +145 -0
- package/lib/utils/globalData.d.ts +2 -0
- package/lib/utils/globalData.js +10 -0
- package/package.json +51 -0
- package/src/api/applicationApi.ts +12 -0
- package/src/api/bankApi.ts +42 -0
- package/src/api/baseApi.ts +463 -0
- package/src/api/customerApi.ts +324 -0
- package/src/api/fdApi.ts +150 -0
- package/src/api/fdCalculatorApi.ts +41 -0
- package/src/api/index.ts +29 -0
- package/src/api/interestRateApi.ts +143 -0
- package/src/api/kycApi.ts +63 -0
- package/src/api/masterDataApi.ts +37 -0
- package/src/api/nomineeApi.ts +34 -0
- package/src/api/onboardingApi.ts +64 -0
- package/src/api/panApi.ts +25 -0
- package/src/api/paymentApi.ts +34 -0
- package/src/api/workflowApi.ts +94 -0
- package/src/assets/images/Mahindra.png +0 -0
- package/src/assets/images/arrow-filled.png +0 -0
- package/src/assets/images/arrow-left.png +0 -0
- package/src/assets/images/backicon.png +0 -0
- package/src/assets/images/calendar.png +0 -0
- package/src/assets/images/chevron-down.png +0 -0
- package/src/assets/images/chevron-down@2x.png +0 -0
- package/src/assets/images/chevron-down@3x.png +0 -0
- package/src/assets/images/images.js +10 -0
- package/src/assets/images/shriram_logo.png +0 -0
- package/src/components/AadhaarInput.tsx +91 -0
- package/src/components/ActionButton.tsx +129 -0
- package/src/components/ActiveFDCard.tsx +188 -0
- package/src/components/AmountInput.tsx +217 -0
- package/src/components/CheckboxOption.tsx +93 -0
- package/src/components/CompanyHeader.tsx +80 -0
- package/src/components/DropdownSelector.tsx +77 -0
- package/src/components/EmptyState.tsx +109 -0
- package/src/components/ErrorDisplay.tsx +135 -0
- package/src/components/FAQItem.tsx +90 -0
- package/src/components/FDCard.tsx +186 -0
- package/src/components/FormDropdown.tsx +214 -0
- package/src/components/FormSection.tsx +86 -0
- package/src/components/Header.tsx +110 -0
- package/src/components/IFSCSearchResultCard.tsx +139 -0
- package/src/components/InfoBox.tsx +55 -0
- package/src/components/InterestRateCard.tsx +77 -0
- package/src/components/LoadingIndicator.tsx +63 -0
- package/src/components/OTPInput.tsx +213 -0
- package/src/components/PaymentDetailsCard.tsx +120 -0
- package/src/components/PendingFDBottomSheet.tsx +237 -0
- package/src/components/README.md +210 -0
- package/src/components/SafeAreaWrapper.tsx +68 -0
- package/src/components/ScreenHeader.tsx +83 -0
- package/src/components/StatusDisplay.tsx +139 -0
- package/src/components/TextFieldWithLabel.tsx +502 -0
- package/src/components/TrustBox.tsx +63 -0
- package/src/components/ValidationErrorAlert.tsx +57 -0
- package/src/components/ValidationMessage.tsx +134 -0
- package/src/components/index.tsx +47 -0
- package/src/config/apiConfig.ts +217 -0
- package/src/config/appDataConfig.ts +358 -0
- package/src/config/encryptionConfig.ts +65 -0
- package/src/config/workflowConstants.ts +70 -0
- package/src/constants/strings/README.md +146 -0
- package/src/constants/strings/bank.ts +92 -0
- package/src/constants/strings/base64Images.ts +31 -0
- package/src/constants/strings/common.ts +63 -0
- package/src/constants/strings/employee.ts +85 -0
- package/src/constants/strings/faq.ts +23 -0
- package/src/constants/strings/fd.ts +172 -0
- package/src/constants/strings/home.ts +67 -0
- package/src/constants/strings/index.ts +21 -0
- package/src/constants/strings/kyc.ts +100 -0
- package/src/constants/strings/nominee.ts +90 -0
- package/src/hooks/useAuth.ts +42 -0
- package/src/hooks/useFDData.ts +48 -0
- package/src/index.tsx +139 -0
- package/src/navigation/RootNavigator.tsx +687 -0
- package/src/navigation/SimpleNavigator.tsx +123 -0
- package/src/navigation/helpers.ts +85 -0
- package/src/navigation/index.tsx +84 -0
- package/src/navigation/types.ts +146 -0
- package/src/navigation/workflowNavigator.ts +131 -0
- package/src/providers/ApiProvider.tsx +23 -0
- package/src/providers/MasterDataProvider.tsx +30 -0
- package/src/screens/AadhaarVerification.tsx +809 -0
- package/src/screens/AddBankAccount.tsx +541 -0
- package/src/screens/BankDetail.tsx +826 -0
- package/src/screens/Employee.tsx +822 -0
- package/src/screens/FDCalculator.tsx +1002 -0
- package/src/screens/FDList.tsx +2199 -0
- package/src/screens/FindIFSC.tsx +332 -0
- package/src/screens/NomineeDetail.tsx +800 -0
- package/src/screens/PayNow.tsx +282 -0
- package/src/screens/Payment.tsx +224 -0
- package/src/screens/PaymentStatus.tsx +595 -0
- package/src/screens/ReviewKYC.tsx +1062 -0
- package/src/state/paymentSession.ts +13 -0
- package/src/store/fdListSelectedSlice.ts +42 -0
- package/src/store/hooks.ts +6 -0
- package/src/store/index.ts +3 -0
- package/src/store/onboardingSlice.ts +37 -0
- package/src/store/store.ts +27 -0
- package/src/theme/ThemeContext.tsx +84 -0
- package/src/theme/colors.ts +90 -0
- package/src/theme/index.ts +85 -0
- package/src/theme/shadows.ts +61 -0
- package/src/theme/typography.ts +151 -0
- package/src/types/dataTypes.ts +37 -0
- package/src/types/env.d.ts +93 -0
- package/src/types/workflowTypes.ts +12 -0
- package/src/utils/apiLogger.ts +166 -0
- package/src/utils/encryption.ts +159 -0
- package/src/utils/getFDData.ts +165 -0
- package/src/utils/globalData.ts +7 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Home screen and navigation related strings
|
|
2
|
+
export const HOME_STRINGS = {
|
|
3
|
+
// Screen titles
|
|
4
|
+
HOME_TITLE: 'Home',
|
|
5
|
+
DASHBOARD_TITLE: 'Dashboard',
|
|
6
|
+
PROFILE_TITLE: 'Profile',
|
|
7
|
+
SETTINGS_TITLE: 'Settings',
|
|
8
|
+
NOTIFICATIONS_TITLE: 'Notifications',
|
|
9
|
+
|
|
10
|
+
// Navigation items
|
|
11
|
+
VIEW_MY_FDS: 'View My FDs',
|
|
12
|
+
BOOK_NEW_FD: 'Book New FD',
|
|
13
|
+
MY_ACCOUNT: 'My Account',
|
|
14
|
+
TRANSACTIONS: 'Transactions',
|
|
15
|
+
STATEMENTS: 'Statements',
|
|
16
|
+
HELP_SUPPORT: 'Help & Support',
|
|
17
|
+
LOGOUT: 'Logout',
|
|
18
|
+
|
|
19
|
+
// Welcome messages
|
|
20
|
+
WELCOME_MESSAGE: 'Welcome to FD',
|
|
21
|
+
WELCOME_SUBTITLE: 'Manage your Fixed Deposits with ease',
|
|
22
|
+
GOOD_MORNING: 'Good Morning',
|
|
23
|
+
GOOD_AFTERNOON: 'Good Afternoon',
|
|
24
|
+
GOOD_EVENING: 'Good Evening',
|
|
25
|
+
|
|
26
|
+
// Quick actions
|
|
27
|
+
QUICK_ACTIONS: 'Quick Actions',
|
|
28
|
+
RECENT_TRANSACTIONS: 'Recent Transactions',
|
|
29
|
+
ACTIVE_FDS: 'Active FDs',
|
|
30
|
+
MATURED_FDS: 'Matured FDs',
|
|
31
|
+
PENDING_REQUESTS: 'Pending Requests',
|
|
32
|
+
|
|
33
|
+
// FD related
|
|
34
|
+
FD_DETAILS: 'FD Details',
|
|
35
|
+
FD_INVESTMENT: 'FD Investment',
|
|
36
|
+
FD_MATURITY: 'FD Maturity',
|
|
37
|
+
FD_INTEREST: 'FD Interest',
|
|
38
|
+
FD_AMOUNT: 'FD Amount',
|
|
39
|
+
FD_TENURE: 'FD Tenure',
|
|
40
|
+
FD_RATE: 'FD Rate',
|
|
41
|
+
FD_STATUS: 'FD Status',
|
|
42
|
+
|
|
43
|
+
// Status indicators
|
|
44
|
+
ACTIVE: 'Active',
|
|
45
|
+
MATURED: 'Matured',
|
|
46
|
+
CANCELLED: 'Cancelled',
|
|
47
|
+
PENDING: 'Pending',
|
|
48
|
+
APPROVED: 'Approved',
|
|
49
|
+
REJECTED: 'Rejected',
|
|
50
|
+
|
|
51
|
+
// Information
|
|
52
|
+
PLATFORM_INFO: 'Platform',
|
|
53
|
+
SDK_VERSION: 'SDK Version',
|
|
54
|
+
APP_VERSION: 'App Version',
|
|
55
|
+
LAST_UPDATED: 'Last Updated',
|
|
56
|
+
|
|
57
|
+
// Empty states
|
|
58
|
+
NO_FDS_FOUND: 'No FDs found',
|
|
59
|
+
NO_TRANSACTIONS: 'No transactions found',
|
|
60
|
+
NO_NOTIFICATIONS: 'No notifications',
|
|
61
|
+
NO_DATA_AVAILABLE: 'No data available',
|
|
62
|
+
|
|
63
|
+
// Error states
|
|
64
|
+
LOADING_ERROR: 'Failed to load data',
|
|
65
|
+
NETWORK_ERROR: 'Network connection error',
|
|
66
|
+
SERVER_ERROR: 'Server error occurred',
|
|
67
|
+
} as const;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Central export file for all string constants
|
|
2
|
+
// This provides a single import point for all string literals used in the application
|
|
3
|
+
|
|
4
|
+
export { COMMON_STRINGS } from './common';
|
|
5
|
+
export { HOME_STRINGS } from './home';
|
|
6
|
+
export { KYC_STRINGS } from './kyc';
|
|
7
|
+
export { EMPLOYEE_STRINGS } from './employee';
|
|
8
|
+
export { BANK_STRINGS } from './bank';
|
|
9
|
+
export { NOMINEE_STRINGS } from './nominee';
|
|
10
|
+
export { FD_STRINGS } from './fd';
|
|
11
|
+
export { FAQ_STRINGS } from './faq';
|
|
12
|
+
|
|
13
|
+
// Re-export all strings as a single object for convenience
|
|
14
|
+
export * from './common';
|
|
15
|
+
export * from './home';
|
|
16
|
+
export * from './kyc';
|
|
17
|
+
export * from './employee';
|
|
18
|
+
export * from './bank';
|
|
19
|
+
export * from './nominee';
|
|
20
|
+
export * from './fd';
|
|
21
|
+
export * from './faq';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// KYC and verification related strings
|
|
2
|
+
export const KYC_STRINGS = {
|
|
3
|
+
// Screen titles
|
|
4
|
+
REVIEW_KYC_TITLE: 'Review KYC',
|
|
5
|
+
AADHAAR_VERIFICATION_TITLE: 'Aadhaar Verification',
|
|
6
|
+
PAN_VERIFICATION_TITLE: 'PAN Verification',
|
|
7
|
+
DOCUMENT_VERIFICATION_TITLE: 'Document Verification',
|
|
8
|
+
|
|
9
|
+
// Form labels
|
|
10
|
+
PAN_CARD_LABEL: 'Pan Card',
|
|
11
|
+
DATE_OF_BIRTH_LABEL: 'Date of Birth',
|
|
12
|
+
MARITAL_STATUS_LABEL: 'Marital Status',
|
|
13
|
+
AREA_LABEL: 'Area',
|
|
14
|
+
CITY_LABEL: 'City',
|
|
15
|
+
ADDRESS_LINE1_LABEL: 'Address Line 1',
|
|
16
|
+
ADDRESS_LINE2_LABEL: 'Address Line 2',
|
|
17
|
+
PINCODE_LABEL: 'Pincode',
|
|
18
|
+
STATE_LABEL: 'State',
|
|
19
|
+
COUNTRY_LABEL: 'Country',
|
|
20
|
+
AADHAAR_NUMBER_LABEL: 'Aadhaar Number',
|
|
21
|
+
AADHAAR_CARD_LABEL: 'Aadhaar Card',
|
|
22
|
+
OTP_LABEL: 'OTP',
|
|
23
|
+
|
|
24
|
+
// Placeholders
|
|
25
|
+
PAN_CARD_PLACEHOLDER: 'Enter PAN Card',
|
|
26
|
+
DATE_OF_BIRTH_PLACEHOLDER: 'Select Date of Birth',
|
|
27
|
+
MARITAL_STATUS_PLACEHOLDER: 'Select Marital Status',
|
|
28
|
+
AREA_PLACEHOLDER: 'Enter Area',
|
|
29
|
+
CITY_PLACEHOLDER: 'Enter City',
|
|
30
|
+
ADDRESS_LINE1_PLACEHOLDER: 'Enter Address Line 1',
|
|
31
|
+
ADDRESS_LINE2_PLACEHOLDER: 'Enter Address Line 2',
|
|
32
|
+
PINCODE_PLACEHOLDER: 'Enter Pincode',
|
|
33
|
+
STATE_PLACEHOLDER: 'Enter State',
|
|
34
|
+
COUNTRY_PLACEHOLDER: 'Enter Country',
|
|
35
|
+
AADHAAR_NUMBER_PLACEHOLDER: 'Enter Aadhaar Number',
|
|
36
|
+
OTP_PLACEHOLDER: 'Enter OTP',
|
|
37
|
+
|
|
38
|
+
// Marital status options
|
|
39
|
+
MARITAL_STATUS_SINGLE: 'Single',
|
|
40
|
+
MARITAL_STATUS_MARRIED: 'Married',
|
|
41
|
+
MARITAL_STATUS_DIVORCED: 'Divorced',
|
|
42
|
+
MARITAL_STATUS_WIDOWED: 'Widowed',
|
|
43
|
+
|
|
44
|
+
// Buttons
|
|
45
|
+
VERIFY_AADHAAR_BUTTON: 'Verify Aadhaar',
|
|
46
|
+
VERIFY_OTP_BUTTON: 'Verify OTP',
|
|
47
|
+
RESEND_OTP_BUTTON: 'Resend OTP',
|
|
48
|
+
SEND_OTP_BUTTON: 'Send OTP',
|
|
49
|
+
|
|
50
|
+
// Messages
|
|
51
|
+
AADHAAR_VERIFICATION_SUCCESS: 'Aadhaar verified successfully',
|
|
52
|
+
AADHAAR_VERIFICATION_FAILED: 'Aadhaar verification failed',
|
|
53
|
+
AADHAAR_ALREADY_VERIFIED: 'Aadhaar already verified',
|
|
54
|
+
AADHAAR_NUMBER_VERIFIED: 'Aadhaar number verified.',
|
|
55
|
+
PAN_VERIFICATION_SUCCESS: 'PAN verified successfully',
|
|
56
|
+
PAN_VERIFICATION_FAILED: 'PAN verification failed',
|
|
57
|
+
OTP_SENT_SUCCESS: 'OTP sent successfully',
|
|
58
|
+
OTP_VERIFICATION_SUCCESS: 'OTP verified successfully',
|
|
59
|
+
OTP_VERIFICATION_FAILED: 'OTP verification failed',
|
|
60
|
+
KYC_COMPLETED: 'KYC completed successfully',
|
|
61
|
+
KYC_PENDING: 'KYC verification pending',
|
|
62
|
+
SENDING_OTP: 'Sending OTP...',
|
|
63
|
+
VERIFYING_OTP: 'Verifying OTP...',
|
|
64
|
+
RESENDING_OTP: 'Resending OTP...',
|
|
65
|
+
|
|
66
|
+
// Error messages
|
|
67
|
+
INVALID_PAN: 'Invalid PAN number',
|
|
68
|
+
INVALID_AADHAAR: 'Invalid Aadhaar number',
|
|
69
|
+
INVALID_OTP: 'Invalid OTP',
|
|
70
|
+
INVALID_OR_EXPIRED_OTP: 'Invalid or expired OTP. Please try again.',
|
|
71
|
+
OTP_EXPIRED: 'OTP has expired',
|
|
72
|
+
VERIFICATION_FAILED: 'Verification failed',
|
|
73
|
+
DOCUMENT_UPLOAD_FAILED: 'Document upload failed',
|
|
74
|
+
AADHAAR_ERROR_GENERIC: 'Something went wrong, check your Aadhaar number and try again.',
|
|
75
|
+
RESEND_OTP_FAILED: 'Failed to resend OTP. Please try again.',
|
|
76
|
+
FAILED_TO_PROCEED: 'Failed to proceed. Please try again.',
|
|
77
|
+
|
|
78
|
+
// Validation messages
|
|
79
|
+
PAN_REQUIRED: 'PAN number is required',
|
|
80
|
+
AADHAAR_REQUIRED: 'Aadhaar number is required',
|
|
81
|
+
AADHAAR_MUST_BE_12_DIGITS: 'Aadhaar number must be 12 digits',
|
|
82
|
+
OTP_REQUIRED: 'OTP is required',
|
|
83
|
+
OTP_INCOMPLETE: 'Please enter the complete 6-digit OTP',
|
|
84
|
+
DATE_OF_BIRTH_REQUIRED: 'Date of birth is required',
|
|
85
|
+
MARITAL_STATUS_REQUIRED: 'Marital status is required',
|
|
86
|
+
ADDRESS_REQUIRED: 'Address is required',
|
|
87
|
+
PINCODE_REQUIRED: 'Pincode is required',
|
|
88
|
+
|
|
89
|
+
// Status messages
|
|
90
|
+
VERIFICATION_IN_PROGRESS: 'Verification in progress...',
|
|
91
|
+
DOCUMENT_UNDER_REVIEW: 'Document under review',
|
|
92
|
+
VERIFICATION_COMPLETED: 'Verification completed',
|
|
93
|
+
VERIFICATION_REJECTED: 'Verification rejected',
|
|
94
|
+
|
|
95
|
+
// Instructions
|
|
96
|
+
AADHAAR_INSTRUCTIONS: 'Please enter your 12-digit Aadhaar number',
|
|
97
|
+
PAN_INSTRUCTIONS: 'Please enter your 10-character PAN number',
|
|
98
|
+
OTP_INSTRUCTIONS: 'Please enter the OTP sent to your registered mobile number',
|
|
99
|
+
DOCUMENT_INSTRUCTIONS: 'Please upload clear images of your documents',
|
|
100
|
+
} as const;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Nominee related strings
|
|
2
|
+
export const NOMINEE_STRINGS = {
|
|
3
|
+
// Screen titles
|
|
4
|
+
NOMINEE_DETAILS_TITLE: 'Nominee Details',
|
|
5
|
+
ADD_NOMINEE_TITLE: 'Add Nominee',
|
|
6
|
+
EDIT_NOMINEE_TITLE: 'Edit Nominee',
|
|
7
|
+
|
|
8
|
+
// Form labels
|
|
9
|
+
MAKE_NOMINATION_LABEL: 'Do you wish to make a nomination for this deposit?',
|
|
10
|
+
NOMINEE_TITLE_LABEL: 'Nominee Title',
|
|
11
|
+
NOMINEE_NAME_LABEL: 'Nominee Name',
|
|
12
|
+
RELATIONSHIP_LABEL: 'Relationship',
|
|
13
|
+
DATE_OF_BIRTH_LABEL: 'Date of Birth',
|
|
14
|
+
PRINT_NAME_ON_CERTIFICATE_LABEL: 'Print Name on Certificate',
|
|
15
|
+
|
|
16
|
+
// Placeholders
|
|
17
|
+
MAKE_NOMINATION_PLACEHOLDER: 'Select Option',
|
|
18
|
+
NOMINEE_TITLE_PLACEHOLDER: '',
|
|
19
|
+
NOMINEE_NAME_PLACEHOLDER: 'Enter Nominee Name',
|
|
20
|
+
RELATIONSHIP_PLACEHOLDER: 'Select Relationship',
|
|
21
|
+
DATE_OF_BIRTH_PLACEHOLDER: 'Select Date of Birth',
|
|
22
|
+
|
|
23
|
+
// Nomination options
|
|
24
|
+
MAKE_NOMINATION_YES: 'Yes',
|
|
25
|
+
MAKE_NOMINATION_NO: 'No',
|
|
26
|
+
|
|
27
|
+
// Title options
|
|
28
|
+
TITLE_MR: 'Mr.',
|
|
29
|
+
TITLE_MRS: 'Mrs.',
|
|
30
|
+
TITLE_MS: 'Ms.',
|
|
31
|
+
TITLE_DR: 'Dr.',
|
|
32
|
+
TITLE_PROF: 'Prof.',
|
|
33
|
+
|
|
34
|
+
// Relationship options
|
|
35
|
+
RELATIONSHIP_SPOUSE: 'Spouse',
|
|
36
|
+
RELATIONSHIP_SON: 'Son',
|
|
37
|
+
RELATIONSHIP_DAUGHTER: 'Daughter',
|
|
38
|
+
RELATIONSHIP_FATHER: 'Father',
|
|
39
|
+
RELATIONSHIP_MOTHER: 'Mother',
|
|
40
|
+
RELATIONSHIP_BROTHER: 'Brother',
|
|
41
|
+
RELATIONSHIP_SISTER: 'Sister',
|
|
42
|
+
RELATIONSHIP_OTHER: 'Other',
|
|
43
|
+
|
|
44
|
+
// Buttons
|
|
45
|
+
SAVE_NOMINEE_BUTTON: 'Save Nominee Details',
|
|
46
|
+
UPDATE_NOMINEE_BUTTON: 'Update Nominee Details',
|
|
47
|
+
DELETE_NOMINEE_BUTTON: 'Delete Nominee',
|
|
48
|
+
ADD_NOMINEE_BUTTON: 'Add Nominee',
|
|
49
|
+
|
|
50
|
+
// Messages
|
|
51
|
+
NOMINEE_SAVED_SUCCESS: 'Nominee details saved successfully',
|
|
52
|
+
NOMINEE_SAVED_FAILED: 'Failed to save nominee details',
|
|
53
|
+
NOMINEE_UPDATED_SUCCESS: 'Nominee details updated successfully',
|
|
54
|
+
NOMINEE_UPDATED_FAILED: 'Failed to update nominee details',
|
|
55
|
+
NOMINEE_DELETED_SUCCESS: 'Nominee deleted successfully',
|
|
56
|
+
NOMINEE_DELETED_FAILED: 'Failed to delete nominee',
|
|
57
|
+
NOMINEE_ADDED_SUCCESS: 'Nominee added successfully',
|
|
58
|
+
NOMINEE_ADDED_FAILED: 'Failed to add nominee',
|
|
59
|
+
|
|
60
|
+
// Validation messages
|
|
61
|
+
MAKE_NOMINATION_REQUIRED: 'Please specify if you want to make a nomination',
|
|
62
|
+
NOMINEE_TITLE_REQUIRED: 'Nominee title is required',
|
|
63
|
+
NOMINEE_NAME_REQUIRED: 'Nominee name is required',
|
|
64
|
+
RELATIONSHIP_REQUIRED: 'Relationship is required',
|
|
65
|
+
DATE_OF_BIRTH_REQUIRED: 'Date of birth is required',
|
|
66
|
+
INVALID_DATE_OF_BIRTH: 'Please enter a valid date of birth',
|
|
67
|
+
NOMINEE_AGE_RESTRICTION: 'Nominee must be at least 18 years old',
|
|
68
|
+
|
|
69
|
+
// Conditional messages
|
|
70
|
+
NOMINEE_FIELDS_HIDDEN: 'Nominee details are only required when nomination is made',
|
|
71
|
+
NOMINEE_FIELDS_CLEARED: 'Nominee fields cleared as nomination is not required',
|
|
72
|
+
|
|
73
|
+
// Instructions
|
|
74
|
+
NOMINEE_INSTRUCTIONS: 'Please provide nominee details if you wish to make a nomination',
|
|
75
|
+
NOMINEE_TITLE_INSTRUCTIONS: 'Select the appropriate title for the nominee',
|
|
76
|
+
NOMINEE_NAME_INSTRUCTIONS: 'Enter the full name of the nominee',
|
|
77
|
+
RELATIONSHIP_INSTRUCTIONS: 'Select your relationship with the nominee',
|
|
78
|
+
DATE_OF_BIRTH_INSTRUCTIONS: 'Enter the date of birth of the nominee',
|
|
79
|
+
PRINT_NAME_INSTRUCTIONS: 'Would you like the nominee’s name to be printed on the Fixed Deposit certificate? ',
|
|
80
|
+
|
|
81
|
+
// Information messages
|
|
82
|
+
NOMINEE_BENEFITS: 'Nominee will receive the FD amount in case of your demise',
|
|
83
|
+
NOMINEE_OPTIONAL: 'Nomination is optional but recommended',
|
|
84
|
+
NOMINEE_CAN_BE_CHANGED: 'Nominee details can be changed later if needed',
|
|
85
|
+
|
|
86
|
+
// Error messages
|
|
87
|
+
NOMINEE_SAVE_ERROR: 'Unable to save nominee details. Please check your information and try again.',
|
|
88
|
+
NOMINEE_UPDATE_ERROR: 'Unable to update nominee details. Please try again.',
|
|
89
|
+
NOMINEE_DELETE_ERROR: 'Unable to delete nominee. Please try again.',
|
|
90
|
+
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useAppSelector } from '../store';
|
|
2
|
+
|
|
3
|
+
// Custom hook for authentication management (simplified for interest rate API)
|
|
4
|
+
export const useAuth = () => {
|
|
5
|
+
// Get auth state from Redux store (placeholder for now)
|
|
6
|
+
const authState = useAppSelector((state) => (state as any).auth);
|
|
7
|
+
|
|
8
|
+
// Mock user data for now
|
|
9
|
+
const currentUser = {
|
|
10
|
+
id: '1',
|
|
11
|
+
name: 'Demo User',
|
|
12
|
+
email: 'demo@shriram.com',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
// Auth state
|
|
17
|
+
isAuthenticated: true, // Mock authenticated state
|
|
18
|
+
token: 'mock-token',
|
|
19
|
+
currentUser,
|
|
20
|
+
|
|
21
|
+
// Loading states
|
|
22
|
+
isLoading: false,
|
|
23
|
+
isLoggingOut: false,
|
|
24
|
+
|
|
25
|
+
// Error states
|
|
26
|
+
loginError: null,
|
|
27
|
+
userError: null,
|
|
28
|
+
hasError: false,
|
|
29
|
+
|
|
30
|
+
// Actions (mock implementations)
|
|
31
|
+
login: async (email: string, password: string) => {
|
|
32
|
+
return { token: 'mock-token', user: currentUser };
|
|
33
|
+
},
|
|
34
|
+
logout: async () => {
|
|
35
|
+
},
|
|
36
|
+
refetchUser: () => {
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// Raw data
|
|
40
|
+
loginData: null,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useGetInterestRatesMutation } from '../api';
|
|
2
|
+
import { useAppSelector } from '../store';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { isSDKInitialized } from '../config/appDataConfig';
|
|
5
|
+
|
|
6
|
+
// Custom hook for Interest Rate data management
|
|
7
|
+
export const useFDData = () => {
|
|
8
|
+
// Get all interest rates
|
|
9
|
+
const [getInterestRates, {
|
|
10
|
+
data: interestRates,
|
|
11
|
+
error: interestRatesError,
|
|
12
|
+
isLoading: interestRatesLoading,
|
|
13
|
+
}] = useGetInterestRatesMutation();
|
|
14
|
+
|
|
15
|
+
// Trigger API call on mount
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
// The API will automatically use app data if SDK is initialized
|
|
18
|
+
// If not initialized, it will use fallback values
|
|
19
|
+
getInterestRates({});
|
|
20
|
+
}, [getInterestRates]);
|
|
21
|
+
|
|
22
|
+
// Get current user (if available) - placeholder for now
|
|
23
|
+
const currentUser = useAppSelector((state) => (state as any).user?.currentUser);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
// Interest Rates data
|
|
27
|
+
interestRates: interestRates?.data?.sdrScheme || [],
|
|
28
|
+
fdrScheme: interestRates?.data?.fdrScheme || [],
|
|
29
|
+
interestRatesError,
|
|
30
|
+
interestRatesLoading,
|
|
31
|
+
refetchInterestRates: getInterestRates,
|
|
32
|
+
|
|
33
|
+
// User data
|
|
34
|
+
currentUser,
|
|
35
|
+
|
|
36
|
+
// Loading state
|
|
37
|
+
isLoading: interestRatesLoading,
|
|
38
|
+
|
|
39
|
+
// Error state
|
|
40
|
+
hasError: !!interestRatesError,
|
|
41
|
+
|
|
42
|
+
// Refresh all data
|
|
43
|
+
refreshAll: () => {
|
|
44
|
+
// The API will automatically use app data if SDK is initialized
|
|
45
|
+
getInterestRates({});
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
};
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// React Native crypto polyfill - MUST be imported first
|
|
2
|
+
import 'react-native-get-random-values';
|
|
3
|
+
|
|
4
|
+
// Main SDK UI exports (trimmed to FDList “home”)
|
|
5
|
+
import FDListComponent from './screens/FDList';
|
|
6
|
+
import PendingFDBottomSheetComponent from './components/PendingFDBottomSheet';
|
|
7
|
+
|
|
8
|
+
export const FDList = FDListComponent;
|
|
9
|
+
export const PendingFDBottomSheet = PendingFDBottomSheetComponent;
|
|
10
|
+
|
|
11
|
+
// Export types (trimmed to FDList-related types)
|
|
12
|
+
export type { FDListProps } from './screens/FDList';
|
|
13
|
+
|
|
14
|
+
// Export navigation - Direct imports to ensure they work
|
|
15
|
+
import { SDKNavigationContainer, SimpleNavigator } from './navigation';
|
|
16
|
+
export { SDKNavigationContainer, SimpleNavigator };
|
|
17
|
+
export { SDKNavigationContainer as FDSDKNavigator };
|
|
18
|
+
|
|
19
|
+
// Export theme system
|
|
20
|
+
export * from './theme';
|
|
21
|
+
export { ThemeProvider, useTheme, useColors, useTypography, useShadows, useSpacing } from './theme/ThemeContext';
|
|
22
|
+
|
|
23
|
+
// Export API system
|
|
24
|
+
export * from './api';
|
|
25
|
+
export { ApiProvider } from './providers/ApiProvider';
|
|
26
|
+
export { MasterDataProvider, useMasterData } from './providers/MasterDataProvider';
|
|
27
|
+
export { useFDData } from './hooks/useFDData';
|
|
28
|
+
export { useAuth } from './hooks/useAuth';
|
|
29
|
+
export { store, useAppDispatch, useAppSelector } from './store';
|
|
30
|
+
|
|
31
|
+
// Export encryption utilities
|
|
32
|
+
export * from './utils/encryption';
|
|
33
|
+
export {
|
|
34
|
+
getEncryptionConfig,
|
|
35
|
+
getEncryptionConfigs,
|
|
36
|
+
getEnvironmentConfig as getEncryptionEnvironmentConfig,
|
|
37
|
+
validateEncryptionConfig
|
|
38
|
+
} from './config/encryptionConfig';
|
|
39
|
+
|
|
40
|
+
// Export configuration utilities
|
|
41
|
+
export * from './config/apiConfig';
|
|
42
|
+
export { debugApiConfig, debugApiCall, logEnvironmentInfo } from './config/apiConfig';
|
|
43
|
+
|
|
44
|
+
// Export app data configuration and theming helpers
|
|
45
|
+
export {
|
|
46
|
+
initializeSDK,
|
|
47
|
+
getAppData,
|
|
48
|
+
isSDKInitialized,
|
|
49
|
+
getUserInfoForAPI,
|
|
50
|
+
getUserDemographics,
|
|
51
|
+
validateAppData,
|
|
52
|
+
clearAppData,
|
|
53
|
+
initializeEnvironment,
|
|
54
|
+
getEnvironmentData,
|
|
55
|
+
isEnvironmentInitialized,
|
|
56
|
+
clearEnvironmentData,
|
|
57
|
+
clearAllData,
|
|
58
|
+
setSDKColors,
|
|
59
|
+
getSDKColors,
|
|
60
|
+
clearSDKColors,
|
|
61
|
+
} from './config/appDataConfig';
|
|
62
|
+
export type { AppData, EnvironmentData, CustomColors } from './config/appDataConfig';
|
|
63
|
+
|
|
64
|
+
// Export validation utilities
|
|
65
|
+
export { showValidationErrorAlert, validateAndProceed } from './components/ValidationErrorAlert';
|
|
66
|
+
export type { ValidationErrorAlertProps } from './components/ValidationErrorAlert';
|
|
67
|
+
|
|
68
|
+
// Export workflow constants
|
|
69
|
+
export {
|
|
70
|
+
WORKFLOW_STATES,
|
|
71
|
+
WORKFLOW_TASKS,
|
|
72
|
+
WORKFLOW_CONSTANTS,
|
|
73
|
+
getWorkflowStateName,
|
|
74
|
+
getWorkflowTaskName,
|
|
75
|
+
} from './config/workflowConstants';
|
|
76
|
+
export type { WorkflowState, WorkflowTask } from './config/workflowConstants';
|
|
77
|
+
|
|
78
|
+
// Export logging utilities
|
|
79
|
+
export { apiLogger, ApiLogger } from './utils/apiLogger';
|
|
80
|
+
export type { LogConfig, RequestLogData, ResponseLogData } from './utils/apiLogger';
|
|
81
|
+
|
|
82
|
+
// Export encryption control utilities
|
|
83
|
+
export { toggleEncryption, isEncryptionEnabled, getCurrentApiConfig } from './api/baseApi';
|
|
84
|
+
|
|
85
|
+
// Export FD data retrieval utility
|
|
86
|
+
export { getFDData } from './utils/getFDData';
|
|
87
|
+
export type { FDDataResponse } from './utils/getFDData';
|
|
88
|
+
|
|
89
|
+
// Import theme types
|
|
90
|
+
import type { ThemeName, Theme } from './theme';
|
|
91
|
+
|
|
92
|
+
// SDK Configuration
|
|
93
|
+
export interface SDKConfig {
|
|
94
|
+
apiBaseUrl?: string;
|
|
95
|
+
theme?: ThemeName | Theme; // Allow theme name or custom theme object
|
|
96
|
+
environment?: 'development' | 'staging' | 'production';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// SDK Main Class
|
|
100
|
+
export class FDSDK {
|
|
101
|
+
private config: SDKConfig;
|
|
102
|
+
|
|
103
|
+
constructor(config: SDKConfig = {}) {
|
|
104
|
+
this.config = {
|
|
105
|
+
apiBaseUrl: 'https://api.fd.com',
|
|
106
|
+
environment: 'production',
|
|
107
|
+
theme: 'primary' as ThemeName,
|
|
108
|
+
...config,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// Log environment information when SDK instance is created
|
|
112
|
+
import('./config/apiConfig').then(({ logEnvironmentInfo }) => {
|
|
113
|
+
logEnvironmentInfo();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
getConfig(): SDKConfig {
|
|
118
|
+
return this.config;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
updateConfig(newConfig: Partial<SDKConfig>): void {
|
|
122
|
+
this.config = { ...this.config, ...newConfig };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Utility methods
|
|
126
|
+
static getVersion(): string {
|
|
127
|
+
return '1.0.0';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static getPlatformInfo(): { platform: string; version: string } {
|
|
131
|
+
return {
|
|
132
|
+
platform: 'react-native',
|
|
133
|
+
version: '1.0.0',
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Default export
|
|
139
|
+
export default FDSDK;
|