import axios from "axios"; import { ENDPOINT } from "@/shared/config"; import { type StatisticsInputService, type SewerageSupplyRateRequestParams, type SewerageSupplyRateApiResponse, type CheckInputPeriodResponse, type SewerageSupplyRateSaveRequest, type SewerageSupplyRateSaveApiResponse, } from "../model/statistics-input-interface"; export class StatisticsInputAPiService implements StatisticsInputService { public async getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise { const response = await axios.get ( `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`, { params: params } ); return response.data; } public async checkInputPeriod(params: string): Promise { const response = await axios.get ( `${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?year=${params}`, ); return response.data; } public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise { const response = await axios.post ( `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`, params ); return response.data; } } export const statisticsInputAPi = new StatisticsInputAPiService();