import {apiClient} from "../../../../../api/apiClient.ts"; import type {PageResponse} from "../../../../../type/pageResponse.ts"; import type { AuthorFormItem, AuthorListItem, AuthorSearchParams, DeleteBatchAuthorRequest } from "../type/author.types.ts"; export async function fetchAuthorList(params: AuthorSearchParams) { return apiClient.get>(`/sec/ram/list.do`, params); } export async function fetchAuthorDetail(authorCode: string) { return apiClient.get(`/sec/ram/detail.do?authorCode=${authorCode}`); } export async function fetchCreateAuthor(params: AuthorFormItem) { return apiClient.post('/sec/ram/EgovAuthorInsert.do', params); } export async function fetchUpdateAuthor(params: AuthorFormItem) { return apiClient.post('/sec/ram/EgovAuthorUpdate.do', params); } export async function fetchDeleteAuthor(authorCode: string){ return apiClient.post(`/sec/ram/EgovAuthorDelete.do?authorCode=${authorCode}`); } export async function fetchDeleteBatchAuthor(params: DeleteBatchAuthorRequest[]) { return apiClient.post("/sec/ram/EgovAuthorDeleteBatch.do", params); }