import {apiClient} from "../../../../api/apiClient.ts"; import type { AuthorRoleListItem, AuthorGroupSearchParams, AuthorListItem, AuthorRoleMenuSearchParams, AuthorRoleSearchParams, AuthorSearchParams, RoleSearchParams, UpdateAuthorRoleParams, RoleDetailResponse } from "../type/role.types.ts"; import type {PageResponse} from "../../../../type/pageResponse.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 fetchAuthorRoleList(params: AuthorRoleSearchParams) { return apiClient.get>(`/sec/ram/authorList.do`, params); } // 권한별메뉴관리 export async function fetchAuthorRoleMenuList(params: AuthorRoleMenuSearchParams) { return apiClient.get(`/sym/mnu/mcm/list.do`, params); } export async function fetchAuthorRoleMenuDetail(authorCode: string) { return apiClient.get(`/sym/mnu/mcm/detail?authorCode=${authorCode}`); } // 관리자별권한관리 export async function fetchAuthorGroupList(params: AuthorGroupSearchParams) { return apiClient.get(`/sec/rgm/list.do`, params); } // 롤관리 export async function fetchRoleList(params: RoleSearchParams) { return apiClient.get(`/sec/rmt/list.do`, params); } export async function fetchRoleDetail(roleCode: string) { return apiClient.get(`/sec/rmt/detail.do?roleCode=${roleCode}`); } export async function updateAuthorRole(params: UpdateAuthorRoleParams) { return apiClient.post(`/sec/ram/updateAuthorRole.do?authorCode=${params.authorCode}&roleCode=${params.roleCode}®Yn=${params.regYn}`); }