Skip to content

Member Quotas: New Listing API with Filtering, Pagination, and Username Support#68

Merged
jhonatapers merged 7 commits intomainfrom
develop
Aug 26, 2025
Merged

Member Quotas: New Listing API with Filtering, Pagination, and Username Support#68
jhonatapers merged 7 commits intomainfrom
develop

Conversation

@jhonatapers
Copy link
Copy Markdown
Member

This pull request introduces a new API endpoint to list all members' quota information, adds support for filtering and pagination, and refactors existing quota-related data structures to include usernames. The changes also improve the filtering mechanism for case-insensitive searches and update the data access layer to support the new functionality.

API and Use Case Enhancements:

  • Added a new endpoint listQuotas to MemberAdminAPI and implemented it in MemberAdminController, allowing clients to retrieve a paginated and filterable list of members' quota information, including memberId, username, and total quota. ([[1]](https://github.com/CallVDois/drive-api/pull/68/files#diff-ff9315202227c9a42496a21022efaa5998d882e993ec8c3b7908e61dd90e786cR56-R68), [[2]](https://github.com/CallVDois/drive-api/pull/68/files#diff-a83074e73dacb0218c2418ac388ce678bceb4540a2d33ec6c79203ead96aeea1R73-R96))
  • Introduced DefaultListQuotasUseCase and ListQuotaOutput to handle the business logic for listing member quotas, and registered the use case as a Spring bean. ([[1]](https://github.com/CallVDois/drive-api/pull/68/files#diff-1cd81131b6060eefc2f7c4d350ffb071549e669781d1f6453a09845f73a6ff11R3-L12), [[2]](https://github.com/CallVDois/drive-api/pull/68/files#diff-3bb9f124c4e78cc24116c2f1ac870b08db11f59611da0ac6b73c104a83bfdbd7R1-R14), [[3]](https://github.com/CallVDois/drive-api/pull/68/files#diff-82e9353021dbb14d7d9d2e02a34c83bfb043f344041b7adf08b9d9fe2c04de44R57-R61))

Domain and Data Layer Changes:

  • Extended MemberGateway with a findAll method for paginated, filtered member retrieval, and implemented it in DefaultMemberGateway using Spring Data JPA specifications and a new FilterService. ([[1]](https://github.com/CallVDois/drive-api/pull/68/files#diff-563a68bf8e1f6aefc123425a57bdd517b7d5173e9ac8419aa2479841497d8017R12-R13), [[2]](https://github.com/CallVDois/drive-api/pull/68/files#diff-ad5dcf49c85084ae9c661202d03ecadd6da5a605972f5a436026a3c746c16078R19-R33), [[3]](https://github.com/CallVDois/drive-api/pull/68/files#diff-ad5dcf49c85084ae9c661202d03ecadd6da5a605972f5a436026a3c746c16078R45-R66))
  • Updated MemberJpaRepository to support filtered and paginated queries using JPA specifications. ([infrastructure/src/main/java/com/callv2/drive/infrastructure/member/persistence/MemberJpaRepository.javaR18-R19](https://github.com/CallVDois/drive-api/pull/68/files#diff-fb09fc39b33907c94685a89e9cadb3b5d201a468bd257aad72fbd36cc89b98c4R18-R19))

DTO and Model Updates:

  • Refactored quota output records (GetQuotaOutput, MemberQuotaResponse, and newly introduced MemberQuotaListResponse) to include the username field for better client usability. ([[1]](https://github.com/CallVDois/drive-api/pull/68/files#diff-fcf56b06f21d638002da83fc363a1db494003888c08e15782539277e3a34a2f3L3-R13), [[2]](https://github.com/CallVDois/drive-api/pull/68/files#diff-3c42750b1dc9a2ddbcfab848e972160ab916455be046446f8653c269fa5c4cbfL3-R3), [[3]](https://github.com/CallVDois/drive-api/pull/68/files#diff-f6fb1948e6978cf81e20ae8a76ef36d2635ff8ac3fa78f77cefb5bc9aae3ee0eR1-R5))
  • Removed the obsolete QuotaListOutput DTO in favor of the new, more comprehensive structures. ([application/src/main/java/com/callv2/drive/application/member/quota/retrieve/list/QuotaListOutput.javaL1-L9](https://github.com/CallVDois/drive-api/pull/68/files#diff-53eeeb0e3ba2fdd444cd2f18a01e2976970e8a7904a9d76a1497c5578603a669L1-L9))

Filtering Improvements:

  • Modified the Like filter to perform case-insensitive searches by converting both the field and the filter value to uppercase. ([infrastructure/src/main/java/com/callv2/drive/infrastructure/filter/Like.javaL27-R27](https://github.com/CallVDois/drive-api/pull/68/files#diff-8265fa9ead41c1a9db1c9a478f00063f3920abceb0214c93a37220a242988004L27-R27))

Presentation Layer Adjustments:

  • Updated MemberPresenter to handle the new output structures for both single and list quota responses. ([infrastructure/src/main/java/com/callv2/drive/infrastructure/member/presenter/MemberPresenter.javaL21-R35](https://github.com/CallVDois/drive-api/pull/68/files#diff-12b43fd72d05ff610a664da481dc94e0f28a2006babdfcb164559bd57c453806L21-R35))

These changes collectively provide a robust, extensible foundation for quota management and administration in the application, enabling more detailed and user-friendly responses for quota-related API calls.

@jhonatapers jhonatapers self-assigned this Aug 26, 2025
@jhonatapers jhonatapers merged commit 56f4e91 into main Aug 26, 2025
1 check passed
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.

1 participant