mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 05:56:53 +00:00
8fd46c4c18
Small requests from the discussions, each built end to end: planner and map (cycling mode, date first headings, clear a day, stay times per day, off-route stops, map lock, compact unplanned markers, pending stays, cable car, transit quick picks), places (location filter, category from OSM, open in maps, geo: link, image from an attachment, enrichment on file import, places near a pin, place name language, Amap first in China), lists and costs (packed counter, inherited sharing, Markdown to-dos, payment notes, bookings CSV, my plan PDF), sharing (unplanned places, travel only, without photos), journey (photo zoom, drafts, photo order, trip suggestion, day jump), atlas (region counter, region bucket list, places per country), vacay half company holidays, studio copy and paste plus the book's own layouts, and RESTORE_FROM_BACKUP for a first start restore.
24 lines
958 B
TypeScript
24 lines
958 B
TypeScript
import { z } from 'zod';
|
|
|
|
/**
|
|
* Trip share-link API contract.
|
|
*
|
|
* Owner/members create a public read-only token for a trip under
|
|
* /api/trips/:tripId/share-link (gated by 'share_manage'); anyone can read the
|
|
* shared snapshot at /api/shared/:token (no auth). The per-section toggles
|
|
* default server-side (map/bookings on, packing/budget/collab off), so every
|
|
* field is optional here.
|
|
*/
|
|
export const shareLinkRequestSchema = z.object({
|
|
share_map: z.boolean().optional(),
|
|
share_bookings: z.boolean().optional(),
|
|
share_packing: z.boolean().optional(),
|
|
share_budget: z.boolean().optional(),
|
|
share_collab: z.boolean().optional(),
|
|
// Narrow the itinerary to transport and stays (#1712): no activities, no day notes.
|
|
share_travel_only: z.boolean().optional(),
|
|
// Leave the place photos out of the shared page (#1712).
|
|
share_hide_images: z.boolean().optional(),
|
|
});
|
|
export type ShareLinkRequest = z.infer<typeof shareLinkRequestSchema>;
|