mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 03:50:30 +00:00
fix: keep the audit follow-ups inside the domain boundaries
The field-to-column map of shared place details moves to @trek/shared, where places and place-contrib both read it without depending on each other, and the assistant reads a recorded call's arguments with a helper of its own instead of reaching into the AI providers. The catch-up's country from the address is taken back out: it made place-contrib depend on atlas, which already depends on it, and it waits for a shared country lookup both can use.
This commit is contained in:
@@ -19,6 +19,21 @@ export const PLACE_CONTRIB_FIELDS = ['website', 'phone', 'email', 'opening_hours
|
||||
export const placeContribFieldSchema = z.enum(PLACE_CONTRIB_FIELDS);
|
||||
export type PlaceContribField = z.infer<typeof placeContribFieldSchema>;
|
||||
|
||||
/**
|
||||
* The places column each field is stored in. The origin hash, the catch-up
|
||||
* and the sender all read a field through this one map: a value is shared
|
||||
* only while the column's hash matches the origin, so two copies drifting
|
||||
* apart would skip a field without a word.
|
||||
*/
|
||||
export const PLACE_CONTRIB_COLUMN = {
|
||||
website: 'website',
|
||||
phone: 'phone',
|
||||
email: 'email',
|
||||
opening_hours: 'opening_hours',
|
||||
description: 'description',
|
||||
image: 'image_url',
|
||||
} as const satisfies Record<PlaceContribField, string>;
|
||||
|
||||
/**
|
||||
* Where the current value of a field came from. Only `user` is ever shared, and
|
||||
* only while the stored hash still matches the value. The server decides
|
||||
|
||||
Reference in New Issue
Block a user