Files
TREK/shared/src/assistant/cards/tour.contract.ts
T
Maurice cd60d4d859 feat(tours): assistant takes found places into saved tours and route files from the chat
P6: insert_tour_stop and remove_tour_stop take a place into a saved hike or
city walk as one stop and out again, each the other's undo, with change
cards in the chat. The planner's insertion rule (poiInsertion) moved to
shared so the planner and the server place a stop the same way. "+ Tour" on
a found place holds it as a stop of the saved tour open in the planner.

P7: GPX, KML and KMZ files attached in the chat are read into their tracks
and each is held as a change that takes it in as a hike through
import_tour_gpx, undoable per track; the GPX text stays on the held call.
2026-10-23 22:00:05 +02:00

46 lines
1.7 KiB
TypeScript

import { tourListCardSchema } from './tour-list.card';
import { tourRouteCardSchema } from './tour-route.card';
export * from './tour-list.card';
export * from './tour-route.card';
/**
* What the tours bring to the assistant chat: the kinds of card they draw,
* the verbs of their change cards and what an applied change of theirs
* touches, beyond the core ones. cards/index.ts and assistant.schema.ts
* spread these into the card union and the shared enums, so a new kind, verb
* or entity is added here and nowhere else.
*/
export const TOUR_CARD_SCHEMAS = [tourRouteCardSchema, tourListCardSchema] as const;
/** addTour, updateTour and importTour sit in the core list already. */
/** A station of a city walk checked off on its day: visited, skipped, or the mark taken back. */
export const TOUR_VERB_KEYS = [
'markVisited',
'markSkipped',
'markPlanned',
// A recorded track put on a tour as the way it was done, or taken off it.
'assignTrack',
'unassignTrack',
// A tour left out of the user's activity sums, or counted again.
'excludeTour',
'countTour',
// A tour pointed at its trip's packing list, or let go of it.
'linkPacking',
'unlinkPacking',
// A saved tour turned round or taken back to its start, copied, or its line drawn in another colour.
'reverseTour',
'closeLoop',
'copyTour',
'setRouteColor',
// The writes of a ski or paddle tour of its own, and a planned import taken back to its recording.
'classifySki',
'setPaddlePlan',
'decideObstacles',
'restoreTrack',
// A found place taken into a saved tour as a stop, or taken out again (P6).
'addTourStop',
'removeTourStop',
] as const;
/** 'tour' is a core entity already. */
export const TOUR_APPLIED_ENTITIES = [] as const;