Skip to content

Feature: Escrow Overview Endpoint#104

Merged
Cedarich merged 6 commits intoStayLitCodes:mainfrom
dDevAhmed:feature/issue-96-escrow-overview
Feb 26, 2026
Merged

Feature: Escrow Overview Endpoint#104
Cedarich merged 6 commits intoStayLitCodes:mainfrom
dDevAhmed:feature/issue-96-escrow-overview

Conversation

@dDevAhmed
Copy link
Contributor

closes #96

This PR introduces the GET /escrows/overview endpoint, which provides a paginated, filterable overview of escrows for a given user. This endpoint is optimized for powering the main "Escrows" dashboard in the app.


Changes

  1. Controller:

    • Added GET /escrows/overview route.
    • Integrated query parameters for filtering, sorting, and pagination.
    • Documented the endpoint using Swagger.
  2. Service:

    • Implemented findOverview method to query escrows efficiently using TypeORM.
    • Supports filtering by role, status, token, and date range.
    • Includes pagination metadata (totalItems, totalPages, etc.).
  3. DTOs:

    • Added EscrowOverviewQueryDto for query validation.
    • Added EscrowOverviewResponseDto for consistent response structure.
  4. Database:

    • Added indexes to improve query performance for common filters (e.g., creatorId, status, createdAt).
  5. Tests:

    • Unit tests for findOverview service method.
    • E2E tests for role/status filtering, pagination edge cases, and sorting.

Acceptance Criteria

  • Endpoint documented via Swagger.
  • Returns correct data based on role, status, token, and date filters.
  • Pagination works and metadata is accurate.
  • Unit and integration tests cover filtering, pagination, and sorting.

How to Test

  1. Run unit tests:
    npm run test
  2. Run e2e tests:
    npm run test:e2e
  3. Access Swagger docs:
    • Start the backend server.
    • Navigate to /api/docs to view the endpoint documentation.

@Cedarich
Copy link
Contributor

please run npm lint and address the few linting errors. Thank you

@Cedarich
Copy link
Contributor

Please resolve conflicts also Run npm run lint and address few lint errors. Thank you @dDevAhmed

@dDevAhmed
Copy link
Contributor Author

conflicts resolved @Cedarich

@Cedarich
Copy link
Contributor

Please address lint

@Cedarich Cedarich merged commit 55c9c90 into StayLitCodes:main Feb 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Escrow Overview & Filtering Dashboard Endpoint

2 participants