feat(shared): add Dawarich contracts

Zod schemas for the Dawarich integration: connection settings, the
suggestion list and its accept payloads, the recorded-track window and
the Atlas country/city proposals. Places gain an optional `source` so a
place that came out of a recording can say so.
This commit is contained in:
Maurice
2026-09-12 23:34:34 +02:00
parent b010305c0d
commit 906eef4349
3 changed files with 438 additions and 0 deletions
+6
View File
@@ -138,6 +138,12 @@ export const placeSchema = z.object({
// The Amap (高德) POI id a place was found by, `amap:`-prefixed. null for every
// place that came from another provider.
amap_poi_id: z.string().nullable().optional(),
/**
* Where the place came from when it was not typed by a person — currently
* only `'dawarich'`, for a stay accepted out of someone's own recordings.
* null on every place added by hand, which is nearly all of them.
*/
source: z.string().nullable().optional(),
route_geometry: z.string().nullable().optional(),
// Manual track colour (#776). null = inherit the category colour like before.
route_color: hexColorSchema.nullable().optional(),