@finspringinnovations/fixeddepositsdk 1.0.2 → 1.0.4

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.
Files changed (50) hide show
  1. package/lib/api/customerApi.js +1 -0
  2. package/lib/api/fdApi.d.ts +401 -1
  3. package/lib/api/fdApi.js +24 -2
  4. package/lib/components/PendingFDBottomSheet.js +27 -18
  5. package/lib/config/appDataConfig.js +3 -2
  6. package/lib/config/workflowConstants.d.ts +40 -30
  7. package/lib/config/workflowConstants.js +35 -24
  8. package/lib/constants/strings/fd.d.ts +2 -2
  9. package/lib/constants/strings/fd.js +2 -2
  10. package/lib/navigation/RootNavigator.js +167 -196
  11. package/lib/navigation/types.d.ts +4 -1
  12. package/lib/navigation/workflowNavigator.d.ts +1 -1
  13. package/lib/navigation/workflowNavigator.js +107 -26
  14. package/lib/screens/AadhaarVerification.js +1 -11
  15. package/lib/screens/AddBankAccount.js +1 -11
  16. package/lib/screens/BankDetail.js +1 -11
  17. package/lib/screens/Employee.js +1 -11
  18. package/lib/screens/FDCalculator.js +2 -12
  19. package/lib/screens/FDList.js +531 -417
  20. package/lib/screens/FindIFSC.js +1 -11
  21. package/lib/screens/NomineeDetail.js +12 -22
  22. package/lib/screens/PayNow.js +1 -11
  23. package/lib/screens/Payment.js +2 -11
  24. package/lib/screens/PaymentStatus.js +24 -21
  25. package/lib/screens/ReviewKYC.js +3 -12
  26. package/lib/types/workflowTypes.d.ts +1 -1
  27. package/package.json +50 -50
  28. package/src/api/customerApi.ts +1 -0
  29. package/src/api/fdApi.ts +28 -1
  30. package/src/components/PendingFDBottomSheet.tsx +151 -123
  31. package/src/config/appDataConfig.ts +245 -242
  32. package/src/config/workflowConstants.ts +51 -39
  33. package/src/constants/strings/bank.ts +80 -80
  34. package/src/constants/strings/fd.ts +2 -2
  35. package/src/navigation/RootNavigator.tsx +667 -651
  36. package/src/navigation/types.ts +4 -1
  37. package/src/navigation/workflowNavigator.ts +170 -107
  38. package/src/screens/AadhaarVerification.tsx +1 -15
  39. package/src/screens/AddBankAccount.tsx +2 -16
  40. package/src/screens/BankDetail.tsx +1 -15
  41. package/src/screens/Employee.tsx +1 -15
  42. package/src/screens/FDCalculator.tsx +4 -18
  43. package/src/screens/FDList.tsx +2311 -2170
  44. package/src/screens/FindIFSC.tsx +2 -16
  45. package/src/screens/NomineeDetail.tsx +762 -775
  46. package/src/screens/PayNow.tsx +2 -16
  47. package/src/screens/Payment.tsx +190 -203
  48. package/src/screens/PaymentStatus.tsx +574 -576
  49. package/src/screens/ReviewKYC.tsx +2 -15
  50. package/src/types/workflowTypes.ts +1 -10
@@ -1,69 +1,81 @@
1
1
  // Workflow State Constants
