@finspringinnovations/fdsdk 0.0.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 +184 -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 +8 -0
- package/lib/api/baseApi.js +456 -0
- package/lib/api/customerApi.d.ts +855 -0
- package/lib/api/customerApi.js +213 -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 +32 -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 +4 -0
- package/lib/assets/images/images.js +10 -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 +16 -0
- package/lib/components/ActiveFDCard.js +95 -0
- package/lib/components/AmountInput.d.ts +20 -0
- package/lib/components/AmountInput.js +144 -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 +57 -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 +21 -0
- package/lib/components/FDCard.js +96 -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 +18 -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 +45 -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 +114 -0
- package/lib/config/appDataConfig.js +264 -0
- package/lib/config/encryptionConfig.d.ts +21 -0
- package/lib/config/encryptionConfig.js +61 -0
- package/lib/config/workflowConstants.d.ts +37 -0
- package/lib/config/workflowConstants.js +38 -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 +25 -0
- package/lib/constants/strings/base64Images.js +28 -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 +69 -0
- package/lib/index.js +182 -0
- package/lib/navigation/RootNavigator.d.ts +8 -0
- package/lib/navigation/RootNavigator.js +205 -0
- package/lib/navigation/SimpleNavigator.d.ts +11 -0
- package/lib/navigation/SimpleNavigator.js +107 -0
- package/lib/navigation/helpers.d.ts +11 -0
- package/lib/navigation/helpers.js +83 -0
- package/lib/navigation/index.d.ts +15 -0
- package/lib/navigation/index.js +42 -0
- package/lib/navigation/types.d.ts +113 -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 +34 -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/BookFD.d.ts +0 -0
- package/lib/screens/BookFD.js +315 -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 +759 -0
- package/lib/screens/FDList.d.ts +27 -0
- package/lib/screens/FDList.js +1008 -0
- package/lib/screens/FindIFSC.d.ts +16 -0
- package/lib/screens/FindIFSC.js +248 -0
- package/lib/screens/Home.d.ts +0 -0
- package/lib/screens/Home.js +143 -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 +397 -0
- package/lib/screens/ReviewKYC.d.ts +21 -0
- package/lib/screens/ReviewKYC.js +660 -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 +31 -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 +33 -0
- package/lib/theme/ThemeContext.d.ts +210 -0
- package/lib/theme/ThemeContext.js +90 -0
- package/lib/theme/colors.d.ts +80 -0
- package/lib/theme/colors.js +85 -0
- package/lib/theme/index.d.ts +34 -0
- package/lib/theme/index.js +69 -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 +154 -0
- package/lib/utils/globalData.d.ts +2 -0
- package/lib/utils/globalData.js +10 -0
- package/package.json +76 -0
- package/src/api/applicationApi.ts +12 -0
- package/src/api/bankApi.ts +42 -0
- package/src/api/baseApi.ts +513 -0
- package/src/api/customerApi.ts +291 -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 +34 -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/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 +8 -0
- package/src/components/AadhaarInput.tsx +91 -0
- package/src/components/ActionButton.tsx +129 -0
- package/src/components/ActiveFDCard.tsx +158 -0
- package/src/components/AmountInput.tsx +217 -0
- package/src/components/CheckboxOption.tsx +93 -0
- package/src/components/CompanyHeader.tsx +78 -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 +165 -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 +235 -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 +279 -0
- package/src/config/encryptionConfig.ts +65 -0
- package/src/config/workflowConstants.ts +43 -0
- package/src/constants/strings/README.md +146 -0
- package/src/constants/strings/bank.ts +92 -0
- package/src/constants/strings/base64Images.ts +29 -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 +173 -0
- package/src/navigation/RootNavigator.tsx +352 -0
- package/src/navigation/SimpleNavigator.tsx +107 -0
- package/src/navigation/helpers.ts +85 -0
- package/src/navigation/index.tsx +81 -0
- package/src/navigation/types.ts +124 -0
- package/src/navigation/workflowNavigator.ts +131 -0
- package/src/providers/ApiProvider.tsx +43 -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/BookFD.tsx +330 -0
- package/src/screens/Employee.tsx +822 -0
- package/src/screens/FDCalculator.tsx +987 -0
- package/src/screens/FDList.tsx +1284 -0
- package/src/screens/FindIFSC.tsx +332 -0
- package/src/screens/Home.tsx +152 -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 +561 -0
- package/src/screens/ReviewKYC.tsx +956 -0
- package/src/state/paymentSession.ts +13 -0
- package/src/store/fdListSelectedSlice.ts +42 -0
- package/src/store/hooks.ts +27 -0
- package/src/store/index.ts +3 -0
- package/src/store/onboardingSlice.ts +37 -0
- package/src/store/store.ts +35 -0
- package/src/theme/ThemeContext.tsx +82 -0
- package/src/theme/colors.ts +90 -0
- package/src/theme/index.ts +64 -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 +175 -0
- package/src/utils/globalData.ts +7 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colors = void 0;
|
|
4
|
+
// Color palette for the SDK
|
|
5
|
+
exports.colors = {
|
|
6
|
+
// Primary Theme (Default)
|
|
7
|
+
primary: {
|
|
8
|
+
primary: '#3073e0', // Main primary color
|
|
9
|
+
tabSelected: '#3073e0',
|
|
10
|
+
headerBg: '#415fe6',
|
|
11
|
+
headerText: '#ffffff', // White header text
|
|
12
|
+
success: '#32c997', // 7.5% ap
|
|
13
|
+
textSecondary: '#8f8f8f', // ROI text
|
|
14
|
+
border: '#606677', // with 36% opacity
|
|
15
|
+
shadow: '#000000', // with 10% opacity
|
|
16
|
+
// Additional colors for complete theme
|
|
17
|
+
background: '#ffffff',
|
|
18
|
+
surface: '#f8f9fa',
|
|
19
|
+
text: '#1a1a1a',
|
|
20
|
+
textLight: '#6c757d',
|
|
21
|
+
error: '#dc3545',
|
|
22
|
+
warning: '#ffc107',
|
|
23
|
+
info: '#17a2b8',
|
|
24
|
+
muted: '#f0f0f0',
|
|
25
|
+
black: '#000000',
|
|
26
|
+
inputBackground: '#ffffff', // Input and box background color for primary theme
|
|
27
|
+
inputBorder: '#606677', // Input border color for primary theme
|
|
28
|
+
placeholderColor: 'rgba(0,0,0,0.2)', // Placeholder color for primary theme
|
|
29
|
+
labelColor: '#1a1a1a', // Label text color for primary theme
|
|
30
|
+
buttonBackground: '#415fe6', // Button background color for primary theme
|
|
31
|
+
buttonTextColor: '#ffffff', // Button text color for primary theme
|
|
32
|
+
cancelButtonBg: '#f8f9fa', // Cancel button background for primary theme
|
|
33
|
+
},
|
|
34
|
+
// Alternative themes can be added here
|
|
35
|
+
dark: {
|
|
36
|
+
primary: '#4285f4', // Main primary color
|
|
37
|
+
tabSelected: '#ffc631',
|
|
38
|
+
headerBg: '#051620',
|
|
39
|
+
headerText: '#ffffff', // White header text for dark theme
|
|
40
|
+
success: '#48bb78',
|
|
41
|
+
textSecondary: '#a0aec0',
|
|
42
|
+
border: '#154c6e',
|
|
43
|
+
shadow: '#154c6e',
|
|
44
|
+
background: '#000000', // Pure black background
|
|
45
|
+
surface: '#082739',
|
|
46
|
+
text: '#ffffff',
|
|
47
|
+
textLight: '#a0aec0',
|
|
48
|
+
error: '#f56565',
|
|
49
|
+
warning: '#ed8936',
|
|
50
|
+
info: '#4299e1',
|
|
51
|
+
muted: '#2a2a2a',
|
|
52
|
+
inputBackground: '#082739', // Input and box background color for dark theme
|
|
53
|
+
inputBorder: '#195C86', // Input border color for dark theme
|
|
54
|
+
placeholderColor: '#a0aec0', // Placeholder color for dark theme (light gray)
|
|
55
|
+
labelColor: '#ffffff', // Label text color for dark theme (white)
|
|
56
|
+
buttonBackground: '#ffc631', // Button background color for dark theme
|
|
57
|
+
buttonTextColor: '#000000', // Button text color for dark theme (black)
|
|
58
|
+
cancelButtonBg: '#0d3248', // Cancel button background for dark theme
|
|
59
|
+
},
|
|
60
|
+
corporate: {
|
|
61
|
+
primary: '#1e40af', // Main primary color
|
|
62
|
+
tabSelected: '#1e40af',
|
|
63
|
+
headerBg: '#3730a3',
|
|
64
|
+
headerText: '#ffffff', // White header text
|
|
65
|
+
success: '#059669',
|
|
66
|
+
textSecondary: '#6b7280',
|
|
67
|
+
border: '#9ca3af',
|
|
68
|
+
shadow: '#000000',
|
|
69
|
+
background: '#f9fafb',
|
|
70
|
+
surface: '#ffffff',
|
|
71
|
+
text: '#111827',
|
|
72
|
+
textLight: '#6b7280',
|
|
73
|
+
error: '#dc2626',
|
|
74
|
+
warning: '#d97706',
|
|
75
|
+
info: '#2563eb',
|
|
76
|
+
muted: '#e5e7eb',
|
|
77
|
+
inputBackground: '#ffffff', // Input and box background color for corporate theme
|
|
78
|
+
inputBorder: '#9ca3af', // Input border color for corporate theme
|
|
79
|
+
placeholderColor: 'rgba(0,0,0,0.2)', // Placeholder color for corporate theme
|
|
80
|
+
labelColor: '#111827', // Label text color for corporate theme
|
|
81
|
+
buttonBackground: '#3730a3', // Button background color for corporate theme
|
|
82
|
+
buttonTextColor: '#ffffff', // Button text color for corporate theme
|
|
83
|
+
cancelButtonBg: '#ffffff', // Cancel button background for corporate theme
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { colors, type ThemeName, type ColorScheme } from './colors';
|
|
2
|
+
import { typography } from './typography';
|
|
3
|
+
import { shadows } from './shadows';
|
|
4
|
+
export declare const spacing: {
|
|
5
|
+
readonly xs: 4;
|
|
6
|
+
readonly sm: 8;
|
|
7
|
+
readonly md: 12;
|
|
8
|
+
readonly lg: 16;
|
|
9
|
+
readonly xl: 20;
|
|
10
|
+
readonly xxl: 24;
|
|
11
|
+
readonly xxxl: 32;
|
|
12
|
+
};
|
|
13
|
+
export declare const borderRadius: {
|
|
14
|
+
readonly none: 0;
|
|
15
|
+
readonly sm: 4;
|
|
16
|
+
readonly md: 8;
|
|
17
|
+
readonly lg: 12;
|
|
18
|
+
readonly xl: 16;
|
|
19
|
+
readonly full: 9999;
|
|
20
|
+
};
|
|
21
|
+
export interface Theme {
|
|
22
|
+
colors: ColorScheme;
|
|
23
|
+
typography: typeof typography;
|
|
24
|
+
shadows: typeof shadows;
|
|
25
|
+
spacing: typeof spacing;
|
|
26
|
+
borderRadius: typeof borderRadius;
|
|
27
|
+
}
|
|
28
|
+
export declare const createTheme: (themeName?: ThemeName) => Theme;
|
|
29
|
+
export declare const getBorderColor: (theme: Theme, opacity?: number) => string;
|
|
30
|
+
export declare const getShadowColor: (opacity?: number) => string;
|
|
31
|
+
export { colors, typography, shadows, type ThemeName, type ColorScheme };
|
|
32
|
+
export * from './typography';
|
|
33
|
+
export * from './shadows';
|
|
34
|
+
export declare const defaultTheme: Theme;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.defaultTheme = exports.shadows = exports.typography = exports.colors = exports.getShadowColor = exports.getBorderColor = exports.createTheme = exports.borderRadius = exports.spacing = void 0;
|
|
18
|
+
const colors_1 = require("./colors");
|
|
19
|
+
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return colors_1.colors; } });
|
|
20
|
+
const typography_1 = require("./typography");
|
|
21
|
+
Object.defineProperty(exports, "typography", { enumerable: true, get: function () { return typography_1.typography; } });
|
|
22
|
+
const shadows_1 = require("./shadows");
|
|
23
|
+
Object.defineProperty(exports, "shadows", { enumerable: true, get: function () { return shadows_1.shadows; } });
|
|
24
|
+
// Spacing scale
|
|
25
|
+
exports.spacing = {
|
|
26
|
+
xs: 4,
|
|
27
|
+
sm: 8,
|
|
28
|
+
md: 12,
|
|
29
|
+
lg: 16,
|
|
30
|
+
xl: 20,
|
|
31
|
+
xxl: 24,
|
|
32
|
+
xxxl: 32,
|
|
33
|
+
};
|
|
34
|
+
// Border radius scale
|
|
35
|
+
exports.borderRadius = {
|
|
36
|
+
none: 0,
|
|
37
|
+
sm: 4,
|
|
38
|
+
md: 8,
|
|
39
|
+
lg: 12,
|
|
40
|
+
xl: 16,
|
|
41
|
+
full: 9999,
|
|
42
|
+
};
|
|
43
|
+
// Theme factory function
|
|
44
|
+
const createTheme = (themeName = 'primary') => ({
|
|
45
|
+
colors: colors_1.colors[themeName],
|
|
46
|
+
typography: typography_1.typography,
|
|
47
|
+
shadows: shadows_1.shadows,
|
|
48
|
+
spacing: exports.spacing,
|
|
49
|
+
borderRadius: exports.borderRadius,
|
|
50
|
+
});
|
|
51
|
+
exports.createTheme = createTheme;
|
|
52
|
+
// Helper function to get border with opacity
|
|
53
|
+
const getBorderColor = (theme, opacity = 0.36) => {
|
|
54
|
+
const hex = theme.colors.border.replace('#', '');
|
|
55
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
56
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
57
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
58
|
+
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
59
|
+
};
|
|
60
|
+
exports.getBorderColor = getBorderColor;
|
|
61
|
+
// Helper function to get shadow color with opacity
|
|
62
|
+
const getShadowColor = (opacity = 0.1) => {
|
|
63
|
+
return `rgba(0, 0, 0, ${opacity})`;
|
|
64
|
+
};
|
|
65
|
+
exports.getShadowColor = getShadowColor;
|
|
66
|
+
__exportStar(require("./typography"), exports);
|
|
67
|
+
__exportStar(require("./shadows"), exports);
|
|
68
|
+
// Default theme export
|
|
69
|
+
exports.defaultTheme = (0, exports.createTheme)('primary');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const shadows: {
|
|
2
|
+
readonly default: {
|
|
3
|
+
readonly shadowColor: "#000000";
|
|
4
|
+
readonly shadowOffset: {
|
|
5
|
+
readonly width: 0;
|
|
6
|
+
readonly height: 2;
|
|
7
|
+
};
|
|
8
|
+
readonly shadowOpacity: 0.1;
|
|
9
|
+
readonly shadowRadius: 4;
|
|
10
|
+
readonly elevation: 3;
|
|
11
|
+
};
|
|
12
|
+
readonly light: {
|
|
13
|
+
readonly shadowColor: "#000000";
|
|
14
|
+
readonly shadowOffset: {
|
|
15
|
+
readonly width: 0;
|
|
16
|
+
readonly height: 1;
|
|
17
|
+
};
|
|
18
|
+
readonly shadowOpacity: 0.05;
|
|
19
|
+
readonly shadowRadius: 2;
|
|
20
|
+
readonly elevation: 1;
|
|
21
|
+
};
|
|
22
|
+
readonly medium: {
|
|
23
|
+
readonly shadowColor: "#000000";
|
|
24
|
+
readonly shadowOffset: {
|
|
25
|
+
readonly width: 0;
|
|
26
|
+
readonly height: 4;
|
|
27
|
+
};
|
|
28
|
+
readonly shadowOpacity: 0.15;
|
|
29
|
+
readonly shadowRadius: 6;
|
|
30
|
+
readonly elevation: 5;
|
|
31
|
+
};
|
|
32
|
+
readonly heavy: {
|
|
33
|
+
readonly shadowColor: "#000000";
|
|
34
|
+
readonly shadowOffset: {
|
|
35
|
+
readonly width: 0;
|
|
36
|
+
readonly height: 6;
|
|
37
|
+
};
|
|
38
|
+
readonly shadowOpacity: 0.2;
|
|
39
|
+
readonly shadowRadius: 8;
|
|
40
|
+
readonly elevation: 8;
|
|
41
|
+
};
|
|
42
|
+
readonly card: {
|
|
43
|
+
readonly shadowColor: "#000000";
|
|
44
|
+
readonly shadowOffset: {
|
|
45
|
+
readonly width: 0;
|
|
46
|
+
readonly height: 2;
|
|
47
|
+
};
|
|
48
|
+
readonly shadowOpacity: 0.1;
|
|
49
|
+
readonly shadowRadius: 4;
|
|
50
|
+
readonly elevation: 3;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type ShadowType = keyof typeof shadows;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shadows = void 0;
|
|
4
|
+
// Shadow configuration
|
|
5
|
+
exports.shadows = {
|
|
6
|
+
// Default shadow (black 10% spread)
|
|
7
|
+
default: {
|
|
8
|
+
shadowColor: '#000000',
|
|
9
|
+
shadowOffset: {
|
|
10
|
+
width: 0,
|
|
11
|
+
height: 2,
|
|
12
|
+
},
|
|
13
|
+
shadowOpacity: 0.1,
|
|
14
|
+
shadowRadius: 4,
|
|
15
|
+
elevation: 3, // Android
|
|
16
|
+
},
|
|
17
|
+
// Additional shadow variations
|
|
18
|
+
light: {
|
|
19
|
+
shadowColor: '#000000',
|
|
20
|
+
shadowOffset: {
|
|
21
|
+
width: 0,
|
|
22
|
+
height: 1,
|
|
23
|
+
},
|
|
24
|
+
shadowOpacity: 0.05,
|
|
25
|
+
shadowRadius: 2,
|
|
26
|
+
elevation: 1,
|
|
27
|
+
},
|
|
28
|
+
medium: {
|
|
29
|
+
shadowColor: '#000000',
|
|
30
|
+
shadowOffset: {
|
|
31
|
+
width: 0,
|
|
32
|
+
height: 4,
|
|
33
|
+
},
|
|
34
|
+
shadowOpacity: 0.15,
|
|
35
|
+
shadowRadius: 6,
|
|
36
|
+
elevation: 5,
|
|
37
|
+
},
|
|
38
|
+
heavy: {
|
|
39
|
+
shadowColor: '#000000',
|
|
40
|
+
shadowOffset: {
|
|
41
|
+
width: 0,
|
|
42
|
+
height: 6,
|
|
43
|
+
},
|
|
44
|
+
shadowOpacity: 0.2,
|
|
45
|
+
shadowRadius: 8,
|
|
46
|
+
elevation: 8,
|
|
47
|
+
},
|
|
48
|
+
card: {
|
|
49
|
+
shadowColor: '#000000',
|
|
50
|
+
shadowOffset: {
|
|
51
|
+
width: 0,
|
|
52
|
+
height: 2,
|
|
53
|
+
},
|
|
54
|
+
shadowOpacity: 0.1,
|
|
55
|
+
shadowRadius: 4,
|
|
56
|
+
elevation: 3,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export declare const typography: {
|
|
2
|
+
readonly fontFamily: {
|
|
3
|
+
readonly primary: "poppins.regular";
|
|
4
|
+
readonly medium: "poppins.medium";
|
|
5
|
+
readonly semiBold: "poppins.semibold";
|
|
6
|
+
readonly bold: "poppins.bold";
|
|
7
|
+
};
|
|
8
|
+
readonly fontSize: {
|
|
9
|
+
readonly xxs: 8;
|
|
10
|
+
readonly xs: 10;
|
|
11
|
+
readonly sm: 12;
|
|
12
|
+
readonly md: 14;
|
|
13
|
+
readonly lg: 16;
|
|
14
|
+
readonly xl: 18;
|
|
15
|
+
readonly xxl: 20;
|
|
16
|
+
readonly xxxl: 24;
|
|
17
|
+
};
|
|
18
|
+
readonly fontWeight: {
|
|
19
|
+
readonly regular: "400";
|
|
20
|
+
readonly medium: "500";
|
|
21
|
+
readonly semiBold: "600";
|
|
22
|
+
readonly bold: "700";
|
|
23
|
+
};
|
|
24
|
+
readonly lineHeight: {
|
|
25
|
+
readonly tight: 1.2;
|
|
26
|
+
readonly normal: 1.4;
|
|
27
|
+
readonly relaxed: 1.6;
|
|
28
|
+
};
|
|
29
|
+
readonly styles: {
|
|
30
|
+
readonly h1: {
|
|
31
|
+
readonly fontFamily: "poppins.bold";
|
|
32
|
+
readonly fontSize: 24;
|
|
33
|
+
readonly fontWeight: "700";
|
|
34
|
+
readonly lineHeight: 32;
|
|
35
|
+
};
|
|
36
|
+
readonly h2: {
|
|
37
|
+
readonly fontFamily: "poppins.semibold";
|
|
38
|
+
readonly fontSize: 20;
|
|
39
|
+
readonly fontWeight: "600";
|
|
40
|
+
readonly lineHeight: 28;
|
|
41
|
+
};
|
|
42
|
+
readonly h3: {
|
|
43
|
+
readonly fontFamily: "poppins.medium";
|
|
44
|
+
readonly fontSize: 16;
|
|
45
|
+
readonly fontWeight: "500";
|
|
46
|
+
readonly lineHeight: 24;
|
|
47
|
+
};
|
|
48
|
+
readonly bodyLarge: {
|
|
49
|
+
readonly fontFamily: "poppins.regular";
|
|
50
|
+
readonly fontSize: 16;
|
|
51
|
+
readonly fontWeight: "400";
|
|
52
|
+
readonly lineHeight: 24;
|
|
53
|
+
};
|
|
54
|
+
readonly bodyMedium: {
|
|
55
|
+
readonly fontFamily: "poppins.regular";
|
|
56
|
+
readonly fontSize: 14;
|
|
57
|
+
readonly fontWeight: "400";
|
|
58
|
+
readonly lineHeight: 20;
|
|
59
|
+
};
|
|
60
|
+
readonly bodySmall: {
|
|
61
|
+
readonly fontFamily: "poppins.regular";
|
|
62
|
+
readonly fontSize: 12;
|
|
63
|
+
readonly fontWeight: "400";
|
|
64
|
+
readonly lineHeight: 16;
|
|
65
|
+
};
|
|
66
|
+
readonly text14Medium: {
|
|
67
|
+
readonly fontFamily: "poppins.medium";
|
|
68
|
+
readonly fontSize: 14;
|
|
69
|
+
readonly fontWeight: "600";
|
|
70
|
+
readonly lineHeight: 12;
|
|
71
|
+
};
|
|
72
|
+
readonly text12Regular: {
|
|
73
|
+
readonly fontFamily: "poppins.regular";
|
|
74
|
+
readonly fontSize: 12;
|
|
75
|
+
readonly fontWeight: "400";
|
|
76
|
+
readonly lineHeight: 16;
|
|
77
|
+
};
|
|
78
|
+
readonly text12Medium: {
|
|
79
|
+
readonly fontFamily: "poppins.medium";
|
|
80
|
+
readonly fontSize: 12;
|
|
81
|
+
readonly fontWeight: "500";
|
|
82
|
+
readonly lineHeight: 12;
|
|
83
|
+
};
|
|
84
|
+
readonly text11Regular: {
|
|
85
|
+
readonly fontFamily: "poppins.regular";
|
|
86
|
+
readonly fontSize: 11;
|
|
87
|
+
readonly fontWeight: "400";
|
|
88
|
+
readonly lineHeight: 11;
|
|
89
|
+
};
|
|
90
|
+
readonly text10Regular: {
|
|
91
|
+
readonly fontFamily: "poppins.regular";
|
|
92
|
+
readonly fontSize: 10;
|
|
93
|
+
readonly fontWeight: "400";
|
|
94
|
+
readonly lineHeight: 12;
|
|
95
|
+
};
|
|
96
|
+
readonly text10Medium: {
|
|
97
|
+
readonly fontFamily: "poppins.medium";
|
|
98
|
+
readonly fontSize: 10;
|
|
99
|
+
readonly fontWeight: "500";
|
|
100
|
+
readonly lineHeight: 14;
|
|
101
|
+
};
|
|
102
|
+
readonly text8Regular: {
|
|
103
|
+
readonly fontFamily: "poppins.regular";
|
|
104
|
+
readonly fontSize: 8;
|
|
105
|
+
readonly fontWeight: "400";
|
|
106
|
+
readonly lineHeight: 10;
|
|
107
|
+
};
|
|
108
|
+
readonly label: {
|
|
109
|
+
readonly fontFamily: "poppins.medium";
|
|
110
|
+
readonly fontSize: 12;
|
|
111
|
+
readonly fontWeight: "500";
|
|
112
|
+
readonly lineHeight: 16;
|
|
113
|
+
};
|
|
114
|
+
readonly caption: {
|
|
115
|
+
readonly fontFamily: "poppins.regular";
|
|
116
|
+
readonly fontSize: 10;
|
|
117
|
+
readonly fontWeight: "400";
|
|
118
|
+
readonly lineHeight: 14;
|
|
119
|
+
};
|
|
120
|
+
readonly button: {
|
|
121
|
+
readonly fontFamily: "poppins.medium";
|
|
122
|
+
readonly fontSize: 16;
|
|
123
|
+
readonly fontWeight: "500";
|
|
124
|
+
readonly lineHeight: 20;
|
|
125
|
+
};
|
|
126
|
+
readonly buttonSmall: {
|
|
127
|
+
readonly fontFamily: "poppins.medium";
|
|
128
|
+
readonly fontSize: 14;
|
|
129
|
+
readonly fontWeight: "500";
|
|
130
|
+
readonly lineHeight: 18;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export type TypographyStyle = keyof typeof typography.styles;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typography = void 0;
|
|
4
|
+
// Typography configuration with Poppins font
|
|
5
|
+
exports.typography = {
|
|
6
|
+
fontFamily: {
|
|
7
|
+
primary: 'poppins.regular',
|
|
8
|
+
medium: 'poppins.medium',
|
|
9
|
+
semiBold: 'poppins.semibold',
|
|
10
|
+
bold: 'poppins.bold',
|
|
11
|
+
},
|
|
12
|
+
fontSize: {
|
|
13
|
+
xxs: 8, // 8px
|
|
14
|
+
xs: 10, // 10px
|
|
15
|
+
sm: 12, // 12px
|
|
16
|
+
md: 14,
|
|
17
|
+
lg: 16,
|
|
18
|
+
xl: 18,
|
|
19
|
+
xxl: 20,
|
|
20
|
+
xxxl: 24,
|
|
21
|
+
},
|
|
22
|
+
fontWeight: {
|
|
23
|
+
regular: '400',
|
|
24
|
+
medium: '500',
|
|
25
|
+
semiBold: '600',
|
|
26
|
+
bold: '700',
|
|
27
|
+
},
|
|
28
|
+
lineHeight: {
|
|
29
|
+
tight: 1.2,
|
|
30
|
+
normal: 1.4,
|
|
31
|
+
relaxed: 1.6,
|
|
32
|
+
},
|
|
33
|
+
// Predefined text styles
|
|
34
|
+
styles: {
|
|
35
|
+
// Headers
|
|
36
|
+
h1: {
|
|
37
|
+
fontFamily: 'poppins.bold',
|
|
38
|
+
fontSize: 24,
|
|
39
|
+
fontWeight: '700',
|
|
40
|
+
lineHeight: 32,
|
|
41
|
+
},
|
|
42
|
+
h2: {
|
|
43
|
+
fontFamily: 'poppins.semibold',
|
|
44
|
+
fontSize: 20,
|
|
45
|
+
fontWeight: '600',
|
|
46
|
+
lineHeight: 28,
|
|
47
|
+
},
|
|
48
|
+
h3: {
|
|
49
|
+
fontFamily: 'poppins.medium',
|
|
50
|
+
fontSize: 16,
|
|
51
|
+
fontWeight: '500',
|
|
52
|
+
lineHeight: 24,
|
|
53
|
+
},
|
|
54
|
+
// Body text
|
|
55
|
+
bodyLarge: {
|
|
56
|
+
fontFamily: 'poppins.regular',
|
|
57
|
+
fontSize: 16,
|
|
58
|
+
fontWeight: '400',
|
|
59
|
+
lineHeight: 24,
|
|
60
|
+
},
|
|
61
|
+
bodyMedium: {
|
|
62
|
+
fontFamily: 'poppins.regular',
|
|
63
|
+
fontSize: 14,
|
|
64
|
+
fontWeight: '400',
|
|
65
|
+
lineHeight: 20,
|
|
66
|
+
},
|
|
67
|
+
bodySmall: {
|
|
68
|
+
fontFamily: 'poppins.regular',
|
|
69
|
+
fontSize: 12,
|
|
70
|
+
fontWeight: '400',
|
|
71
|
+
lineHeight: 16,
|
|
72
|
+
},
|
|
73
|
+
// Specific sizes requested
|
|
74
|
+
text14Medium: {
|
|
75
|
+
fontFamily: 'poppins.medium',
|
|
76
|
+
fontSize: 14,
|
|
77
|
+
fontWeight: '600',
|
|
78
|
+
lineHeight: 12,
|
|
79
|
+
},
|
|
80
|
+
text12Regular: {
|
|
81
|
+
fontFamily: 'poppins.regular',
|
|
82
|
+
fontSize: 12,
|
|
83
|
+
fontWeight: '400',
|
|
84
|
+
lineHeight: 16,
|
|
85
|
+
},
|
|
86
|
+
text12Medium: {
|
|
87
|
+
fontFamily: 'poppins.medium',
|
|
88
|
+
fontSize: 12,
|
|
89
|
+
fontWeight: '500',
|
|
90
|
+
lineHeight: 12,
|
|
91
|
+
},
|
|
92
|
+
text11Regular: {
|
|
93
|
+
fontFamily: 'poppins.regular',
|
|
94
|
+
fontSize: 11,
|
|
95
|
+
fontWeight: '400',
|
|
96
|
+
lineHeight: 11,
|
|
97
|
+
},
|
|
98
|
+
text10Regular: {
|
|
99
|
+
fontFamily: 'poppins.regular',
|
|
100
|
+
fontSize: 10,
|
|
101
|
+
fontWeight: '400',
|
|
102
|
+
lineHeight: 12,
|
|
103
|
+
},
|
|
104
|
+
text10Medium: {
|
|
105
|
+
fontFamily: 'poppins.medium',
|
|
106
|
+
fontSize: 10,
|
|
107
|
+
fontWeight: '500',
|
|
108
|
+
lineHeight: 14,
|
|
109
|
+
},
|
|
110
|
+
text8Regular: {
|
|
111
|
+
fontFamily: 'poppins.regular',
|
|
112
|
+
fontSize: 8,
|
|
113
|
+
fontWeight: '400',
|
|
114
|
+
lineHeight: 10,
|
|
115
|
+
},
|
|
116
|
+
// Labels and captions
|
|
117
|
+
label: {
|
|
118
|
+
fontFamily: 'poppins.medium',
|
|
119
|
+
fontSize: 12,
|
|
120
|
+
fontWeight: '500',
|
|
121
|
+
lineHeight: 16,
|
|
122
|
+
},
|
|
123
|
+
caption: {
|
|
124
|
+
fontFamily: 'poppins.regular',
|
|
125
|
+
fontSize: 10,
|
|
126
|
+
fontWeight: '400',
|
|
127
|
+
lineHeight: 14,
|
|
128
|
+
},
|
|
129
|
+
// Buttons
|
|
130
|
+
button: {
|
|
131
|
+
fontFamily: 'poppins.medium',
|
|
132
|
+
fontSize: 16,
|
|
133
|
+
fontWeight: '500',
|
|
134
|
+
lineHeight: 20,
|
|
135
|
+
},
|
|
136
|
+
buttonSmall: {
|
|
137
|
+
fontFamily: 'poppins.medium',
|
|
138
|
+
fontSize: 14,
|
|
139
|
+
fontWeight: '500',
|
|
140
|
+
lineHeight: 18,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface InvestmentData {
|
|
2
|
+
amount?: number;
|
|
3
|
+
tenure?: string;
|
|
4
|
+
interestRate?: string;
|
|
5
|
+
interestPayout?: string;
|
|
6
|
+
companyName?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CustomerData {
|
|
9
|
+
name?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
phone?: string;
|
|
12
|
+
panNumber?: string;
|
|
13
|
+
aadhaarNumber?: string;
|
|
14
|
+
customerId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AppData {
|
|
17
|
+
userReferenceId?: string;
|
|
18
|
+
ifsc?: string;
|
|
19
|
+
accountNo?: string;
|
|
20
|
+
nameOfBank?: string;
|
|
21
|
+
typeOfAccount?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface FDData {
|
|
24
|
+
id: string;
|
|
25
|
+
providerId: string;
|
|
26
|
+
name: string;
|
|
27
|
+
accountNumber: string;
|
|
28
|
+
roi: string;
|
|
29
|
+
tenure: string;
|
|
30
|
+
amount: number;
|
|
31
|
+
maturityDate: string;
|
|
32
|
+
status: 'active' | 'matured' | 'pending';
|
|
33
|
+
creditRating: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { WORKFLOW_STATES } from '../config/workflowConstants';
|
|
2
|
+
export type WorkflowStateSriram = typeof WORKFLOW_STATES.START | typeof WORKFLOW_STATES.INITIATION | typeof WORKFLOW_STATES.CREATE_FD | typeof WORKFLOW_STATES.OCCUPATION | typeof WORKFLOW_STATES.NOMINEE | typeof WORKFLOW_STATES.BANK_DETAILS | typeof WORKFLOW_STATES.KYC | typeof WORKFLOW_STATES.PAYMENT | typeof WORKFLOW_STATES.END;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface LogConfig {
|
|
2
|
+
enableLogging: boolean;
|
|
3
|
+
logLevel: 'debug' | 'info' | 'warn' | 'error';
|
|
4
|
+
logRequest: boolean;
|
|
5
|
+
logResponse: boolean;
|
|
6
|
+
logHeaders: boolean;
|
|
7
|
+
logBody: boolean;
|
|
8
|
+
logTiming: boolean;
|
|
9
|
+
maxBodyLength: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RequestLogData {
|
|
12
|
+
method: string;
|
|
13
|
+
url: string;
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
headers: Record<string, string>;
|
|
16
|
+
body?: any;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
requestId: string;
|
|
19
|
+
isEncrypted: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ResponseLogData {
|
|
22
|
+
status: number;
|
|
23
|
+
statusText: string;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
data?: any;
|
|
26
|
+
timestamp: number;
|
|
27
|
+
requestId: string;
|
|
28
|
+
duration: number;
|
|
29
|
+
isEncrypted: boolean;
|
|
30
|
+
error?: any;
|
|
31
|
+
}
|
|
32
|
+
declare class ApiLogger {
|
|
33
|
+
private config;
|
|
34
|
+
private requestStartTimes;
|
|
35
|
+
constructor(config?: Partial<LogConfig>);
|
|
36
|
+
updateConfig(newConfig: Partial<LogConfig>): void;
|
|
37
|
+
logRequest(data: RequestLogData): void;
|
|
38
|
+
logResponse(data: ResponseLogData): void;
|
|
39
|
+
logError(error: any, requestId: string, url: string): void;
|
|
40
|
+
getRequestDuration(requestId: string): number;
|
|
41
|
+
private sanitizeHeaders;
|
|
42
|
+
private sanitizeBody;
|
|
43
|
+
logConfig(): void;
|
|
44
|
+
clearRequestTimes(): void;
|
|
45
|
+
}
|
|
46
|
+
export declare const apiLogger: ApiLogger;
|
|
47
|
+
export { ApiLogger };
|
|
48
|
+
export default apiLogger;
|