feat(blocklist): scaffold blocklist data layer (api/service/repo/controller) - #1133
Merged
Conversation
…roller) Adds the end-to-end data layer for the Blocklist gRPC service, mirroring the existing ActivityFeed/Moderation conventions in :services:flipcash: - BlocklistApi: gRPC stub wrapper for BlockUser/UnblockUser/IsBlocked/GetBlocklist with auth-signed requests and protovalidate - BlocklistService: folds proto Result enums into typed Result<T> - BlocklistRepository (+ Internal impl): maps proto -> domain, assembles paged BlocklistPage (users, pagingToken, hasMore) - BlocklistController: resolves owner KeyPair from UserManager - BlockedUser/BlocklistPage domain models + BlockedUserMapper - Block/Unblock/IsBlocked/GetBlocklist error sealed classes - Hilt wiring in FlipcashModule - blocklist/v1 proto definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Scaffolds the end-to-end data layer for the new Blocklist gRPC service in
:services:flipcash, mirroring the existing ActivityFeed/Moderation conventions. No feature-module UI is included — this is the data layer only.Layers added
definitions/flipcash/protos/.../blocklist/v1/{blocklist_service,model}.protointernal/network/api/BlocklistApi.ktinternal/network/services/BlocklistService.ktrepository/BlocklistRepository.kt+internal/repositories/InternalBlocklistRepository.ktcontrollers/BlocklistController.ktmodels/BlockedUser.kt(BlockedUser,BlocklistPage)internal/domain/BlockedUserMapper.ktmodels/Errors.kt(Block/Unblock/IsBlocked/GetBlocklist sealed classes)inject/FlipcashModule.ktPublic surface
BlocklistController:blockUser(userId)/unblockUser(userId)→Result<Unit>isBlocked(userId)→Result<Boolean>getBlocklist(queryOptions)→Result<BlocklistPage>(paged, most-recently-blocked first)Notes
getBlocklistservice method returns the raw response so the repo can extractpagingToken/hasMorealongside the list (matches the Moderation pattern).Denied/UserNotFound/CannotBlockSelfare treated as expected business errors (notNotifiableError), consistent with existing error classes.Testing
./gradlew :services:flipcash:compileDebugKotlin→ BUILD SUCCESSFUL (also exercises proto codegen for the newblocklist/v1protos).