2
2
  export const WORKFLOW_STATES = {
3
- INITIATION: 404,
4
- START: 405,
5
- KYC: 406,
6
- OCCUPATION: 409,
7
- NOMINEE: 407,
8
- BANK_DETAILS: 408,
9
- CREATE_FD: 411,
10
- PAYMENT: 410,
11
- END: 403,
3
+ INITIATION: 'INITIATION',
4
+ START: 'START',
5
+ KYC: 'KYC',
6
+ OCCUPATION: 'OCCUPATION',
7
+ NOMINEE: 'NOMINEE',
8
+ BANK_DETAILS: 'BANK_DETAILS',
9
+ CREATE_FD: 'CREATE_FD',
10
+ PAYMENT: 'PAYMENT',
11
+ END: 'END',
12
+ } as const;
13
+
14
+ // Keep numeric IDs for reference/backward compatibility only
15
+ export const WORKFLOW_STATE_IDS = {
16
+ INITIATION: 404,
17
+ START: 405,
18
+ KYC: 406,
19
+ OCCUPATION: 409,
20
+ NOMINEE: 407,
21
+ BANK_DETAILS: 408,
22
+ CREATE_FD: 411,
23
+ PAYMENT: 410,
24
+ END: 403,
12
25
  } as const;
13
26
 
14
27
  export const SHRIRAM_WORKFLOW_STATES = {
15
- INITIATION: 404,
16
- START: 405,
17
- KYC: 406,
18
- OCCUPATION: 409,
19
- NOMINEE: 407,
20
- BANK_DETAILS: 408,
21
- CREATE_FD: 411,
22
- PAYMENT: 410,
23
- END: 403,
28
+ START: 'SHRIRAM_V1_S1_START',
29
+ INITIATION: 'SHRIRAM_V1_S2_INITIATION',
30
+ KYC: 'SHRIRAM_V1_S3_CUSTOMER_INFO_KYC',
31
+ OCCUPATION: 'SHRIRAM_V1_S4_OCCUPATION',
32
+ NOMINEE: 'SHRIRAM_V1_S5_NOMINEE_DETAILS',
33
+ BANK_DETAILS: 'SHRIRAM_V1_S6_BANK_DETAILS',
34
+ CREATE_FD: 'SHRIRAM_V1_S7_FD_CREATION',
35
+ PAYMENT: 'SHRIRAM_V1_S8_PAYMENT',
36
+ END: 'SHRIRAM_V1_S9_END',
24
37
  } as const;
25
38
 
26
39
  export const MAHINDRA_WORKFLOW_STATES = {
27
- INITIATION: 404,
28
- START: 405,
29
- KYC: 444,
30
- OCCUPATION: 447,
31
- NOMINEE: 448,
32
- BANK_DETAILS: 449,
33
- CREATE_FD: 411,
34
- PAYMENT: 450,
35
- END: 403,
36
- AADHAAR_VERIFICATION: 451,
37
- /** KYC completed / post-KYC success – open KYCSuccess (Pay Now) */
38
- KYC_SUCCESS: 446,
40
+ START: 'MAHINDRA_V1_S1_START',
41
+ INITIATION: 'MAHINDRA_V1_S2_INITIATION',
42
+ DEMOGRAPHIC_INFO: 'MAHINDRA_V1_S3_DEMOGRAPHIC_INFO',
43
+ KYC: 'MAHINDRA_V1_S4_KYC',
44
+ OCCUPATION: 'MAHINDRA_V1_S5_OCCUPATION',
45
+ NOMINEE: 'MAHINDRA_V1_S6_NOMINEE_DETAILS',
46
+ BANK_DETAILS: 'MAHINDRA_V1_S7_BANK_DETAILS',
47
+ CREATE_FD: 'MAHINDRA_V1_S8_FD_CREATION',
48
+ PAYMENT: 'MAHINDRA_V1_S9_PAYMENT',
49
+ END: 'MAHINDRA_V1_S10_END',
50
+ AADHAAR_VERIFICATION: 'MAHINDRA_V1_S4_KYC',
39
51
  } as const;
40
52
 
41
53
  // Workflow Task Constants
42
54
  export const WORKFLOW_TASKS = {
43
- RESEND_OTP: 11045,
44
- VALIDATE_OTP: 11047,
55
+ RESEND_OTP: 11045,
56
+ VALIDATE_OTP: 11047,
45
57
  } as const;
46
58
 
47
59
  // Type definitions for TypeScript
