[st] feat: 입력 - 제출 시 imr 요청 및 상태 확인, 진행 progress bar 추가
This commit is contained in:
@@ -24,9 +24,11 @@ import {
|
||||
type StatisticsService,
|
||||
type SubmitExceptionRequest,
|
||||
type SubmitExceptionResponse,
|
||||
type ImrResponse,
|
||||
type ImrStatusResponse,
|
||||
} from "../model/statistics-interface";
|
||||
|
||||
export class StatisticsAPiService implements StatisticsService {
|
||||
export class StatisticsApiService implements StatisticsService {
|
||||
public async getSidoList(params?: {
|
||||
instSeCd?: string;
|
||||
}): Promise<ApiResponse<SearchCondition>> {
|
||||
@@ -70,14 +72,21 @@ export class StatisticsAPiService implements StatisticsService {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async callImrService(param: ImrRequest): Promise<null> {
|
||||
const response = await client.post<null>(
|
||||
public async callImrService(param: ImrRequest): Promise<ImrResponse> {
|
||||
const response = await client.post<ImrResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getImrStatus(param: string): Promise<ImrStatusResponse> {
|
||||
const response = await client.get<ImrStatusResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}/status/${param}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// 예외 제출
|
||||
public async submitException(
|
||||
param: SubmitExceptionRequest,
|
||||
@@ -157,4 +166,4 @@ export class StatisticsAPiService implements StatisticsService {
|
||||
}
|
||||
}
|
||||
|
||||
export const statisticsAPi = new StatisticsAPiService();
|
||||
export const statisticsApi = new StatisticsApiService();
|
||||
|
||||
Reference in New Issue
Block a user