SPB Git forge

spb/cancerindex

Public
37commits 1branches 0releases
2.9 MBsize
maindefault branch
10 days agolast push
TypeScript 97.2% SQL 1.5% CSS 0.6% JavaScript 0.5%
458 B · 15 lines typescript
Raw Blame History
1import { z } from 'zod';23export const MAX_LIMIT = 200;45/** Shared offset pagination query parameters (limit ≤ 200). */6export const pageQuery = {7  limit: z.coerce.number().int().min(1).max(MAX_LIMIT).default(50).describe('Page size (max 200)'),8  offset: z.coerce.number().int().min(0).default(0).describe('Rows to skip'),9};1011export const boolQuery = z12  .enum(['true', 'false', '1', '0'])13  .transform((v) => v === 'true' || v === '1')14  .optional();15