Added create and delete operations for projects and boards with validation and error handling

This commit is contained in:
Steve Cliff
2026-02-17 07:47:49 +00:00
parent c03d05734a
commit c15a48cda3
15 changed files with 571 additions and 4 deletions
+18 -2
View File
@@ -52,7 +52,7 @@ The system SHALL implement cursor-based pagination for all list endpoints that s
- **THEN** the client SHALL return those items without making additional requests
### Requirement: Project operations
The client SHALL provide methods to list all accessible projects (`GET /projects`) and get a single project by ID (`GET /projects/{id}`).
The client SHALL provide methods to list all accessible projects (`GET /projects`), get a single project by ID (`GET /projects/{id}`), create a project (`POST /projects`), and delete a project (`DELETE /projects/{id}`).
#### Scenario: List projects
- **WHEN** `ListProjects` is called
@@ -62,8 +62,16 @@ The client SHALL provide methods to list all accessible projects (`GET /projects
- **WHEN** `GetProject` is called with a project ID
- **THEN** the client SHALL send `GET /projects/{id}` and return a Project model
#### Scenario: Create project
- **WHEN** `CreateProject` is called with project fields (type, name, description)
- **THEN** the client SHALL send `POST /projects` with the provided fields and return the created Project
#### Scenario: Delete project
- **WHEN** `DeleteProject` is called with a project ID
- **THEN** the client SHALL send `DELETE /projects/{id}`
### Requirement: Board operations
The client SHALL provide a method to get a single board by ID (`GET /boards/{id}`) and list board actions (`GET /boards/{boardId}/actions`) with pagination support.
The client SHALL provide a method to get a single board by ID (`GET /boards/{id}`), list board actions (`GET /boards/{boardId}/actions`) with pagination support, create a board (`POST /projects/{projectId}/boards`), and delete a board (`DELETE /boards/{id}`).
#### Scenario: Get board
- **WHEN** `GetBoard` is called with a board ID
@@ -73,6 +81,14 @@ The client SHALL provide a method to get a single board by ID (`GET /boards/{id}
- **WHEN** `ListBoardActions` is called with a board ID and limit
- **THEN** the client SHALL send paginated `GET /boards/{boardId}/actions` requests and return a slice of Action models
#### Scenario: Create board
- **WHEN** `CreateBoard` is called with a project ID and board fields (name, position)
- **THEN** the client SHALL send `POST /projects/{projectId}/boards` with the provided fields and return the created Board
#### Scenario: Delete board
- **WHEN** `DeleteBoard` is called with a board ID
- **THEN** the client SHALL send `DELETE /boards/{id}`
### Requirement: Card CRUD operations
The client SHALL provide methods for: get card (`GET /cards/{id}`), create card (`POST /lists/{listId}/cards`), update card (`PATCH /cards/{id}`), delete card (`DELETE /cards/{id}`), and duplicate card (`POST /cards/{id}/duplicate`). The client SHALL provide a method to list cards in a list (`GET /lists/{listId}/cards`) with pagination support. The client SHALL provide a method to list card actions (`GET /cards/{cardId}/actions`) with pagination support.