import { client } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { PageableList, PageableParams } from "@/shared/model"; export interface ZipSearchParams extends PageableParams { zoneNo?: string; // 구역번호 ctpvNm?: string; // 시도명 sggNm?: string; // 시군구명 emdNm?: string; // 읍면동명 roadNm?: string; // 도로명 stdgNm?: string; // 법정동명 dongNm?: string; // 행정동명 lotnoMno?: number | null; // 지번본번 lotnoSno?: number | null; // 지번부번 } export interface Zip { zipId: number; zoneNo: string; ctpvNm: string; sggNm: string; emdNm: string; roadNm: string; lotnoMno: number; lotnoSno: number; lotno: string; zipAddr: string; } type ZipList = PageableList; export class ZipApiService { public async searchZip(params: ZipSearchParams): Promise { const response = await client.get(`${ENDPOINT.CMS_SERVICE.ZIPS}`, { params, }); return response.data; } } export const ZipApi = new ZipApiService();