UNPKG

@vigilbase/cli

Version:

Vigilbase CLI — security scanners, agent tools, and Vigilbase One from the terminal.

26 lines (25 loc) • 983 B
import { z } from 'zod'; /** * Cursor pagination, promoted from OS (`@vigilbase-os/contracts` pageSchema and * CursorParams), which now re-exports these. * * Query: `limit` (1–200, default 50) and an opaque `cursor`. Response: * `{ items, nextCursor? }`; no `nextCursor` means the last page. Cursors are * opaque to callers, and each product binds them to the tenant and filters. */ export declare const PAGE_LIMIT_DEFAULT = 50; export declare const PAGE_LIMIT_MAX = 200; export declare const CURSOR_MAX_LENGTH = 512; export declare const CursorParams: z.ZodObject<{ cursor: z.ZodOptional<z.ZodString>; limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>; }, z.core.$strip>; export type CursorParams = z.infer<typeof CursorParams>; export declare function pageSchema<T extends z.ZodType>(item: T): z.ZodObject<{ items: z.ZodArray<T>; nextCursor: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type Page<T> = { items: T[]; nextCursor?: string; };