next_cursor is null on the last page. A cursor belongs to its sort direction: change sort and an old cursor answers 422.
TypeScript
Keep in sync
To pick up new items, remember thecreated_at of the last item you saw, and next time list with created_since set to it and sort=created_at,ASC. The item at that exact time comes again, so skip the IDs you already have.
Missed orders also take updated_since, to pick up the ones that changed.
Filters
Lists that can be filtered takefilter=field||$op||value, repeatable; every filter must match.
Each list documents which fields and operators it takes; anything else answers
422. Up to 10 filters per request.