Skip to content

feat(api): API improvements — pagination, bulk ops, comments, members, archival#1065

Open
RainyPixel wants to merge 2 commits intousekaneo:mainfrom
ONREZA:feat/api-improvements
Open

feat(api): API improvements — pagination, bulk ops, comments, members, archival#1065
RainyPixel wants to merge 2 commits intousekaneo:mainfrom
ONREZA:feat/api-improvements

Conversation

@RainyPixel
Copy link

Summary

Addresses items from #1041 and adds additional API improvements:

  • Pagination: GET /tasks/:projectId now returns { data, pagination } with total/page/pageSize/totalPages. Pagination only applied when page or limit params are passed (no breaking change for existing clients).
  • Sorting: sortBy and sortOrder query params on task list (createdAt, priority, dueDate, position, title, number)
  • Due date filtering: dueBefore and dueAfter query params with date validation
  • Bulk operations: PATCH /task/bulk supporting updateStatus, updatePriority, updateAssignee, delete, addLabel, removeLabel
  • Comments: Dedicated GET/POST/PUT/DELETE /comment endpoints with author-only edit/delete
  • Workspace members: GET /workspace/:id/members returns name, email, image, role
  • Project archival: PUT /project/:id/archive|unarchive with soft-delete, includeArchived filter

Test plan

  • Fetch tasks without page/limit — verify all tasks returned (no truncation)
  • Fetch tasks with ?page=1&limit=10 — verify pagination metadata
  • Sort tasks by priority desc — verify ordering
  • Filter by dueBefore/dueAfter — verify date range works
  • Bulk update status for multiple tasks — verify all updated
  • Create/edit/delete a comment — verify CRUD and author-only restrictions
  • Get workspace members — verify member list returned
  • Archive a project — verify it's hidden from default list
  • Unarchive — verify it reappears

…rchival

API improvements:
- Pagination metadata (total, page, pageSize, totalPages) on task list
- Sorting (sortBy, sortOrder) and due date range filtering (dueBefore, dueAfter)
- Bulk operations endpoint (PATCH /task/bulk) for status, priority, assignee, delete, labels
- Comments as first-class resource (GET/POST/PUT/DELETE /comment)
- Workspace members endpoint (GET /workspace/:id/members)
- Project archival with soft-delete (archive/unarchive endpoints, includeArchived filter)
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