첫 커밋

This commit is contained in:
focp212@naver.com
2025-09-05 15:36:48 +09:00
commit 05238b04c1
825 changed files with 176358 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import axios from 'axios';
import { API_URL } from '@/shared/api/urls';
import { resultify } from '@/shared/lib/resultify';
import { CBDCAxiosError } from '@/shared/@types/error';
import {
CodesListByCodeClParams,
CodesListByCodeClResponse
} from '../model/types';
import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
export const codesListByCodeCl = ({ codeCl }: CodesListByCodeClParams) => {
return resultify(
axios.get<CodesListByCodeClResponse>(API_URL.codesListByCodeCl(codeCl)),
);
};
export const useCodesListByCodeClMutation = (options?: UseMutationOptions<CodesListByCodeClResponse, CBDCAxiosError, CodesListByCodeClParams>) => {
const mutation = useMutation<CodesListByCodeClResponse, CBDCAxiosError, CodesListByCodeClParams>({
...options,
mutationFn: ({
codeCl
}: CodesListByCodeClParams) => codesListByCodeCl({
codeCl
}),
});
return {
...mutation,
};
};