import { BASE_URL } from "../core/env"; import { consoleLogger } from "../core/logger"; import { logAndReturnEmptyValueErrorResponse } from "./httpServiceUtils"; import { getJson } from "../clients/endpointClient"; export const getAppealsTypes = () => { return getJson(BASE_URL + "/api/endpoint/getappealtypes_api").catch( logAndReturnEmptyValueErrorResponse ); }; export const getProjectTypes = () => { return getJson(BASE_URL + "/api/endpoint/getprojecttypes_api").catch( logAndReturnEmptyValueErrorResponse ); }; export const getAppealsTypesForNewAppeal = () => { return getJson( BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api" ).catch(logAndReturnEmptyValueErrorResponse); }; export const getLPA = () => { return getJson(BASE_URL + "/api/endpoint/getlpa_api").catch( logAndReturnEmptyValueErrorResponse ); }; export const getFormData = (whichForm) => { return getJson( BASE_URL + "/api/endpoint/getformdata_api?whichForm=" + whichForm ).catch((error) => { consoleLogger(error); }); }; export const getMandatoryFields = (whichForm) => { return getJson( BASE_URL + "/api/endpoint/getmandatoryfields_api?whichForm=" + whichForm ).catch((error) => { consoleLogger(error); }); }; export const getPickLists = (whichForm) => { return getJson( BASE_URL + "/api/endpoint/getpicklists_api?whichForm=" + whichForm ).catch((error) => { consoleLogger(error); }); }; export const getNotice = () => { return getJson(BASE_URL + "/api/notices").catch((error) => { consoleLogger(error); }); };