Skip to content

Add status filter and pagination to GET /v1/streams #363

@ogazboiz

Description

@ogazboiz

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

  • ?status=paused returns only paused streams
  • ?status=completed returns only completed streams
  • Pagination with hasMore works correctly

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasks

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions