list() method returns a Page<T>. Pages are async-iterable, so the simplest consumer iterates across every item across every page transparently.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Cursor-based iteration across SDK list endpoints.
list() method returns a Page<T>. Pages are async-iterable, so the simplest consumer iterates across every item across every page transparently.
for await (const env of await verial.environments.list()) {
console.log(env.id)
}
let page = await verial.environments.list({ limit: 50 })
do {
for (const env of page.data) {
console.log(env.id)
}
const next = await page.getNextPage()
if (!next) break
page = next
} while (true)
| 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 |
| Option | Type | Description |
|---|---|---|
cursor | string | Resume from a specific cursor |
limit | number | Items per page |
for await (const run of await verial.runs.list()) {
if (run.verdict === 'pass') {
return run
}
}