// API Configuration export const API_CONFIG = { BASE_URL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000', TIMEOUT: 30000, // 30 seconds RETRY_ATTEMPTS: 1, // API Endpoints ENDPOINTS: { AUTH: { LOGIN: '/api/v1/auth/login', REGISTER: '/api/v1/auth/register', LOGOUT: '/api/v1/auth/logout', REFRESH: '/api/v1/auth/refresh', ME: '/api/v1/auth/me', PROVIDERS: '/api/v1/auth/providers', OAUTH_AUTHORIZE: (provider: string) => `/api/v1/auth/${provider}/authorize`, OAUTH_CALLBACK: (provider: string) => `/api/v1/auth/${provider}/callback`, EXCHANGE_OAUTH_TOKEN: '/api/v1/auth/exchange-oauth-token', }, SOUNDS: { LIST: '/api/v1/sounds', CREATE: '/api/v1/sounds', GET: (id: string | number) => `/api/v1/sounds/${id}`, UPDATE: (id: string | number) => `/api/v1/sounds/${id}`, DELETE: (id: string | number) => `/api/v1/sounds/${id}`, UPLOAD: '/api/v1/sounds/upload', }, PLAYLISTS: { LIST: '/api/v1/playlists', CREATE: '/api/v1/playlists', GET: (id: string | number) => `/api/v1/playlists/${id}`, UPDATE: (id: string | number) => `/api/v1/playlists/${id}`, DELETE: (id: string | number) => `/api/v1/playlists/${id}`, }, USERS: { LIST: '/api/v1/users', GET: (id: string | number) => `/api/v1/users/${id}`, UPDATE: (id: string | number) => `/api/v1/users/${id}`, DELETE: (id: string | number) => `/api/v1/users/${id}`, }, }, } as const export type ApiEndpoints = typeof API_CONFIG.ENDPOINTS