Skip to content

Function: cursorPageSchema()

function cursorPageSchema<T>(itemSchema): ZodObject<{
  items: ZodArray<T, "many">;
  next_cursor: ZodOptional<ZodNullable<ZodString>>;
  prev_cursor: ZodOptional<ZodNullable<ZodString>>;
  total: ZodOptional<ZodNullable<ZodNumber>>;
  total_estimate: ZodOptional<ZodNullable<ZodNumber>>;
}, "strip", ZodTypeAny, {
  items: T["_output"][];
  next_cursor?: string | null;
  prev_cursor?: string | null;
  total?: number | null;
  total_estimate?: number | null;
}, {
  items: T["_input"][];
  next_cursor?: string | null;
  prev_cursor?: string | null;
  total?: number | null;
  total_estimate?: number | null;
}>;

Defined in: rine-ts-sdk/src/types.ts:948

CursorPage raw response schema — used by adapters.parsePaginated(). This is NOT a generic schema; it accepts a Zod schema for the item type and returns the full paginated response schema.

Type Parameters

Type Parameter
T extends ZodTypeAny

Parameters

Parameter Type
itemSchema T

Returns

ZodObject\<{ items: ZodArray\<T, "many">; next_cursor: ZodOptional\<ZodNullable\<ZodString>>; prev_cursor: ZodOptional\<ZodNullable\<ZodString>>; total: ZodOptional\<ZodNullable\<ZodNumber>>; total_estimate: ZodOptional\<ZodNullable\<ZodNumber>>; }, "strip", ZodTypeAny, { items: T["_output"][]; next_cursor?: string | null; prev_cursor?: string | null; total?: number | null; total_estimate?: number | null; }, { items: T["_input"][]; next_cursor?: string | null; prev_cursor?: string | null; total?: number | null; total_estimate?: number | null; }>