56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import { client } from "@/shared/api";
|
|
import { ENDPOINT } from "@/shared/config";
|
|
|
|
import type {
|
|
AdstZoneResponseDto,
|
|
StAnlsMstListApiResponse,
|
|
StAnlsMstSearchParams,
|
|
StAnlsOutlierListResponse,
|
|
} from "../model/statistics-analysis/statistics-analysis-master-interface";
|
|
|
|
export class StAnlsMstApiService {
|
|
public async getAnalysisHistoryList(
|
|
params: StAnlsMstSearchParams,
|
|
): Promise<StAnlsMstListApiResponse> {
|
|
const response = await client.get<StAnlsMstListApiResponse>(
|
|
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST}`,
|
|
{
|
|
params,
|
|
},
|
|
);
|
|
|
|
return response.data;
|
|
}
|
|
|
|
public async getOutlierList(
|
|
anlsSn: number,
|
|
): Promise<StAnlsOutlierListResponse[]> {
|
|
const response = await client.get<StAnlsOutlierListResponse[]>(
|
|
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST}/outlierList/${anlsSn}`,
|
|
);
|
|
|
|
return response.data;
|
|
}
|
|
|
|
public async getSidoCombo(): Promise<AdstZoneResponseDto[]> {
|
|
const response = await client.get<AdstZoneResponseDto[]>(
|
|
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST}/sido`,
|
|
);
|
|
|
|
return response.data;
|
|
}
|
|
|
|
public async getSigunguCombo(
|
|
sidoCd: string,
|
|
): Promise<AdstZoneResponseDto[]> {
|
|
const response = await client.get<AdstZoneResponseDto[]>(
|
|
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST}/sigungu`,
|
|
{ params: { sidoCd } },
|
|
);
|
|
|
|
return response.data;
|
|
}
|
|
}
|
|
|
|
export const stAnlsMstApi = new StAnlsMstApiService();
|