@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.
Files changed (315) hide show
  1. package/README.md +184 -0
  2. package/lib/api/applicationApi.d.ts +1 -0
  3. package/lib/api/applicationApi.js +11 -0
  4. package/lib/api/bankApi.d.ts +352 -0
  5. package/lib/api/bankApi.js +54 -0
  6. package/lib/api/baseApi.d.ts +8 -0
  7. package/lib/api/baseApi.js +456 -0
  8. package/lib/api/customerApi.d.ts +855 -0
  9. package/lib/api/customerApi.js +213 -0
  10. package/lib/api/fdApi.d.ts +979 -0
  11. package/lib/api/fdApi.js +112 -0
  12. package/lib/api/fdCalculatorApi.d.ts +179 -0
  13. package/lib/api/fdCalculatorApi.js +36 -0
  14. package/lib/api/index.d.ts +14 -0
  15. package/lib/api/index.js +45 -0
  16. package/lib/api/interestRateApi.d.ts +585 -0
  17. package/lib/api/interestRateApi.js +101 -0
  18. package/lib/api/kycApi.d.ts +486 -0
  19. package/lib/api/kycApi.js +71 -0
  20. package/lib/api/masterDataApi.d.ts +158 -0
  21. package/lib/api/masterDataApi.js +32 -0
  22. package/lib/api/nomineeApi.d.ts +325 -0
  23. package/lib/api/nomineeApi.js +46 -0
  24. package/lib/api/onboardingApi.d.ts +192 -0
  25. package/lib/api/onboardingApi.js +41 -0
  26. package/lib/api/panApi.d.ts +0 -0
  27. package/lib/api/panApi.js +23 -0
  28. package/lib/api/paymentApi.d.ts +325 -0
  29. package/lib/api/paymentApi.js +46 -0
  30. package/lib/api/workflowApi.d.ts +654 -0
  31. package/lib/api/workflowApi.js +90 -0
  32. package/lib/assets/images/images.d.ts +4 -0
  33. package/lib/assets/images/images.js +10 -0
  34. package/lib/components/AadhaarInput.d.ts +13 -0
  35. package/lib/components/AadhaarInput.js +47 -0
  36. package/lib/components/ActionButton.d.ts +12 -0
  37. package/lib/components/ActionButton.js +87 -0
  38. package/lib/components/ActiveFDCard.d.ts +16 -0
  39. package/lib/components/ActiveFDCard.js +95 -0
  40. package/lib/components/AmountInput.d.ts +20 -0
  41. package/lib/components/AmountInput.js +144 -0
  42. package/lib/components/CheckboxOption.d.ts +11 -0
  43. package/lib/components/CheckboxOption.js +41 -0
  44. package/lib/components/CompanyHeader.d.ts +7 -0
  45. package/lib/components/CompanyHeader.js +57 -0
  46. package/lib/components/DropdownSelector.d.ts +9 -0
  47. package/lib/components/DropdownSelector.js +49 -0
  48. package/lib/components/EmptyState.d.ts +17 -0
  49. package/lib/components/EmptyState.js +44 -0
  50. package/lib/components/ErrorDisplay.d.ts +17 -0
  51. package/lib/components/ErrorDisplay.js +69 -0
  52. package/lib/components/FAQItem.d.ts +9 -0
  53. package/lib/components/FAQItem.js +52 -0
  54. package/lib/components/FDCard.d.ts +21 -0
  55. package/lib/components/FDCard.js +96 -0
  56. package/lib/components/FormDropdown.d.ts +18 -0
  57. package/lib/components/FormDropdown.js +155 -0
  58. package/lib/components/FormSection.d.ts +14 -0
  59. package/lib/components/FormSection.js +38 -0
  60. package/lib/components/Header.d.ts +14 -0
  61. package/lib/components/Header.js +52 -0
  62. package/lib/components/IFSCSearchResultCard.d.ts +13 -0
  63. package/lib/components/IFSCSearchResultCard.js +70 -0
  64. package/lib/components/InfoBox.d.ts +8 -0
  65. package/lib/components/InfoBox.js +39 -0
  66. package/lib/components/InterestRateCard.d.ts +8 -0
  67. package/lib/components/InterestRateCard.js +46 -0
  68. package/lib/components/LoadingIndicator.d.ts +12 -0
  69. package/lib/components/LoadingIndicator.js +30 -0
  70. package/lib/components/OTPInput.d.ts +17 -0
  71. package/lib/components/OTPInput.js +144 -0
  72. package/lib/components/PaymentDetailsCard.d.ts +20 -0
  73. package/lib/components/PaymentDetailsCard.js +68 -0
  74. package/lib/components/PendingFDBottomSheet.d.ts +18 -0
  75. package/lib/components/PendingFDBottomSheet.js +122 -0
  76. package/lib/components/SafeAreaWrapper.d.ts +13 -0
  77. package/lib/components/SafeAreaWrapper.js +41 -0
  78. package/lib/components/ScreenHeader.d.ts +11 -0
  79. package/lib/components/ScreenHeader.js +46 -0
  80. package/lib/components/StatusDisplay.d.ts +15 -0
  81. package/lib/components/StatusDisplay.js +88 -0
  82. package/lib/components/TextFieldWithLabel.d.ts +46 -0
  83. package/lib/components/TextFieldWithLabel.js +326 -0
  84. package/lib/components/TrustBox.d.ts +8 -0
  85. package/lib/components/TrustBox.js +45 -0
  86. package/lib/components/ValidationErrorAlert.d.ts +23 -0
  87. package/lib/components/ValidationErrorAlert.js +39 -0
  88. package/lib/components/ValidationMessage.d.ts +9 -0
  89. package/lib/components/ValidationMessage.js +98 -0
  90. package/lib/components/index.d.ts +35 -0
  91. package/lib/components/index.js +64 -0
  92. package/lib/config/apiConfig.d.ts +34 -0
  93. package/lib/config/apiConfig.js +158 -0
  94. package/lib/config/appDataConfig.d.ts +114 -0
  95. package/lib/config/appDataConfig.js +264 -0
  96. package/lib/config/encryptionConfig.d.ts +21 -0
  97. package/lib/config/encryptionConfig.js +61 -0
  98. package/lib/config/workflowConstants.d.ts +37 -0
  99. package/lib/config/workflowConstants.js +38 -0
  100. package/lib/constants/strings/bank.d.ts +72 -0
  101. package/lib/constants/strings/bank.js +86 -0
  102. package/lib/constants/strings/base64Images.d.ts +25 -0
  103. package/lib/constants/strings/base64Images.js +28 -0
  104. package/lib/constants/strings/common.d.ts +53 -0
  105. package/lib/constants/strings/common.js +62 -0
  106. package/lib/constants/strings/employee.d.ts +61 -0
  107. package/lib/constants/strings/employee.js +77 -0
  108. package/lib/constants/strings/faq.d.ts +14 -0
  109. package/lib/constants/strings/faq.js +20 -0
  110. package/lib/constants/strings/fd.d.ts +122 -0
  111. package/lib/constants/strings/fd.js +151 -0
  112. package/lib/constants/strings/home.d.ts +49 -0
  113. package/lib/constants/strings/home.js +62 -0
  114. package/lib/constants/strings/index.d.ts +16 -0
  115. package/lib/constants/strings/index.js +44 -0
  116. package/lib/constants/strings/kyc.d.ts +80 -0
  117. package/lib/constants/strings/kyc.js +94 -0
  118. package/lib/constants/strings/nominee.d.ts +64 -0
  119. package/lib/constants/strings/nominee.js +81 -0
  120. package/lib/hooks/useAuth.d.ts +25 -0
  121. package/lib/hooks/useAuth.js +39 -0
  122. package/lib/hooks/useFDData.d.ts +11 -0
  123. package/lib/hooks/useFDData.js +40 -0
  124. package/lib/index.d.ts +69 -0
  125. package/lib/index.js +182 -0
  126. package/lib/navigation/RootNavigator.d.ts +8 -0
  127. package/lib/navigation/RootNavigator.js +205 -0
  128. package/lib/navigation/SimpleNavigator.d.ts +11 -0
  129. package/lib/navigation/SimpleNavigator.js +107 -0
  130. package/lib/navigation/helpers.d.ts +11 -0
  131. package/lib/navigation/helpers.js +83 -0
  132. package/lib/navigation/index.d.ts +15 -0
  133. package/lib/navigation/index.js +42 -0
  134. package/lib/navigation/types.d.ts +113 -0
  135. package/lib/navigation/types.js +2 -0
  136. package/lib/navigation/workflowNavigator.d.ts +22 -0
  137. package/lib/navigation/workflowNavigator.js +104 -0
  138. package/lib/providers/ApiProvider.d.ts +7 -0
  139. package/lib/providers/ApiProvider.js +34 -0
  140. package/lib/providers/MasterDataProvider.d.ts +10 -0
  141. package/lib/providers/MasterDataProvider.js +54 -0
  142. package/lib/screens/AadhaarVerification.d.ts +7 -0
  143. package/lib/screens/AadhaarVerification.js +627 -0
  144. package/lib/screens/AddBankAccount.d.ts +22 -0
  145. package/lib/screens/AddBankAccount.js +381 -0
  146. package/lib/screens/BankDetail.d.ts +16 -0
  147. package/lib/screens/BankDetail.js +596 -0
  148. package/lib/screens/BookFD.d.ts +0 -0
  149. package/lib/screens/BookFD.js +315 -0
  150. package/lib/screens/Employee.d.ts +18 -0
  151. package/lib/screens/Employee.js +594 -0
  152. package/lib/screens/FDCalculator.d.ts +18 -0
  153. package/lib/screens/FDCalculator.js +759 -0
  154. package/lib/screens/FDList.d.ts +27 -0
  155. package/lib/screens/FDList.js +1008 -0
  156. package/lib/screens/FindIFSC.d.ts +16 -0
  157. package/lib/screens/FindIFSC.js +248 -0
  158. package/lib/screens/Home.d.ts +0 -0
  159. package/lib/screens/Home.js +143 -0
  160. package/lib/screens/NomineeDetail.d.ts +17 -0
  161. package/lib/screens/NomineeDetail.js +592 -0
  162. package/lib/screens/PayNow.d.ts +14 -0
  163. package/lib/screens/PayNow.js +230 -0
  164. package/lib/screens/Payment.d.ts +11 -0
  165. package/lib/screens/Payment.js +191 -0
  166. package/lib/screens/PaymentStatus.d.ts +16 -0
  167. package/lib/screens/PaymentStatus.js +397 -0
  168. package/lib/screens/ReviewKYC.d.ts +21 -0
  169. package/lib/screens/ReviewKYC.js +660 -0
  170. package/lib/state/paymentSession.d.ts +8 -0
  171. package/lib/state/paymentSession.js +13 -0
  172. package/lib/store/fdListSelectedSlice.d.ts +21 -0
  173. package/lib/store/fdListSelectedSlice.js +26 -0
  174. package/lib/store/hooks.d.ts +8 -0
  175. package/lib/store/hooks.js +31 -0
  176. package/lib/store/index.d.ts +3 -0
  177. package/lib/store/index.js +8 -0
  178. package/lib/store/onboardingSlice.d.ts +12 -0
  179. package/lib/store/onboardingSlice.js +32 -0
  180. package/lib/store/store.d.ts +13 -0
  181. package/lib/store/store.js +33 -0
  182. package/lib/theme/ThemeContext.d.ts +210 -0
  183. package/lib/theme/ThemeContext.js +90 -0
  184. package/lib/theme/colors.d.ts +80 -0
  185. package/lib/theme/colors.js +85 -0
  186. package/lib/theme/index.d.ts +34 -0
  187. package/lib/theme/index.js +69 -0
  188. package/lib/theme/shadows.d.ts +53 -0
  189. package/lib/theme/shadows.js +58 -0
  190. package/lib/theme/typography.d.ts +134 -0
  191. package/lib/theme/typography.js +143 -0
  192. package/lib/types/dataTypes.d.ts +34 -0
  193. package/lib/types/dataTypes.js +2 -0
  194. package/lib/types/workflowTypes.d.ts +2 -0
  195. package/lib/types/workflowTypes.js +2 -0
  196. package/lib/utils/apiLogger.d.ts +48 -0
  197. package/lib/utils/apiLogger.js +105 -0
  198. package/lib/utils/encryption.d.ts +28 -0
  199. package/lib/utils/encryption.js +113 -0
  200. package/lib/utils/getFDData.d.ts +48 -0
  201. package/lib/utils/getFDData.js +154 -0
  202. package/lib/utils/globalData.d.ts +2 -0
  203. package/lib/utils/globalData.js +10 -0
  204. package/package.json +76 -0
  205. package/src/api/applicationApi.ts +12 -0
  206. package/src/api/bankApi.ts +42 -0
  207. package/src/api/baseApi.ts +513 -0
  208. package/src/api/customerApi.ts +291 -0
  209. package/src/api/fdApi.ts +150 -0
  210. package/src/api/fdCalculatorApi.ts +41 -0
  211. package/src/api/index.ts +29 -0
  212. package/src/api/interestRateApi.ts +143 -0
  213. package/src/api/kycApi.ts +63 -0
  214. package/src/api/masterDataApi.ts +34 -0
  215. package/src/api/nomineeApi.ts +34 -0
  216. package/src/api/onboardingApi.ts +64 -0
  217. package/src/api/panApi.ts +25 -0
  218. package/src/api/paymentApi.ts +34 -0
  219. package/src/api/workflowApi.ts +94 -0
  220. package/src/assets/images/arrow-filled.png +0 -0
  221. package/src/assets/images/arrow-left.png +0 -0
  222. package/src/assets/images/backicon.png +0 -0
  223. package/src/assets/images/calendar.png +0 -0
  224. package/src/assets/images/chevron-down.png +0 -0
  225. package/src/assets/images/chevron-down@2x.png +0 -0
  226. package/src/assets/images/chevron-down@3x.png +0 -0
  227. package/src/assets/images/images.js +8 -0
  228. package/src/components/AadhaarInput.tsx +91 -0
  229. package/src/components/ActionButton.tsx +129 -0
  230. package/src/components/ActiveFDCard.tsx +158 -0
  231. package/src/components/AmountInput.tsx +217 -0
  232. package/src/components/CheckboxOption.tsx +93 -0
  233. package/src/components/CompanyHeader.tsx +78 -0
  234. package/src/components/DropdownSelector.tsx +77 -0
  235. package/src/components/EmptyState.tsx +109 -0
  236. package/src/components/ErrorDisplay.tsx +135 -0
  237. package/src/components/FAQItem.tsx +90 -0
  238. package/src/components/FDCard.tsx +165 -0
  239. package/src/components/FormDropdown.tsx +214 -0
  240. package/src/components/FormSection.tsx +86 -0
  241. package/src/components/Header.tsx +110 -0
  242. package/src/components/IFSCSearchResultCard.tsx +139 -0
  243. package/src/components/InfoBox.tsx +55 -0
  244. package/src/components/InterestRateCard.tsx +77 -0
  245. package/src/components/LoadingIndicator.tsx +63 -0
  246. package/src/components/OTPInput.tsx +213 -0
  247. package/src/components/PaymentDetailsCard.tsx +120 -0
  248. package/src/components/PendingFDBottomSheet.tsx +235 -0
  249. package/src/components/README.md +210 -0
  250. package/src/components/SafeAreaWrapper.tsx +68 -0
  251. package/src/components/ScreenHeader.tsx +83 -0
  252. package/src/components/StatusDisplay.tsx +139 -0
  253. package/src/components/TextFieldWithLabel.tsx +502 -0
  254. package/src/components/TrustBox.tsx +63 -0
  255. package/src/components/ValidationErrorAlert.tsx +57 -0
  256. package/src/components/ValidationMessage.tsx +134 -0
  257. package/src/components/index.tsx +47 -0
  258. package/src/config/apiConfig.ts +217 -0
  259. package/src/config/appDataConfig.ts +279 -0
  260. package/src/config/encryptionConfig.ts +65 -0
  261. package/src/config/workflowConstants.ts +43 -0
  262. package/src/constants/strings/README.md +146 -0
  263. package/src/constants/strings/bank.ts +92 -0
  264. package/src/constants/strings/base64Images.ts +29 -0
  265. package/src/constants/strings/common.ts +63 -0
  266. package/src/constants/strings/employee.ts +85 -0
  267. package/src/constants/strings/faq.ts +23 -0
  268. package/src/constants/strings/fd.ts +172 -0
  269. package/src/constants/strings/home.ts +67 -0
  270. package/src/constants/strings/index.ts +21 -0
  271. package/src/constants/strings/kyc.ts +100 -0
  272. package/src/constants/strings/nominee.ts +90 -0
  273. package/src/hooks/useAuth.ts +42 -0
  274. package/src/hooks/useFDData.ts +48 -0
  275. package/src/index.tsx +173 -0
  276. package/src/navigation/RootNavigator.tsx +352 -0
  277. package/src/navigation/SimpleNavigator.tsx +107 -0
  278. package/src/navigation/helpers.ts +85 -0
  279. package/src/navigation/index.tsx +81 -0
  280. package/src/navigation/types.ts +124 -0
  281. package/src/navigation/workflowNavigator.ts +131 -0
  282. package/src/providers/ApiProvider.tsx +43 -0
  283. package/src/providers/MasterDataProvider.tsx +30 -0
  284. package/src/screens/AadhaarVerification.tsx +809 -0
  285. package/src/screens/AddBankAccount.tsx +541 -0
  286. package/src/screens/BankDetail.tsx +826 -0
  287. package/src/screens/BookFD.tsx +330 -0
  288. package/src/screens/Employee.tsx +822 -0
  289. package/src/screens/FDCalculator.tsx +987 -0
  290. package/src/screens/FDList.tsx +1284 -0
  291. package/src/screens/FindIFSC.tsx +332 -0
  292. package/src/screens/Home.tsx +152 -0
  293. package/src/screens/NomineeDetail.tsx +800 -0
  294. package/src/screens/PayNow.tsx +282 -0
  295. package/src/screens/Payment.tsx +224 -0
  296. package/src/screens/PaymentStatus.tsx +561 -0
  297. package/src/screens/ReviewKYC.tsx +956 -0
  298. package/src/state/paymentSession.ts +13 -0
  299. package/src/store/fdListSelectedSlice.ts +42 -0
  300. package/src/store/hooks.ts +27 -0
  301. package/src/store/index.ts +3 -0
  302. package/src/store/onboardingSlice.ts +37 -0
  303. package/src/store/store.ts +35 -0
  304. package/src/theme/ThemeContext.tsx +82 -0
  305. package/src/theme/colors.ts +90 -0
  306. package/src/theme/index.ts +64 -0
  307. package/src/theme/shadows.ts +61 -0
  308. package/src/theme/typography.ts +151 -0
  309. package/src/types/dataTypes.ts +37 -0
  310. package/src/types/env.d.ts +93 -0
  311. package/src/types/workflowTypes.ts +12 -0
  312. package/src/utils/apiLogger.ts +166 -0
  313. package/src/utils/encryption.ts +159 -0
  314. package/src/utils/getFDData.ts +175 -0
  315. package/src/utils/globalData.ts +7 -0
