iterateEvents and iterateIssues are async generators that follow the cursor
for you and stop when next_cursor is absent.
for await (const issue of client.issues.iterateIssues({ query: { status: "open", limit: 100 },})) { console.log(issue.id, issue.category, issue.severity, issue.message);}
for await (const event of client.events.iterateEvents({ query: { limit: 100 } })) { console.log(event.id, event.event_type, event.status);}
The iterators accept the same argument object as the underlying list operation,
minus query.after. The iterator owns the cursor, so setting it yourself is a
type error.
These iterators walk the whole collection. Break out of the loop, or filter with query.status,
when you only need recent records.