import { client } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { Code, CodeService } from "../model/code-interface"; async function getList(upCd: string): Promise { const response = await client.get(`${ENDPOINT.CMS_SERVICE.CODE}/${upCd}`); return response.data; } async function getListByUseYn(upCd: string, useYn: string): Promise { const response = await client.get(`${ENDPOINT.CMS_SERVICE.CODE}/${upCd}/${useYn}`); return response.data; } async function getCodeName(upCd: string, lwpoCd: string): Promise { const response = await client.get( `${ENDPOINT.CMS_SERVICE.CODE}/${upCd}/lwpoCd/${lwpoCd}`, ); return response.data; } export const codeService = { getList, getListByUseYn, getCodeName, } satisfies CodeService;