Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

504 B
Raw Blame
import { z } from 'zod';

/**
 * Generic pagination query helper. Individual endpoints opt in by extending
 * this; it is NOT applied globally (many TREK list endpoints return full sets).
 * Defaults are conservative and only used where a route already paginates.
 */
export const paginationQuerySchema = z.object({
  page: z.coerce.number().int().min(1).default(1),
  perPage: z.coerce.number().int().min(1).max(200).default(50),
});
export type PaginationQuery = z.infer<typeof paginationQuerySchema>;