자금ㅇㅣㅊㅔ api
This commit is contained in:
@@ -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 {
|
||||
ExtensionFundAccountBalanceParams,
|
||||
ExtensionFundAccountBalanceResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountBalance = (params: ExtensionFundAccountBalanceParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountBalanceResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountBalance(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountBalanceMutation = (options?: UseMutationOptions<ExtensionFundAccountBalanceResponse, CBDCAxiosError, ExtensionFundAccountBalanceParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountBalanceResponse, CBDCAxiosError, ExtensionFundAccountBalanceParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountBalanceParams) => extensionFundAccountBalance(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 {
|
||||
ExtensionFundAccountResultDetailParams,
|
||||
ExtensionFundAccountResultDetailResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountResultDetail = (params: ExtensionFundAccountResultDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountResultDetailResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountResultDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountResultDetailMutation = (options?: UseMutationOptions<ExtensionFundAccountResultDetailResponse, CBDCAxiosError, ExtensionFundAccountResultDetailParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountResultDetailResponse, CBDCAxiosError, ExtensionFundAccountResultDetailParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountResultDetailParams) => extensionFundAccountResultDetail(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 {
|
||||
ExtensionFundAccountResultExcelParams,
|
||||
ExtensionFundAccountResultExcelResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountResultExcel = (params: ExtensionFundAccountResultExcelParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountResultExcelResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountResultExcel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountResultExcelMutation = (options?: UseMutationOptions<ExtensionFundAccountResultExcelResponse, CBDCAxiosError, ExtensionFundAccountResultExcelParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountResultExcelResponse, CBDCAxiosError, ExtensionFundAccountResultExcelParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountResultExcelParams) => extensionFundAccountResultExcel(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 {
|
||||
ExtensionFundAccountResultListParams,
|
||||
ExtensionFundAccountResultListResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountResultList = (params: ExtensionFundAccountResultListParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountResultListResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountResultList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountResultListMutation = (options?: UseMutationOptions<ExtensionFundAccountResultListResponse, CBDCAxiosError, ExtensionFundAccountResultListParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountResultListResponse, CBDCAxiosError, ExtensionFundAccountResultListParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountResultListParams) => extensionFundAccountResultList(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 {
|
||||
ExtensionFundAccountResultSummaryParams,
|
||||
ExtensionFundAccountResultSummaryResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountResultSummary = (params: ExtensionFundAccountResultSummaryParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountResultSummaryResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountResultSummary(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountResultSummaryMutation = (options?: UseMutationOptions<ExtensionFundAccountResultSummaryResponse, CBDCAxiosError, ExtensionFundAccountResultSummaryParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountResultSummaryResponse, CBDCAxiosError, ExtensionFundAccountResultSummaryParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountResultSummaryParams) => extensionFundAccountResultSummary(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 {
|
||||
ExtensionFundAccountTransferDetailParams,
|
||||
ExtensionFundAccountTransferDetailResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountTransferDetail = (params: ExtensionFundAccountTransferDetailParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountTransferDetailResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountTransferDetail(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountTransferDetailMutation = (options?: UseMutationOptions<ExtensionFundAccountTransferDetailResponse, CBDCAxiosError, ExtensionFundAccountTransferDetailParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountTransferDetailResponse, CBDCAxiosError, ExtensionFundAccountTransferDetailParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountTransferDetailParams) => extensionFundAccountTransferDetail(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 {
|
||||
ExtensionFundAccountTransferExcelParams,
|
||||
ExtensionFundAccountTransferExcelResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountTransferExcel = (params: ExtensionFundAccountTransferExcelParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountTransferExcelResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountTransferExcel(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountTransferExcelMutation = (options?: UseMutationOptions<ExtensionFundAccountTransferExcelResponse, CBDCAxiosError, ExtensionFundAccountTransferExcelParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountTransferExcelResponse, CBDCAxiosError, ExtensionFundAccountTransferExcelParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountTransferExcelParams) => extensionFundAccountTransferExcel(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 {
|
||||
ExtensionFundAccountTransferListParams,
|
||||
ExtensionFundAccountTransferListResponse
|
||||
} from '../../model/fund-account/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const extensionFundAccountTransferList = (params: ExtensionFundAccountTransferListParams) => {
|
||||
return resultify(
|
||||
axios.post<ExtensionFundAccountTransferListResponse>(API_URL_ADDITIONAL_SERVICE.extensionFundAccountTransferList(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useExtensionFundAccountTransferListMutation = (options?: UseMutationOptions<ExtensionFundAccountTransferListResponse, CBDCAxiosError, ExtensionFundAccountTransferListParams>) => {
|
||||
const mutation = useMutation<ExtensionFundAccountTransferListResponse, CBDCAxiosError, ExtensionFundAccountTransferListParams>({
|
||||
...options,
|
||||
mutationFn: (params: ExtensionFundAccountTransferListParams) => extensionFundAccountTransferList(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user