list() method returns a Page<T>. Pages are async-iterable, so the simplest consumer iterates across every item across every page transparently.
Auto-iterate
One Page at a Time
Page Surface
| Member | Type | Description |
|---|---|---|
data | T[] | Items in this page |
hasNextPage() | () => boolean | true if another page is available |
getNextPage() | () => Promise<Page<T> | null> | Fetches the next page, or null if none |
toJSON() | () => { data, _meta } | Serializable snapshot |
_meta.next | string | null | Next cursor |
_meta.prev | string | null | Previous cursor |
_meta.limit | number | Page size |
Options
All list methods accept:| Option | Type | Description |
|---|---|---|
cursor | string | Resume from a specific cursor |
limit | number | Items per page |