import { getJson, postJson } from './client'; export type RestaurantAdminConfigResponse = { contextId: string; summary: string; }; export type SetServiceWindowRequest = { contextId: string; day: number; openAt: string; closeAt: string; updatedBy: string; }; export type SetServiceWindowResponse = { contextId: string; applied: boolean; message: string; }; export async function loadDashboard(contextId: string): Promise { return getJson(`/api/restaurant/admin/config?contextId=${encodeURIComponent(contextId)}`); } export async function setServiceWindow(request: SetServiceWindowRequest): Promise { return postJson('/api/restaurant/admin/service-window', request); }