[st] feat: H-B 통계 검증 페이지 API 연결 작업

This commit is contained in:
2026-03-04 15:13:07 +09:00
parent ff5b43e1d2
commit fe3e6de085
6 changed files with 582 additions and 365 deletions
@@ -0,0 +1,41 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type {
AnalysisRequestPayload,
AnalysisResponseDto,
JobStatusDto,
AnalysisResultDto,
} from "../model/analysis-interface";
export class AnalysisApiService {
public async analyze(
payload: AnalysisRequestPayload,
): Promise<AnalysisResponseDto> {
const response = await client.post<AnalysisResponseDto>(
`${ENDPOINT.STATVERIFY_SERVICE.ANALYSIS}/analyze`,
payload,
);
return response.data;
}
public async getJobStatus(jobId: string): Promise<JobStatusDto> {
const response = await client.get<JobStatusDto>(
`${ENDPOINT.STATVERIFY_SERVICE.ANALYSIS}/status/${jobId}`,
);
return response.data;
}
public async getResult(jobId: string): Promise<AnalysisResultDto> {
const response = await client.get<AnalysisResultDto>(
`${ENDPOINT.STATVERIFY_SERVICE.ANALYSIS}/result/${jobId}`,
);
return response.data;
}
}
export const analysisApi = new AnalysisApiService();
@@ -0,0 +1,36 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type {
StAnlsMstListApiResponse,
StAnlsMstSearchParams,
StAnlsOutlierListResponse,
} from "../model/analysis-history-interface";
export class AnalysisHistoryApiService {
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;
}
}
export const analysisHistoryApi = new AnalysisHistoryApiService();