Summary
All paginated list endpoints return a response envelope containing the data array alongside metadata like total, hasMore, and nextCursor. This envelope shape is currently assembled inline in each handler. A shared builder helper should be used everywhere to keep the shape consistent.
Scope
- Add
buildListResponse<T>(data: T[], meta: { total: number, hasMore: boolean, nextCursor?: string }) helper
- Returns
{ data, meta: { total, hasMore, nextCursor } }
nextCursor omitted from output when undefined
- Add unit tests confirming shape for: with cursor, without cursor, empty data array
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
All paginated list endpoints return a response envelope containing the data array alongside metadata like
total,hasMore, andnextCursor. This envelope shape is currently assembled inline in each handler. A shared builder helper should be used everywhere to keep the shape consistent.Scope
buildListResponse<T>(data: T[], meta: { total: number, hasMore: boolean, nextCursor?: string })helper{ data, meta: { total, hasMore, nextCursor } }nextCursoromitted from output when undefinedAcceptance Criteria
nextCursorabsent when not providedtotal: 0andhasMore: falseETA: 12 hours
Coordinate on Telegram