Page through any list with the API client
Every paged list method of the @zitadel/api client now has items(), pages() and all(), which take the same arguments and follow the cursor for you. items() and pages() fetch the next page only when the loop reaches it, so a loop that stops early reads nothing more.
for await (const deployment of client.listDeployments.items({ project_id })) {
if (deployment.status === "live") break; // later pages are never fetched
}
const schemas = await client.listSchemas.all({ project_id, limit: 100 });
createZitadelClienttakesonResponseandonErrorhooks, which see every call, each page included.@zitadel/api/clientexportspagedFunctions: each paged function's typed readers of a page's items and cursor, and the arguments of its next page.zitadel deploy,preview,release createand the first deploy ofsetupcheck the release against the API's own schema before sending it, and name each field it refuses.
Pull request#2527