- 부가서비스 : 링크결제_발송내역 List 목업데이터 API 연동

This commit is contained in:
HyeonJongKim
2025-09-18 18:14:26 +09:00
parent 92dad13d0f
commit 93b38d3f42
10 changed files with 215 additions and 105 deletions

View File

@@ -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 {
ExtensionKeyinListParams,
ExtensionKeyinListResponse,
ExtensionLinkPayHistoryListParams,
ExtensionLinkPayHistoryListResponse
} from '../model/types';
import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
export const extensionLinkPayHistoryListParam = (params: ExtensionLinkPayHistoryListParams) => {
return resultify(
axios.post<ExtensionLinkPayHistoryListResponse>(API_URL_ADDITIONAL_SERVICE.extensionLinkPaymentHistoryList(), params),
);
};
export const useExtensionLinkPayHistoryListMutation = (options?: UseMutationOptions<ExtensionLinkPayHistoryListResponse, CBDCAxiosError, ExtensionLinkPayHistoryListParams>) => {
const mutation = useMutation<ExtensionLinkPayHistoryListResponse, CBDCAxiosError, ExtensionLinkPayHistoryListParams>({
...options,
mutationFn: (params: ExtensionLinkPayHistoryListParams) => extensionLinkPayHistoryListParam(params),
});
return {
...mutation,
};
};