import {z} from 'zod'

// the one keyset-pagination query shape every paged list endpoint shares
export const DEFAULT_PAGE_SIZE = 20
export const MAX_PAGE_SIZE = 100

// pending inboxes are actionable, not archives — a generous cap keeps the
// payload bounded without paging ui
export const INBOX_LIMIT = 200

export const pageQueryShape = {
  limit: z.coerce
    .number()
    .int()
    .min(1)
    .max(MAX_PAGE_SIZE)
    .default(DEFAULT_PAGE_SIZE),
  cursor: z.string().optional(),
}