@@ -0,0 +1,63 @@
1
+ // KYC API - PAN Rapid, eKYC Send OTP, Aadhaar Verify OTP
2
+ import { baseApi } from './baseApi';
3
+
4
+ export const kycApi = baseApi.injectEndpoints({
5
+ endpoints: (builder) => ({
6
+ panRapidNo: builder.mutation<any, any>({
7
+ query: (body) => {
8
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, ...requestBody } = body;
9
+ return {
10
+ url: 'kyc/pan/rapidno',
11
+ method: 'POST',
12
+ body: requestBody,
13
+ headers: {
14
+ provider: providerId || '{{shriramprovider}}',
15
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
16
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
17
+ applicationid: applicationid || '{{applicationid}}',
18
+ },
19
+ };
20
+ },
21
+ }),
22
+ ekycSendOtp: builder.mutation<any, any>({
23
+ query: (body) => {
24
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, entityid, ...requestBody } = body;
25
+ return {
26
+ url: 'kyc/ekyc/otp',
27
+ method: 'POST',
28
+ body: requestBody,
29
+ headers: {
30
+ provider: providerId || '{{shriramprovider}}',
31
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
32
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
33
+ applicationid: applicationid || '{{applicationid}}',
34
+ entityid: entityid || '{{entityid}}',
35
+ },
36
+ };
37
+ },
38
+ }),
39
+ aadhaarVerifyOtp: builder.mutation<any, any>({
40
+ query: (body) => {
41
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, entityid, ...requestBody } = body;
42
+ return {
43
+ url: 'kyc/ekyc/verify',
44
+ method: 'POST',
45
+ body: requestBody,
46
+ headers: {
47
+ provider: providerId || '{{shriramprovider}}',
48
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
49
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
50
+ applicationid: applicationid || '{{applicationid}}',
51
+ entityid: entityid || '{{entityid}}',
52
+ },
53
+ };
54
+ },
55
+ }),
56
+ }),
57
+ });
58
+
59
+ export const {
60
+ usePanRapidNoMutation,
61
+ useEkycSendOtpMutation,
62
+ useAadhaarVerifyOtpMutation,
63
+ } = kycApi;
@@ -0,0 +1,34 @@
1
+ // Master Data API - Occupation, Master Data, etc.
2
+ import { baseApi } from './baseApi';
3
+
4
+ export const masterDataApi = baseApi.injectEndpoints({
5
+ endpoints: (builder) => ({
6
+ // Removed Occupation Master API
7
+
8
+ // New Master Data API
9
+ getMasterData: builder.query<any, { providerId?: string } | void>({
10
+ query: (args) => {
11
+ const providerId = (args as any)?.providerId;
12
+ const request = {
13
+ url: 'masterdata',
14
+ method: 'GET' as const,
15
+ headers: {
16
+ workflowInstanceId: '{{workflowInstanceId}}',
17
+ 'x-api-key': '{{X-API-KEY}}',
18
+ encryptdecrypt: 'false',
19
+ provider: providerId || '{{shriramprovider}}',
20
+ },
21
+ };
22
+ return request;
23
+ },
24
+ transformResponse: (response) => {
25
+ return response;
26
+ },
27
+ }),
28
+ }),
29
+ overrideExisting: false,
30
+ });
31
+
32
+ export const {
33
+ useGetMasterDataQuery
34
+ } = masterDataApi;
@@ -0,0 +1,34 @@
1
+ import { baseApi } from './baseApi';
2
+
3
+ export const nomineeApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ addNominee: builder.mutation<any, any>({
6
+ query: (body) => {
7
+ const { providerId, ...requestBody } = body;
8
+ return {
9
+ url: 'nominee/add',
10
+ method: 'POST',
11
+ body: requestBody,
12
+ headers: {
13
+ provider: providerId || '{{shriramprovider}}',
14
+ },
15
+ };
16
+ },
17
+ }),
18
+ updateNominee: builder.mutation<any, any>({
19
+ query: (body) => {
20
+ const { providerId, ...requestBody } = body;
21
+ return {
22
+ url: 'nominee/update',
23
+ method: 'POST',
24
+ body: requestBody,
25
+ headers: {
26
+ provider: providerId || '{{shriramprovider}}',
27
+ },
28
+ };
29
+ },
30
+ }),
31
+ }),
32
+ });
33
+
34
+ export const { useAddNomineeMutation, useUpdateNomineeMutation } = nomineeApi;
@@ -0,0 +1,64 @@
1
+ // Onboarding API
2
+ import { baseApi } from './baseApi';
3
+
4
+ export interface OnboardingRequest {
5
+ // User personal details
6
+ mobile: string;
7
+ prefix: string;
8
+ fullName: string;
9
+ firstName: string;
10
+ lastName: string;
11
+ userReferenceId: string;
12
+ dob: string;
13
+ email: string;
14
+ gender: string;
15
+
16
+ // FD details
17
+ autoRenewal: boolean;
18
+ investmentAmount: number;
19
+ tenureInMonths: number;
20
+ interestPayoutTerm: string;
21
+ interestRate: number;
22
+ maturityDate: string;
23
+ maturityAmount: number;
24
+
25
+ // Additional fields
26
+ principalAmount: number;
27
+ isWomenDepositor?: boolean;
28
+ investmentType: string;
29
+ providerId?: string;
30
+ }
31
+
32
+ export interface OnboardingResponse {
33
+ status: string;
34
+ statusCode: number;
35
+ message: string;
36
+ data: any;
37
+ }
38
+
39
+ export const onboardingApi = baseApi.injectEndpoints({
40
+ endpoints: (builder) => ({
41
+ startOnboarding: builder.mutation<OnboardingResponse, OnboardingRequest>({
42
+ query: (body) => {
43
+ const { providerId, ...requestBody } = body;
44
+ const request = {
45
+ url: 'customer/onboard',
46
+ method: 'POST' as const,
47
+ body: requestBody,
48
+ headers: {
49
+ provider: providerId || '{{shriramprovider}}',
50
+ },
51
+ };
52
+ return request;
53
+ },
54
+ transformResponse: (response: any, meta, arg) => {
55
+ return response;
56
+ },
57
+ transformErrorResponse: (response: any, meta, arg) => {
58
+ return response;
59
+ },
60
+ }),
61
+ }),
62
+ });
63
+
64
+ export const { useStartOnboardingMutation } = onboardingApi;
@@ -0,0 +1,25 @@
1
+ // import { baseApi } from './baseApi';
2
+
3
+ // export const panApi = baseApi.injectEndpoints({
4
+ // endpoints: (builder) => ({
5
+ // panRapidNo: builder.mutation<any, any>({
6
+ // query: (body) => {
7
+ // const { providerId, workflowInstanceId, userreferenceid, applicationid, ...requestBody } = body || {};
8
+ // const headers: Record<string, string> = {};
9
+ // if (providerId) headers.provider = providerId;
10
+ // if (workflowInstanceId) headers.workflowInstanceId = workflowInstanceId;
11
+ // if (userreferenceid) headers.userreferenceid = userreferenceid;
12
+ // if (applicationid) headers.applicationid = applicationid;
13
+
14
+ // return {
15
+ // url: 'kyc/pan/rapidno',
16
+ // method: 'POST',
17
+ // body: requestBody,
18
+ // headers,
19
+ // };
20
+ // },
21
+ // }),
22
+ // }),
23
+ // });
24
+
25
+ // export const { usePanRapidNoMutation } = panApi;
@@ -0,0 +1,34 @@
1
+ import { baseApi } from './baseApi';
2
+
3
+ export const paymentApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ makePayment: builder.mutation<any, any>({
6
+ query: (body) => {
7
+ const { providerId, ...requestBody } = body;
8
+ return {
9
+ url: 'payment/initiate',
10
+ method: 'POST',
11
+ body: requestBody,
12
+ headers: {
13
+ provider: providerId || '{{shriramprovider}}',
14
+ },
15
+ };
16
+ },
17
+ }),
18
+ verifyPayment: builder.mutation<any, any>({
19
+ query: (body) => {
20
+ const { providerId, ...requestBody } = body;
21
+ return {
22
+ url: 'payment/verify',
23
+ method: 'POST',
24
+ body: requestBody,
25
+ headers: {
26
+ provider: providerId || '{{shriramprovider}}',
27
+ },
28
+ };
29
+ },
30
+ }),
31
+ }),
32
+ });
33
+
34
+ export const { useMakePaymentMutation, useVerifyPaymentMutation } = paymentApi;
@@ -0,0 +1,94 @@
1
+ import { baseApi } from './baseApi';
2
+
3
+ export interface TerminateWorkflowRequest {
4
+ providerId?: string; // header: provider (optional)
5
+ workflowInstanceId: string;
6
+ entityId: string;
7
+ applicationId: string;
8
+ }
9
+
10
+ export type TerminateWorkflowResponse = any; // Replace with concrete type when available
11
+
12
+ export const workflowApi = baseApi.injectEndpoints({
13
+ endpoints: (builder) => ({
14
+ terminateWorkflow: builder.mutation<
15
+ TerminateWorkflowResponse,
16
+ TerminateWorkflowRequest
17
+ >({
18
+ query: ({ providerId, workflowInstanceId, entityId, applicationId }) => {
19
+ const requestConfig = {
20
+ url: 'workflow/terminate',
21
+ method: 'POST' as const,
22
+ headers: {
23
+ provider: providerId || '{{shriramprovider}}',
24
+ workflowInstanceId: workflowInstanceId,
25
+ applicationId: applicationId,
26
+ },
27
+ body: {
28
+ workflowInstanceId,
29
+ entityid: entityId,
30
+ applicationId,
31
+ },
32
+ };
33
+
34
+ return requestConfig;
35
+ },
36
+ }),
37
+ updateTask: builder.mutation<any, any>({
38
+ query: (body) => {
39
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, entityid, ...requestBody } = body;
40
+ return {
41
+ url: 'taskflow/update',
42
+ method: 'POST',
43
+ body: {
44
+ ...requestBody,
45
+ workflowInstanceId: workflowInstanceId,
46
+ },
47
+ headers: {
48
+ provider: providerId || '{{shriramprovider}}',
49
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
50
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
51
+ applicationid: applicationid || '{{applicationid}}',
52
+ entityid: entityid || '{{entityid}}',
53
+ },
54
+ };
55
+ },
56
+ }),
57
+ updateState: builder.mutation<any, any>({
58
+ query: (body) => {
59
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, entityid } = body;
60
+ return {
61
+ url: 'workflow/update/state',
62
+ method: 'POST',
63
+ body: {},
64
+ headers: {
65
+ provider: providerId || '{{shriramprovider}}',
66
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
67
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
68
+ applicationid: applicationid || '{{applicationid}}',
69
+ entityid: entityid || '{{entityid}}',
70
+ },
71
+ };
72
+ },
73
+ }),
74
+ previousState: builder.mutation<any, any>({
75
+ query: (body) => {
76
+ const { providerId, workflowInstanceId, userreferenceid, applicationid, entityid } = body;
77
+ return {
78
+ url: 'previous/state',
79
+ method: 'POST',
80
+ body: {}, // No body parameters
81
+ headers: {
82
+ provider: providerId || '{{shriramprovider}}',
83
+ workflowInstanceId: workflowInstanceId || '{{workflowInstanceId}}',
84
+ userreferenceid: userreferenceid || '{{userreferenceid}}',
85
+ applicationid: applicationid || '{{applicationid}}',
86
+ entityid: entityid || '{{entityid}}',
87
+ },
88
+ };
89
+ },
90
+ }),
91
+ }),
92
+ });
93
+
94
+ export const { useTerminateWorkflowMutation, useUpdateTaskMutation, useUpdateStateMutation, usePreviousStateMutation } = workflowApi;
Binary file
Binary file
Binary file
@@ -0,0 +1,8 @@
1
+ // export const images = {
2
+ // arrowLeft: require('./chevron-down.png'),
3
+ // }
4
+
5
+ export const images = {
6
+ arrowLeft: require('./arrow-left.png'),
7
+ chevronDown: require('./chevron-down.png'),
8
+ };
@@ -0,0 +1,91 @@
1
+ import React from 'react';
2
+ import { View, Text, TextInput, StyleSheet } from 'react-native';
3
+ import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
4
+ import { getBorderColor } from '../theme';
5
+
6
+ export interface AadhaarInputProps {
7
+ label: string;
8
+ value: string;
9
+ onChangeText: (text: string) => void;
10
+ placeholder?: string;
11
+ isSuccess?: boolean;
12
+ isLoading?: boolean;
13
+ editable?: boolean;
14
+ maxLength?: number;
15
+ }
16
+
17
+ const AadhaarInput: React.FC<AadhaarInputProps> = ({
18
+ label,
19
+ value,
20
+ onChangeText,
21
+ placeholder = "Aadhaar Card",
22
+ isSuccess = false,
23
+ isLoading = false,
24
+ editable = true,
25
+ maxLength = 14,
26
+ }) => {
27
+ const colors = useColors();
28
+ const typography = useTypography();
29
+ const { themeName } = useTheme();
30
+ const styles = createStyles(colors, typography, themeName);
31
+
32
+ return (
33
+ <View>
34
+ <Text style={styles.label}>{label}</Text>
35
+ <View style={[
36
+ styles.inputContainer,
37
+ isSuccess && styles.successInput
38
+ ]}>
39
+ <TextInput
40
+ style={styles.input}
41
+ placeholder={placeholder}
42
+ placeholderTextColor={themeName === 'dark' ? colors.placeholderColor : colors.textLight}
43
+ value={value}
44
+ onChangeText={onChangeText}
45
+ keyboardType="numeric"
46
+ maxLength={maxLength}
47
+ editable={editable && !isLoading}
48
+ />
49
+ </View>
50
+ </View>
51
+ );
52
+ };
53
+
54
+ const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
55
+ label: {
56
+ ...typography.styles.bodyLarge,
57
+ color: colors.textLight,
58
+ marginBottom: 8,
59
+ fontWeight: '500',
60
+ },
61
+ inputContainer: {
62
+ borderWidth: themeName === 'dark' ? 1 : 0.5,
63
+ borderColor: themeName === 'dark' ? colors.inputBorder : getBorderColor({ colors } as any, 0.36),
64
+ borderRadius: themeName === 'dark' ? 5 : 25,
65
+ backgroundColor: themeName === 'dark' ? colors.inputBackground : 'white',
66
+ marginBottom: 8,
67
+ height: 50,
68
+ },
69
+ successInput: {
70
+ borderColor: colors.success,
71
+ borderWidth: 1,
72
+ shadowColor: colors.success,
73
+ shadowOffset: {
74
+ width: 0,
75
+ height: 2,
76
+ },
77
+ shadowOpacity: 0.1,
78
+ shadowRadius: 4,
79
+ elevation: 3,
80
+ },
81
+ input: {
82
+ ...typography.styles.bodyLarge,
83
+ paddingHorizontal: 16,
84
+ paddingVertical: 0,
85
+ color: colors.text,
86
+ height: '100%',
87
+ textAlignVertical: 'center',
88
+ },
89
+ });
90
+
91
+ export default AadhaarInput;
@@ -0,0 +1,129 @@
1
+ import React from 'react';
2
+ import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, View } from 'react-native';
3
+ import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
4
+
5
+ export interface ActionButtonProps {
6
+ title: string;
7
+ onPress: () => void;
8
+ disabled?: boolean;
9
+ loading?: boolean;
10
+ variant?: 'primary' | 'secondary';
11
+ style?: any;
12
+ textStyle?: any;
13
+ }
14
+
15
+ const ActionButton: React.FC<ActionButtonProps> = ({
16
+ title,
17
+ onPress,
18
+ disabled = false,
19
+ loading = false,
20
+ variant = 'primary',
21
+ style,
22
+ textStyle,
23
+ }) => {
24
+ const colors = useColors();
25
+ const typography = useTypography();
26
+ const { themeName } = useTheme();
27
+ const styles = createStyles(colors, typography, themeName);
28
+
29
+ const isDisabled = disabled || loading;
30
+
31
+ const getButtonStyle = () => {
32
+ const baseStyle: any[] = [styles.button];
33
+
34
+ if (variant === 'primary') {
35
+ baseStyle.push(isDisabled ? styles.primaryDisabled : styles.primaryEnabled);
36
+ } else {
37
+ baseStyle.push(isDisabled ? styles.secondaryDisabled : styles.secondaryEnabled);
38
+ }
39
+
40
+ if (style) {
41
+ baseStyle.push(style);
42
+ }
43
+
44
+ return baseStyle;
45
+ };
46
+
47
+ const getTextStyle = () => {
48
+ const baseStyle = [styles.buttonText];
49
+
50
+ if (variant === 'primary') {
51
+ baseStyle.push(isDisabled ? styles.primaryTextDisabled : styles.primaryTextEnabled);
52
+ } else {
53
+ baseStyle.push(isDisabled ? styles.secondaryTextDisabled : styles.secondaryTextEnabled);
54
+ }
55
+
56
+ if (textStyle) {
57
+ baseStyle.push(textStyle);
58
+ }
59
+
60
+ return baseStyle;
61
+ };
62
+
63
+ return (
64
+ <TouchableOpacity
65
+ style={getButtonStyle()}
66
+ onPress={onPress}
67
+ disabled={isDisabled}
68
+ activeOpacity={isDisabled ? 1 : 0.7}
69
+ >
70
+ {loading ? (
71
+ <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
72
+ <ActivityIndicator size="small" color={themeName === 'dark' ? colors.buttonTextColor : colors.background} style={{ marginRight: 8 }} />
73
+ <Text style={getTextStyle()}>Loading...</Text>
74
+ </View>
75
+ ) : (
76
+ <Text style={getTextStyle()}>{title}</Text>
77
+ )}
78
+ </TouchableOpacity>
79
+ );
80
+ };
81
+
82
+ const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
83
+ button: {
84
+ marginHorizontal: 16,
85
+ marginBottom: 20,
86
+ marginTop: 15,
87
+ padding: 20,
88
+ borderRadius: themeName === 'dark' ? 10 : 30,
89
+ alignItems: 'center',
90
+ justifyContent: 'center',
91
+ height: themeName === 'dark' ? 50 : 56,
92
+ width: 330,
93
+ alignSelf: 'center',
94
+ },
95
+ primaryEnabled: {
96
+ backgroundColor: themeName === 'dark' ? colors.buttonBackground : colors.headerBg,
97
+ },
98
+ primaryDisabled: {
99
+ backgroundColor: '#909090',
100
+ },
101
+ secondaryEnabled: {
102
+ backgroundColor: colors.surface,
103
+ borderWidth: 1,
104
+ borderColor: colors.border,
105
+ },
106
+ secondaryDisabled: {
107
+ borderColor: colors.border,
108
+ opacity: 0.5,
109
+ },
110
+ buttonText: {
111
+ ...typography.styles.button,
112
+ fontWeight: '600',
113
+ height: 20,
114
+ },
115
+ primaryTextEnabled: {
116
+ color: themeName === 'dark' ? colors.buttonTextColor : colors.background,
117
+ },
118
+ primaryTextDisabled: {
119
+ color: colors.background,
120
+ },
121
+ secondaryTextEnabled: {
122
+ color: colors.text,
123
+ },
124
+ secondaryTextDisabled: {
125
+ color: colors.textLight,
126
+ },
127
+ });
128
+
129
+ export default ActionButton;