Add mobile services, web proxy, and Gemma4 agent loop
- Mobile: add push notification and calendar sync services with full test suite (calendar, eventStore, notifications, screens) - Mobile: add EAS build config and Jest setup - Web: add API proxy, update useDestinationStation/useJourneys hooks, add middleware tests - Web: update next.config and rebuild - Agent: add Gemma4-based agent loop (agent_base, ttl_agent, ts_agent) - Docs: add privacy policy, post-MVP plan, and aider rules
This commit is contained in:
@@ -74,6 +74,20 @@ export class ApiClient {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an arbitrary HAFAS protocol body to the /api/hafas endpoint.
|
||||
* This handles TripSearch, LocMatch, and any other HAFAS methods.
|
||||
*/
|
||||
async hafasRequest<T = Record<string, unknown>>(body: unknown): Promise<T> {
|
||||
const res = await fetch(`${this.baseUrl}/api/hafas`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
if (!res.ok) throw new Error(`HAFAS request failed: ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async searchJourneys(
|
||||
fromStationExtId: string,
|
||||
toStationExtId: string,
|
||||
|
||||
Reference in New Issue
Block a user