부가서비스
- 링크결제 발송내역/발송대기 엑셀다운로드 API 연결 - 링크결제 발송대기 상세 페이지 목업 API 연결 - 링크결제 발송대기 삭제 API 연결
This commit is contained in:
@@ -23,7 +23,7 @@ export const extensionLinkPayHistoryDetail = async (params: ExtensionLinkPayHist
|
||||
titleInfo: {
|
||||
amount: response.amount,
|
||||
corpName: response.corpName,
|
||||
requestDate: response.paymentDate
|
||||
requestDate: response.sendDate
|
||||
} as TitleInfo,
|
||||
paymentInfo: {
|
||||
buyerName: response.buyerName,
|
||||
@@ -38,6 +38,7 @@ export const extensionLinkPayHistoryDetail = async (params: ExtensionLinkPayHist
|
||||
detailInfo: {
|
||||
email: response.email,
|
||||
phoneNumber: response.phoneNumber,
|
||||
goodsName: response.goodsName,
|
||||
moid: response.moid
|
||||
} as DetailInfo
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-service';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionLinkPayHistoryDownloadExcelRespone,
|
||||
ExtensionLinkPayHistoryDownloadExcelParams
|
||||
} from '../../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionLinkPayHistoryDownloadExcel = (params: ExtensionLinkPayHistoryDownloadExcelParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionLinkPayHistoryDownloadExcelRespone>(API_URL_ADDITIONAL_SERVICE.extensionLinkPaymentHistoryDownloadExcel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionLinkPayHistoryDownloadExcelMutation = (options?: UseMutationOptions<ExtensionLinkPayHistoryDownloadExcelRespone, CBDCAxiosError, ExtensionLinkPayHistoryDownloadExcelParams>) => {
|
||||
const mutation = useMutation<ExtensionLinkPayHistoryDownloadExcelRespone, CBDCAxiosError, ExtensionLinkPayHistoryDownloadExcelParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionLinkPayHistoryDownloadExcelParams) => extensionLinkPayHistoryDownloadExcel(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-service';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionLinkPayWaitDeleteRespone
|
||||
} from '../../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { ExtensionLinkPayWaitDeleteParams } from '../../model/types';
|
||||
|
||||
export const extensionLinkPayWaitDelete = async (params: ExtensionLinkPayWaitDeleteParams)=> {
|
||||
return resultify(
|
||||
axios.post<ExtensionLinkPayWaitDeleteRespone>(API_URL_ADDITIONAL_SERVICE.extensionLinkPayMentWaitDelete(), params)
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionLinkPayWaitDeleteMutation = (options?: UseMutationOptions<ExtensionLinkPayWaitDeleteRespone, CBDCAxiosError, ExtensionLinkPayWaitDeleteParams>) => {
|
||||
const mutation = useMutation<ExtensionLinkPayWaitDeleteRespone, CBDCAxiosError, ExtensionLinkPayWaitDeleteParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionLinkPayWaitDeleteParams) => extensionLinkPayWaitDelete(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
import axios from 'axios';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-service';
|
||||
import {
|
||||
DetailResponse,
|
||||
TitleInfo,
|
||||
PaymentInfo,
|
||||
ExtensionLinkPayWaitDetailParams,
|
||||
ExtensionLinkPayWaitDetailResponse
|
||||
} from '../../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionLinkPayWaitDetail = async (params: ExtensionLinkPayWaitDetailParams): Promise<DetailResponse> => {
|
||||
const response = await resultify(
|
||||
axios.post<ExtensionLinkPayWaitDetailResponse>(API_URL_ADDITIONAL_SERVICE.extensionLinkPaymentWaitDetail(), params),
|
||||
);
|
||||
|
||||
const detailResponse: DetailResponse = {
|
||||
titleInfo: {
|
||||
amount: response.amount,
|
||||
corpName: response.corpName,
|
||||
scheduledSendDate: response.scheduledSendDate
|
||||
} as TitleInfo,
|
||||
|
||||
paymentInfo: {
|
||||
processStatus: response.processStatus,
|
||||
requestDate: response.requestDate,
|
||||
paymentLimitDate: response.paymentLimitDate,
|
||||
sendMethod: response.sendMethod,
|
||||
buyerName: response.buyerName,
|
||||
email: response.email,
|
||||
phoneNumber: response.phoneNumber,
|
||||
goodsName: response.goodsName,
|
||||
moid: response.moid
|
||||
} as PaymentInfo
|
||||
}
|
||||
|
||||
return detailResponse
|
||||
}
|
||||
|
||||
export const useExtensionLinkPayWaitDetailMutation = (options?: UseMutationOptions<DetailResponse, CBDCAxiosError, ExtensionLinkPayWaitDetailParams>) => {
|
||||
const mutation = useMutation<DetailResponse, CBDCAxiosError, ExtensionLinkPayWaitDetailParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionLinkPayWaitDetailParams) => extensionLinkPayWaitDetail(params),
|
||||
});
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-service';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionLinkPayHistoryDownloadExcelRespone,
|
||||
ExtensionLinkPayHistoryDownloadExcelParams,
|
||||
ExtensionLinkPayWaitDownloadExcelParams,
|
||||
ExtensionLinkPayWaitDownloadExcelRespone
|
||||
} from '../../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionLinkPayWaitDownloadExcel = (params: ExtensionLinkPayWaitDownloadExcelParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionLinkPayWaitDownloadExcelRespone>(API_URL_ADDITIONAL_SERVICE.extensionLinkPaymentHistoryDownloadExcel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionLinkPayWaitDownloadExcelMutation = (options?: UseMutationOptions<ExtensionLinkPayWaitDownloadExcelRespone, CBDCAxiosError, ExtensionLinkPayWaitDownloadExcelParams>) => {
|
||||
const mutation = useMutation<ExtensionLinkPayWaitDownloadExcelRespone, CBDCAxiosError, ExtensionLinkPayWaitDownloadExcelParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionLinkPayWaitDownloadExcelParams) => extensionLinkPayWaitDownloadExcel(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -3,10 +3,6 @@ import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-serv
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionKeyinListParams,
|
||||
ExtensionKeyinListResponse,
|
||||
ExtensionLinkPayHistoryListParams,
|
||||
ExtensionLinkPayHistoryListResponse,
|
||||
ExtensionLinkPayWaitListParams,
|
||||
ExtensionLinkPayWaitListResponse
|
||||
} from '../../model/types';
|
||||
|
||||
Reference in New Issue
Block a user