정산조회 - 정산내역 리스트 및 상세
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL } from '@/shared/api/urls';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementListParams,
|
||||
SettlementListResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementList = (params: SettlementListParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementListResponse>(API_URL.settlementList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementListMutation = (options?: UseMutationOptions<SettlementListResponse, CBDCAxiosError, SettlementListParams>) => {
|
||||
const mutation = useMutation<SettlementListResponse, CBDCAxiosError, SettlementListParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementListParams) => settlementList(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsCalendarParams,
|
||||
SettlementsCalendarResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsCalendar = (params: SettlementsCalendarParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsCalendarResponse>(API_URL_SETTLEMENT.settlementsCalendar(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsCalendarMutation = (options?: UseMutationOptions<SettlementsCalendarResponse, CBDCAxiosError, SettlementsCalendarParams>) => {
|
||||
const mutation = useMutation<SettlementsCalendarResponse, CBDCAxiosError, SettlementsCalendarParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsCalendarParams) => settlementsCalendar(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsHistoryDetailParams,
|
||||
SettlementsHistoryDetailResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsHistoryDetail = (params: SettlementsHistoryDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsHistoryDetailResponse>(API_URL_SETTLEMENT.settlementsHistoryDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsHistoryDetailMutation = (options?: UseMutationOptions<SettlementsHistoryDetailResponse, CBDCAxiosError, SettlementsHistoryDetailParams>) => {
|
||||
const mutation = useMutation<SettlementsHistoryDetailResponse, CBDCAxiosError, SettlementsHistoryDetailParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsHistoryDetailParams) => settlementsHistoryDetail(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsHistoryParams,
|
||||
SettlementsHistoryResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsHistory = (params: SettlementsHistoryParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsHistoryResponse>(API_URL_SETTLEMENT.settlementsHistory(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsHistoryMutation = (options?: UseMutationOptions<SettlementsHistoryResponse, CBDCAxiosError, SettlementsHistoryParams>) => {
|
||||
const mutation = useMutation<SettlementsHistoryResponse, CBDCAxiosError, SettlementsHistoryParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsHistoryParams) => settlementsHistory(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsHistorySummaryParams,
|
||||
SettlementsHistorySummaryResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsHistorySummary = (params: SettlementsHistorySummaryParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsHistorySummaryResponse>(API_URL_SETTLEMENT.settlementsHistorySummary(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsHistorySummaryMutation = (options?: UseMutationOptions<SettlementsHistorySummaryResponse, CBDCAxiosError, SettlementsHistorySummaryParams>) => {
|
||||
const mutation = useMutation<SettlementsHistorySummaryResponse, CBDCAxiosError, SettlementsHistorySummaryParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsHistorySummaryParams) => settlementsHistorySummary(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsTransactionDetailParams,
|
||||
SettlementsTransactionDetailResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsTransactionDetail = (params: SettlementsTransactionDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsTransactionDetailResponse>(API_URL_SETTLEMENT.settlementsTransactionDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsTransactionDetailMutation = (options?: UseMutationOptions<SettlementsTransactionDetailResponse, CBDCAxiosError, SettlementsTransactionDetailParams>) => {
|
||||
const mutation = useMutation<SettlementsTransactionDetailResponse, CBDCAxiosError, SettlementsTransactionDetailParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsTransactionDetailParams) => settlementsTransactionDetail(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsTransactionListParams,
|
||||
SettlementsTransactionListResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsTransactionList = (params: SettlementsTransactionListParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsTransactionListResponse>(API_URL_SETTLEMENT.settlementsTransactionList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsTransactionListMutation = (options?: UseMutationOptions<SettlementsTransactionListResponse, CBDCAxiosError, SettlementsTransactionListParams>) => {
|
||||
const mutation = useMutation<SettlementsTransactionListResponse, CBDCAxiosError, SettlementsTransactionListParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsTransactionListParams) => settlementsTransactionList(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_SETTLEMENT } from '@/shared/api/api-url-settlement';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
SettlementsTransactionSummaryParams,
|
||||
SettlementsTransactionSummaryResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const settlementsTransactionSummary = (params: SettlementsTransactionSummaryParams) => {
|
||||
return resultify(
|
||||
axios.post<SettlementsTransactionSummaryResponse>(API_URL_SETTLEMENT.settlementsTransactionSummary(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useSettlementsTransactionSummaryMutation = (options?: UseMutationOptions<SettlementsTransactionSummaryResponse, CBDCAxiosError, SettlementsTransactionSummaryParams>) => {
|
||||
const mutation = useMutation<SettlementsTransactionSummaryResponse, CBDCAxiosError, SettlementsTransactionSummaryParams>({
|
||||
...options,
|
||||
mutationFn: (params: SettlementsTransactionSummaryParams) => settlementsTransactionSummary(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user