mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Add the opt-in Environment module (default off), its Settings surface (home location search, travel overrides, backfill, with Open-Meteo attribution), the gated API routes (overview, home, geocode, travel CRUD, backfill), the nightly pg-boss fetch job with a lookback window plus on-demand backfill, the query keys, six-locale strings, and the regenerated OpenAPI. The module performs an outbound weather fetch tied to a coarse location, so it ships dark and the user turns it on deliberately; off means no job, no row, no egress.
17 lines
685 B
TypeScript
17 lines
685 B
TypeScript
/**
|
|
* Query keys — environmental-context module (v1.25, W-ENV). The overview
|
|
* (home + travel overrides + stored-day summary) and the geocoding search.
|
|
* Part of the centralized factory; aggregated in `./index.ts`.
|
|
*/
|
|
export const environmentKeys = {
|
|
/**
|
|
* `environment()` is the root prefix every environment write (set home, add /
|
|
* remove a travel override, trigger a backfill) invalidates through, so the
|
|
* settings surface repaints in lockstep.
|
|
*/
|
|
environment: () => ["environment"] as const,
|
|
/** Geocoding search results for a query string (cached per query). */
|
|
environmentGeocode: (query: string) =>
|
|
["environment", "geocode", query] as const,
|
|
};
|