-부가서비스 : 링크결제 - 발송내역 리스트 목업 API 연동
This commit is contained in:
@@ -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,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
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,
|
||||
ExtensionLinkPayWaitListParams,
|
||||
ExtensionLinkPayWaitListResponse
|
||||
} from '../../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionLinkPayWaitListParam = (params: ExtensionLinkPayWaitListParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionLinkPayWaitListResponse>(API_URL_ADDITIONAL_SERVICE.extensionLinkPaymentWaitList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionLinkPayWaitListMutation = (options?: UseMutationOptions<ExtensionLinkPayWaitListResponse, CBDCAxiosError, ExtensionLinkPayWaitListParams>) => {
|
||||
const mutation = useMutation<ExtensionLinkPayWaitListResponse, CBDCAxiosError, ExtensionLinkPayWaitListParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionLinkPayWaitListParams) => extensionLinkPayWaitListParam(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user