29 lines
1.7 KiB
Markdown
29 lines
1.7 KiB
Markdown
## 1. Permission Error Helper
|
|
|
|
- [x] 1.1 Create `cmd/errors.go` with `friendlyAPIError(err error, operation string, permissionHint string) error` function
|
|
- [x] 1.2 Handle 401 (auth failed), 403 (permission denied with optional hint), 404 (not found / no access), and passthrough for non-API errors and unknown status codes
|
|
|
|
## 2. Client Methods
|
|
|
|
- [x] 2.1 Add `CreateProject(ctx, fields) (*model.Project, error)` to `client/projects.go` — POST /api/projects
|
|
- [x] 2.2 Add `DeleteProject(ctx, id) error` to `client/projects.go` — DELETE /api/projects/{id}
|
|
- [x] 2.3 Add `CreateBoard(ctx, projectId, fields) (*model.Board, error)` to `client/boards.go` — POST /api/projects/{projectId}/boards
|
|
- [x] 2.4 Add `DeleteBoard(ctx, id) error` to `client/boards.go` — DELETE /api/boards/{id}
|
|
|
|
## 3. Project Commands
|
|
|
|
- [x] 3.1 Add `projectCreateCmd` to `cmd/project.go` with `--name` (required), `--type` (required, values: public/private), and `--description` (optional) flags
|
|
- [x] 3.2 Add `projectDeleteCmd` to `cmd/project.go` accepting a positional project ID argument
|
|
- [x] 3.3 Wire both commands with `friendlyAPIError` — create uses empty hint, delete uses "requires project manager role"
|
|
|
|
## 4. Board Commands
|
|
|
|
- [x] 4.1 Add `boardCreateCmd` to `cmd/board.go` with `--project` (required), `--name` (required), and `--position` (optional, default 65536) flags
|
|
- [x] 4.2 Add `boardDeleteCmd` to `cmd/board.go` accepting a positional board ID argument
|
|
- [x] 4.3 Wire both commands with `friendlyAPIError` using "requires project manager role" hint
|
|
|
|
## 5. Verification
|
|
|
|
- [x] 5.1 Run `go build` to verify compilation
|
|
- [x] 5.2 Run existing test suite (`test.sh`) to verify no regressions
|