feat(server): implement full REST API with JWT auth and real-time WebSocket
- Add HTTP handlers for issues, comments, agents, workspaces, inbox, members, and activity - Implement JWT authentication middleware with Bearer token validation - Add sqlc queries for all entities (CRUD operations) - Extract router into reusable NewRouter() for testability - Expand SDK with full API client methods (CRUD for all resources) - Add updateWorkspace to SDK, add Member type to shared types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d75746021f
commit
1e61c1974c
35 changed files with 3478 additions and 104 deletions
11
server/pkg/db/queries/activity.sql
Normal file
11
server/pkg/db/queries/activity.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- name: ListActivities :many
|
||||
SELECT * FROM activity_log
|
||||
WHERE issue_id = $1
|
||||
ORDER BY created_at DESC
|
||||
LIMIT $2 OFFSET $3;
|
||||
|
||||
-- name: CreateActivity :one
|
||||
INSERT INTO activity_log (
|
||||
workspace_id, issue_id, actor_type, actor_id, action, details
|
||||
) VALUES ($1, $2, $3, $4, $5, $6)
|
||||
RETURNING *;
|
||||
Loading…
Add table
Add a link
Reference in a new issue