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 { ExtensionFundAccountDownloadReceiptParams as ExtensionFundAccountDownloadReceiptParams, ExtensionFundAccountDownloadReceiptResponse as ExtensionFundAccountDownloadReceiptResponse } from '../../model/fund-account/types'; import { useMutation, UseMutationOptions } from '@tanstack/react-query'; export const extensionFundAccountDownloadReceipt = (params: ExtensionFundAccountDownloadReceiptParams) => { return resultify( axios.post(API_URL_ADDITIONAL_SERVICE.extensionFundAccountDownloadReceipt(), params), ); }; export const useExtensionFundAccountDownloadReceiptMutation = (options?: UseMutationOptions) => { const mutation = useMutation({ ...options, mutationFn: (params: ExtensionFundAccountDownloadReceiptParams) => extensionFundAccountDownloadReceipt(params), }); return { ...mutation, }; };