Join our community: https://t.me/+DOylgFv1jyJlNzM0
Description
GET /v1/streams only filters by sender and recipient. There is no way to filter by stream status, making it impossible to build efficient "completed history" or "paused streams" views without fetching everything.
What Needs to Happen
- Add
?status=active|cancelled|completed|paused query param
- Add
?token={address} to filter by token contract
- Add
?sort=createdAt|endTime|depositedAmount with ?order=asc|desc
- Add
?limit=20&offset=0 with hasMore in response
- Index
Stream.isPaused and Stream.isActive in Prisma schema for efficient filtering
Files
backend/src/controllers/stream.controller.ts (listStreams)
backend/prisma/schema.prisma
Acceptance Criteria
Description
GET /v1/streamsonly filters bysenderandrecipient. There is no way to filter by stream status, making it impossible to build efficient "completed history" or "paused streams" views without fetching everything.What Needs to Happen
?status=active|cancelled|completed|pausedquery param?token={address}to filter by token contract?sort=createdAt|endTime|depositedAmountwith?order=asc|desc?limit=20&offset=0withhasMorein responseStream.isPausedandStream.isActivein Prisma schema for efficient filteringFiles
backend/src/controllers/stream.controller.ts(listStreams)backend/prisma/schema.prismaAcceptance Criteria
?status=pausedreturns only paused streams?status=completedreturns only completed streamshasMoreworks correctly