Difficulty: Intermediate
Type: feature
Background
The admin member-listing endpoint GET /v1/communities/:communityId/members is one of the four MVP endpoints documented in the README, intended for admin use.
Problem
As currently documented, the endpoint returns member listings with no visible pagination or sort parameters, which will not scale for communities with many members and risks large, slow responses.
Expected outcome
The endpoint accepts page/pageSize (or cursor-based cursor/limit) query params plus a sort param (e.g., joinedAt, role), returns a paginated envelope (data, total, nextCursor), and the OpenAPI spec is regenerated to reflect the new params.
Suggested implementation
- Update the Fastify route schema in
apps/access-api for this endpoint to accept pagination/sort query params with Zod/JSON-schema validation.
- Update the Prisma query to use
skip/take or cursor-based pagination against the members/memberships tables.
- Add a paginated response type to
packages/shared-types.
- Run
npm run -w access-api openapi:generate and commit the updated docs/openapi.json.
- Add/extend
packages/sdk-lite to pass through the new params.
Acceptance criteria
Likely affected files/directories
apps/access-api/src/routes/ (community members route)
packages/shared-types/
packages/sdk-lite/
docs/openapi.json
Difficulty: Intermediate
Type: feature
Background
The admin member-listing endpoint
GET /v1/communities/:communityId/membersis one of the four MVP endpoints documented in the README, intended for admin use.Problem
As currently documented, the endpoint returns member listings with no visible pagination or sort parameters, which will not scale for communities with many members and risks large, slow responses.
Expected outcome
The endpoint accepts
page/pageSize(or cursor-basedcursor/limit) query params plus asortparam (e.g.,joinedAt,role), returns a paginated envelope (data,total,nextCursor), and the OpenAPI spec is regenerated to reflect the new params.Suggested implementation
apps/access-apifor this endpoint to accept pagination/sort query params with Zod/JSON-schema validation.skip/takeor cursor-based pagination against themembers/membershipstables.packages/shared-types.npm run -w access-api openapi:generateand commit the updateddocs/openapi.json.packages/sdk-liteto pass through the new params.Acceptance criteria
docs/openapi.jsonreflects the new query paramssdk-liteexposes the new params in its client methodLikely affected files/directories
apps/access-api/src/routes/(community members route)packages/shared-types/packages/sdk-lite/docs/openapi.json