48
60
  export type WorkflowState = typeof WORKFLOW_STATES[keyof typeof WORKFLOW_STATES];
49
61
  export type WorkflowTask = typeof WORKFLOW_TASKS[keyof typeof WORKFLOW_TASKS];
50
62
 
51
- // Helper function to get workflow state name
63
+ // Helper function to get workflow state name from ID
52
64
  export const getWorkflowStateName = (stateId: number): string | undefined => {
53
- const entry = Object.entries(WORKFLOW_STATES).find(([_, value]) => value === stateId);
54
- return entry ? entry[0] : undefined;
65
+ const entry = Object.entries(WORKFLOW_STATE_IDS).find(([_, value]) => value === stateId);
66
+ return entry ? entry[0] : undefined;
55
67
  };
56
68
 
57
69
  // Helper function to get workflow task name
58
70
  export const getWorkflowTaskName = (taskId: number): string | undefined => {
59
- const entry = Object.entries(WORKFLOW_TASKS).find(([_, value]) => value === taskId);
60
- return entry ? entry[0] : undefined;
71
+ const entry = Object.entries(WORKFLOW_TASKS).find(([_, value]) => value === taskId);
72
+ return entry ? entry[0] : undefined;
61
73
  };
62
74
 
63
75
  // Export all as a single object for convenience
64
76
  export const WORKFLOW_CONSTANTS = {
65
- STATES: WORKFLOW_STATES,
66
- TASKS: WORKFLOW_TASKS,
77
+ STATES: WORKFLOW_STATES,
78
+ TASKS: WORKFLOW_TASKS,
67
79
  } as const;
68
80
 
69
81
  export default WORKFLOW_CONSTANTS;
@@ -1,92 +1,92 @@
1
1
  // Bank and payment related strings
