import { getConfigValue } from '@brojs/cli'; import { Order } from '../models/landing'; enum LandingEndpoints { ORDER_VIEW = '/order' } const LandingService = () => { const endpoint = getConfigValue('dry-wash.api'); const fetchOrder = async (orderId: Order.Id) => { const response = await fetch(`${endpoint}${LandingEndpoints.ORDER_VIEW}/${orderId}`); if (!response.ok) { throw new Error(`Failed to fetch order: ${response.status}`); } return await response.json(); }; return { fetchOrder }; }; export { LandingService, LandingEndpoints };