2026-01-09 17:06:04 +09:00
|
|
|
// lib/api/index.ts
|
|
|
|
|
// API 클라이언트 배럴 익스포트
|
|
|
|
|
|
|
|
|
|
export { ApiClient, withTokenRefresh } from './client';
|
|
|
|
|
export { serverFetch } from './fetch-wrapper';
|
|
|
|
|
export { AUTH_CONFIG } from './auth/auth-config';
|
|
|
|
|
|
2026-01-09 17:25:24 +09:00
|
|
|
// 공통 코드 유틸리티
|
|
|
|
|
export {
|
|
|
|
|
getCommonCodes,
|
|
|
|
|
getCommonCodeOptions,
|
|
|
|
|
getOrderStatusCodes,
|
|
|
|
|
getOrderStatusOptions,
|
|
|
|
|
getOrderTypeCodes,
|
|
|
|
|
getOrderTypeOptions,
|
|
|
|
|
getClientTypeCodes,
|
|
|
|
|
getClientTypeOptions,
|
|
|
|
|
getItemTypeCodes,
|
|
|
|
|
getItemTypeOptions,
|
|
|
|
|
type CommonCode,
|
|
|
|
|
} from './common-codes';
|
|
|
|
|
|
2026-01-09 17:06:04 +09:00
|
|
|
// Server-side API 클라이언트 인스턴스
|
|
|
|
|
// 서버 액션에서 사용
|
|
|
|
|
import { ApiClient } from './client';
|
|
|
|
|
import { AUTH_CONFIG } from './auth/auth-config';
|
|
|
|
|
|
|
|
|
|
export const apiClient = new ApiClient({
|
|
|
|
|
mode: 'api-key',
|
|
|
|
|
apiKey: process.env.API_KEY,
|
|
|
|
|
});
|