const API_BASE_URL = '/api/v1' export interface ApiResponse { code: number msg: string payload: T | null } export interface DemoResponse { sleep_time_ms: number } export function callDemoApi(): Promise> { return fetch(`${API_BASE_URL}/demo`) .then((response) => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`) } return response.json() as Promise> }) }