2
2
  export const BANK_STRINGS = {
3
- // Screen titles
4
- BANK_DETAILS_TITLE: 'Bank Details',
5
- ADD_BANK_ACCOUNT_TITLE: 'Add Bank Account',
6
- FIND_IFSC_TITLE: 'Find IFSC',
7
- PAYMENT_DETAILS_TITLE: 'Payment Details',
8
- PAYMENT_STATUS_TITLE: 'Payment Status',
3
+ // Screen titles
4
+ BANK_DETAILS_TITLE: 'Bank Details',
5
+ ADD_BANK_ACCOUNT_TITLE: 'Add Bank Account',
6
+ FIND_IFSC_TITLE: 'Find IFSC',
7
+ PAYMENT_DETAILS_TITLE: 'Payment Details',
8
+ PAYMENT_STATUS_TITLE: 'Payment Status',
9
9
 
10
- // Form labels
11
- ACCOUNT_TYPE_LABEL: 'Account Type',
12
- ACCOUNT_NUMBER_LABEL: 'Account Number',
13
- IFSC_CODE_LABEL: 'IFSC Code',
14
- BANK_NAME_LABEL: 'Bank Name',
15
- BRANCH_NAME_LABEL: 'Branch Name',
16
- ACCOUNT_HOLDER_NAME_LABEL: 'Account Holder Name',
17
- CONFIRM_ACCOUNT_NUMBER_LABEL: 'Confirm Account Number',
10
+ // Form labels
11
+ ACCOUNT_TYPE_LABEL: 'Account Type',
12
+ ACCOUNT_NUMBER_LABEL: 'Account Number',
13
+ IFSC_CODE_LABEL: 'IFSC Code',
14
+ BANK_NAME_LABEL: 'Bank Name',
15
+ BRANCH_NAME_LABEL: 'Branch Name',
16
+ ACCOUNT_HOLDER_NAME_LABEL: 'Account Holder Name',
17
+ CONFIRM_ACCOUNT_NUMBER_LABEL: 'Confirm Account Number',
18
18
 
19
- // Placeholders
20
- ACCOUNT_TYPE_PLACEHOLDER: 'Select option',
21
- ACCOUNT_NUMBER_PLACEHOLDER: 'Enter Account Number',
22
- IFSC_CODE_PLACEHOLDER: 'Enter IFSC Code',
23
- BANK_NAME_PLACEHOLDER: 'Bank Name',
24
- BRANCH_NAME_PLACEHOLDER: 'Branch Name',
25
- ACCOUNT_HOLDER_NAME_PLACEHOLDER: 'Enter Account Holder Name',
26
- CONFIRM_ACCOUNT_NUMBER_PLACEHOLDER: 'Re-enter Account Number',
19
+ // Placeholders
20
+ ACCOUNT_TYPE_PLACEHOLDER: 'Select option',
21
+ ACCOUNT_NUMBER_PLACEHOLDER: 'Enter Account Number',
22
+ IFSC_CODE_PLACEHOLDER: 'Enter IFSC Code',
23
+ BANK_NAME_PLACEHOLDER: 'Bank Name',
24
+ BRANCH_NAME_PLACEHOLDER: 'Branch Name',
25
+ ACCOUNT_HOLDER_NAME_PLACEHOLDER: 'Enter Account Holder Name',
26
+ CONFIRM_ACCOUNT_NUMBER_PLACEHOLDER: 'Re-enter Account Number',
27
27
 
28
- // Account types
29
- ACCOUNT_TYPE_SAVINGS: 'Savings Account',
30
- ACCOUNT_TYPE_CURRENT: 'Current Account',
31
- ACCOUNT_TYPE_FD: 'Fixed Deposit Account',
32
- ACCOUNT_TYPE_RD: 'Recurring Deposit Account',
28
+ // Account types
29
+ ACCOUNT_TYPE_SAVINGS: 'Savings Account',
30
+ ACCOUNT_TYPE_CURRENT: 'Current Account',
31
+ ACCOUNT_TYPE_FD: 'Fixed Deposit Account',
32
+ ACCOUNT_TYPE_RD: 'Recurring Deposit Account',
33
33
 
34
- // Buttons
35
- ADD_BANK_BUTTON: 'Add Bank Account',
36
- UPDATE_BANK_BUTTON: 'Update Bank Account',
37
- DELETE_BANK_BUTTON: 'Delete Bank Account',
38
- FIND_IFSC_BUTTON: 'Find IFSC',
39
- VERIFY_ACCOUNT_BUTTON: 'Verify Account',
40
- PROCEED_PAYMENT_BUTTON: 'Proceed to Payment',
41
- RETRY_PAYMENT_BUTTON: 'Retry Payment',
42
- REFRESH_STATUS_BUTTON: 'Refresh Status',
34
+ // Buttons
35
+ ADD_BANK_BUTTON: 'Add Bank Account',
36
+ UPDATE_BANK_BUTTON: 'Update Bank Account',
37
+ DELETE_BANK_BUTTON: 'Delete Bank Account',
38
+ FIND_IFSC_BUTTON: 'Find IFSC',
39
+ VERIFY_ACCOUNT_BUTTON: 'Verify Account',
40
+ PROCEED_PAYMENT_BUTTON: 'Proceed to Payment',
41
+ RETRY_PAYMENT_BUTTON: 'Retry Payment',
42
+ REFRESH_STATUS_BUTTON: 'Refresh Status',
43
43
 
44
- // Messages
45
- BANK_ACCOUNT_ADDED_SUCCESS: 'Bank account added successfully',
46
- BANK_ACCOUNT_ADDED_FAILED: 'Failed to add bank account',
47
- BANK_ACCOUNT_UPDATED_SUCCESS: 'Bank account updated successfully',
48
- BANK_ACCOUNT_UPDATED_FAILED: 'Failed to update bank account',
49
- BANK_ACCOUNT_DELETED_SUCCESS: 'Bank account deleted successfully',
50
- BANK_ACCOUNT_DELETED_FAILED: 'Failed to delete bank account',
51
- IFSC_FOUND_SUCCESS: 'IFSC details found',
52
- IFSC_NOT_FOUND: 'IFSC code not found',
53
- ACCOUNT_VERIFIED_SUCCESS: 'Account verified successfully',
54
- ACCOUNT_VERIFICATION_FAILED: 'Account verification failed',
55
- PAYMENT_SUCCESS: 'Payment completed successfully',
56
- PAYMENT_FAILED: 'Payment failed',
57
- PAYMENT_PENDING: 'Payment is pending',
58
- PAYMENT_PROCESSING: 'Payment is being processed',
44
+ // Messages
45
+ BANK_ACCOUNT_ADDED_SUCCESS: 'Bank account added successfully',
46
+ BANK_ACCOUNT_ADDED_FAILED: 'Failed to add bank account',
47
+ BANK_ACCOUNT_UPDATED_SUCCESS: 'Bank account updated successfully',
48
+ BANK_ACCOUNT_UPDATED_FAILED: 'Failed to update bank account',
49
+ BANK_ACCOUNT_DELETED_SUCCESS: 'Bank account deleted successfully',
50
+ BANK_ACCOUNT_DELETED_FAILED: 'Failed to delete bank account',
51
+ IFSC_FOUND_SUCCESS: 'IFSC details found',
52
+ IFSC_NOT_FOUND: 'IFSC code not found',
53
+ ACCOUNT_VERIFIED_SUCCESS: 'Account verified successfully',
54
+ ACCOUNT_VERIFICATION_FAILED: 'Account verification failed',
55
+ PAYMENT_SUCCESS: 'Payment completed successfully',
56
+ PAYMENT_FAILED: 'Payment failed',
57
+ PAYMENT_PENDING: 'Payment is pending',
58
+ PAYMENT_PROCESSING: 'Payment is being processed',
59
59
 
60
- // Validation messages
61
- ACCOUNT_TYPE_REQUIRED: 'Account type is required',
62
- ACCOUNT_NUMBER_REQUIRED: 'Account number is required',
63
- IFSC_CODE_REQUIRED: 'IFSC code is required',
64
- BANK_NAME_REQUIRED: 'Bank name is required',
65
- BRANCH_NAME_REQUIRED: 'Branch name is required',
66
- ACCOUNT_HOLDER_NAME_REQUIRED: 'Account holder name is required',
67
- INVALID_ACCOUNT_NUMBER: 'Invalid account number',
68
- INVALID_IFSC_CODE: 'Invalid IFSC code',
69
- ACCOUNT_NUMBER_MISMATCH: 'Account numbers do not match',
70
- IFSC_CODE_NOT_FOUND: 'IFSC code not found. Please verify and try again.',
60
+ // Validation messages
61
+ ACCOUNT_TYPE_REQUIRED: 'Account type is required',
62
+ ACCOUNT_NUMBER_REQUIRED: 'Account number is required',
63
+ IFSC_CODE_REQUIRED: 'IFSC code is required',
64
+ BANK_NAME_REQUIRED: 'Bank name is required',
65
+ BRANCH_NAME_REQUIRED: 'Branch name is required',
66
+ ACCOUNT_HOLDER_NAME_REQUIRED: 'Account holder name is required',
67
+ INVALID_ACCOUNT_NUMBER: 'Invalid account number',
68
+ INVALID_IFSC_CODE: 'Invalid IFSC code',
69
+ ACCOUNT_NUMBER_MISMATCH: 'Account numbers do not match',
70
+ IFSC_CODE_NOT_FOUND: 'IFSC code not found. Please verify and try again.',
71
71
 
72
- // Status messages
73
- PAYMENT_STATUS_SUCCESS: 'Payment Successful',
74
- PAYMENT_STATUS_FAILED: 'Payment Failed',
75
- PAYMENT_STATUS_PENDING: 'Payment Pending',
76
- PAYMENT_STATUS_PROCESSING: 'Processing Payment',
77
- PAYMENT_STATUS_CANCELLED: 'Payment Cancelled',
72
+ // Status messages
73
+ PAYMENT_STATUS_SUCCESS: 'Payment Successful',
74
+ PAYMENT_STATUS_FAILED: 'Payment Failed',
75
+ PAYMENT_STATUS_PENDING: 'Payment Pending',
76
+ PAYMENT_STATUS_PROCESSING: 'Processing Payment',
77
+ PAYMENT_STATUS_CANCELLED: 'Payment Cancelled',
78
78
 
79
- // Instructions
80
- BANK_DETAILS_INSTRUCTIONS: 'Please provide your bank account details for FD processing',
81
- IFSC_INSTRUCTIONS: 'Enter IFSC code to find bank and branch details',
82
- PAYMENT_INSTRUCTIONS: 'Please complete the payment to proceed with FD creation',
83
- ACCOUNT_VERIFICATION_INSTRUCTIONS: 'Your account will be verified before processing',
84
- PAYMENT_SUCCESS_DISCLAIMER: 'Your FD request has been submitted successfully and is currently under review. The review process may take 2–3 days. You will receive all related updates and information via email.',
79
+ // Instructions
80
+ BANK_DETAILS_INSTRUCTIONS: 'Please provide your bank account details for FD processing',
81
+ IFSC_INSTRUCTIONS: 'Enter IFSC code to find bank and branch details',
82
+ PAYMENT_INSTRUCTIONS: 'Please complete the payment to proceed with FD creation',
83
+ ACCOUNT_VERIFICATION_INSTRUCTIONS: 'Your account will be verified before processing',
84
+ PAYMENT_SUCCESS_DISCLAIMER: 'Your FD request has been submitted successfully and is currently under review. The review process may take 2–3 days. You will receive all related updates and information via email.',
85
85
 
86
- // Error messages
87
- BANK_VERIFICATION_FAILED: 'Bank account verification failed',
88
- PAYMENT_GATEWAY_ERROR: 'Payment gateway error occurred',
89
- INSUFFICIENT_FUNDS: 'Insufficient funds in account',
90
- PAYMENT_TIMEOUT: 'Payment request timed out',
91
- BANK_SERVICE_UNAVAILABLE: 'Bank service is temporarily unavailable',
86
+ // Error messages
87
+ BANK_VERIFICATION_FAILED: 'Bank account verification failed',
88
+ PAYMENT_GATEWAY_ERROR: 'Payment gateway error occurred',
89
+ INSUFFICIENT_FUNDS: 'Insufficient funds in account',
90
+ PAYMENT_TIMEOUT: 'Payment request timed out',
91
+ BANK_SERVICE_UNAVAILABLE: 'Bank service is temporarily unavailable',
92
92
  } as const;
@@ -118,7 +118,7 @@ export const FD_STRINGS = {
118
118
  AMOUNT_MULTIPLES_ERROR: 'Amount must be in multiples of ₹1,000',
119
119
 
120
120
  // Senior citizen benefits
121
- SENIOR_CITIZEN_BENEFIT: '+0.25% p.a. more for senior citizens',
121
+ SENIOR_CITIZEN_BENEFIT: '+0.5% p.a. more for senior citizens',
122
122
 
123
123
  // Tax resident confirmation
124
124
  TAX_RESIDENT_CONFIRMATION: 'I confirm I am a tax resident of India',
@@ -135,7 +135,7 @@ export const FD_STRINGS = {
135
135
  TRUSTED_BY: 'Trusted By ',
136
136
  CRORES_INDIANS: '4.6 Crores Indians',
137
137
  AAA_RATING: 'Stable Rating',
138
- RATING: 'AA+',
138
+ RATING: 'AAA',
139
139
 
140
140
  // Fallback tenure options
141
141
  TENURE_12_MONTHS: '12 Months',