NTP-12177 | Seggregation of Unified API (#1010)

This commit is contained in:
Aman Chaturvedi
2024-11-18 16:48:39 +05:30
committed by GitHub
17 changed files with 216 additions and 270 deletions

View File

@@ -106,6 +106,11 @@ export enum ApiKeys {
GET_SIGNED_URL_V2 = 'GET_SIGNED_URL_V2',
GET_SIGNED_URL_FOR_REPORTEE_V2 = 'GET_SIGNED_URL_FOR_REPORTEE_V2',
ALL_ESCALATIONS = 'ALL_ESCALATIONS',
GET_UNGROUPED_ADDRESSES = 'GET_UNGROUPED_ADDRESSES',
GET_GROUPED_ADDRESSES_AND_GEOLOCATIONS = 'GET_GROUPED_ADDRESSES',
GET_EMI_SCHEDULE = 'GET_EMI_SCHEDULE',
GET_REPAYMENTS = 'GET_REPAYMENTS',
GET_FEEDBACK_HISTORY = 'GET_FEEDBACK_HISTORY',
}
export const API_URLS: Record<ApiKeys, string> = {} as Record<ApiKeys, string>;
@@ -203,6 +208,13 @@ API_URLS[ApiKeys.SEND_COMMUNICATION_NAVI_ACCOUNT] = '/navi-communications/{loanA
API_URLS[ApiKeys.GENERATE_DYNAMIC_DOCUMENT] = '/documents/generate/{loanAccountNumber}';
API_URLS[ApiKeys.ALL_ESCALATIONS] = '/customer-escalation';
API_URLS[ApiKeys.DOWNLOAD_LATEST_APP] = 'https://longhorn.navi.com/api/app/download';
API_URLS[ApiKeys.GET_UNGROUPED_ADDRESSES] =
'/collection-cases/{loanAccountNumber}/ungrouped/addresses';
API_URLS[ApiKeys.GET_GROUPED_ADDRESSES_AND_GEOLOCATIONS] =
'/collection-cases/{loanAccountNumber}/grouped/addresses-geo-locations';
API_URLS[ApiKeys.GET_EMI_SCHEDULE] = '/collection-cases/{loanAccountNumber}/emiSchedule';
API_URLS[ApiKeys.GET_REPAYMENTS] = '/collection-cases/{loanAccountNumber}/repayments';
API_URLS[ApiKeys.GET_FEEDBACK_HISTORY] = '/feedback/filters';
export const API_STATUS_CODE = {
OK: 200,
@@ -262,7 +274,7 @@ axiosInstance.interceptors.request.use((request) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
request.retry = request?.retry < 4 ? request.retry : 3;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
request.delay = request?.delay > 2000 ? request.delay : 2000;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment