[st] feat: IMR 서비스 추가
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
ImrDetailRequest,
|
||||
ImrDetailResponse,
|
||||
ImrDetectRequest,
|
||||
ImrDetectResponse,
|
||||
ImrListRequest,
|
||||
ImrListResponse,
|
||||
ImrLogRequest,
|
||||
ImrLogResponse,
|
||||
} from "../model/imr-interface";
|
||||
|
||||
export class ImrApiService {
|
||||
/**
|
||||
* 이상치 탐지 알고리즘 실행 요청
|
||||
*/
|
||||
public async detectOutliers(
|
||||
payload: ImrDetectRequest,
|
||||
): Promise<ImrDetectResponse> {
|
||||
const response = await client.post<ImrDetectResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}`,
|
||||
payload,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이상치 탐지 마스터 목록 조회
|
||||
*/
|
||||
public async getOutliersList(
|
||||
payload: ImrListRequest,
|
||||
): Promise<ImrListResponse[]> {
|
||||
const response = await client.post<ImrListResponse[]>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}/list`,
|
||||
payload,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이상치 탐지 상세 조회
|
||||
*/
|
||||
public async getOutliersDetail(
|
||||
payload: ImrDetailRequest,
|
||||
): Promise<ImrDetailResponse> {
|
||||
const response = await client.post<ImrDetailResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}/list/detail`,
|
||||
payload,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이상치 산출 로그 조회
|
||||
*/
|
||||
public async getOutliersLog(
|
||||
payload: ImrLogRequest,
|
||||
): Promise<ImrLogResponse> {
|
||||
const response = await client.post<ImrLogResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}/list/detail/log`,
|
||||
payload,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const imrApi = new ImrApiService();
|
||||
@@ -21,6 +21,20 @@ export class StAnlsRsltApiService {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getImrResultList(
|
||||
anlsSn: number,
|
||||
params: { page?: number; size?: number },
|
||||
): Promise<StAnlsRsltListApiResponse> {
|
||||
const response = await client.get<StAnlsRsltListApiResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT}/imr/rsltlist/${anlsSn}`,
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getChartData(
|
||||
anlsSn: number,
|
||||
vrfcTrgtSn: number,
|
||||
|
||||
Reference in New Issue
Block a user