JWT was never used - auth uses X-User-Id header. Removes jwt.ts utility, jsonwebtoken dependency, stubbed refresh/logout endpoints, and updates all docs (PUML diagrams, api-routes, tex, CLAUDE.md) accordingly.
53 lines
1.5 KiB
Markdown
53 lines
1.5 KiB
Markdown
# CalChat API Routes
|
|
|
|
Base URL: `/api`
|
|
|
|
## Authentication
|
|
|
|
### Auth Endpoints (`/api/auth`)
|
|
Öffentliche Endpoints - keine Authentifizierung erforderlich.
|
|
|
|
| Method | Endpoint | Beschreibung |
|
|
|--------|----------|--------------|
|
|
| POST | `/auth/login` | User Login |
|
|
| POST | `/auth/register` | User Registrierung |
|
|
|
|
---
|
|
|
|
## Events
|
|
|
|
### Event Endpoints (`/api/events`)
|
|
Alle Endpoints erfordern Authentifizierung (X-User-Id Header).
|
|
|
|
| Method | Endpoint | Beschreibung |
|
|
|--------|----------|--------------|
|
|
| GET | `/events` | Alle Events des Users abrufen |
|
|
| GET | `/events/range` | Events nach Zeitraum filtern |
|
|
| GET | `/events/:id` | Einzelnes Event abrufen |
|
|
| POST | `/events` | Neues Event erstellen |
|
|
| PUT | `/events/:id` | Event aktualisieren |
|
|
| DELETE | `/events/:id` | Event löschen |
|
|
|
|
---
|
|
|
|
## Chat
|
|
|
|
### Chat Endpoints (`/api/chat`)
|
|
Alle Endpoints erfordern Authentifizierung (X-User-Id Header).
|
|
|
|
| Method | Endpoint | Beschreibung |
|
|
|--------|----------|--------------|
|
|
| POST | `/chat/message` | Nachricht an AI senden |
|
|
| POST | `/chat/confirm/:conversationId/:messageId` | Vorgeschlagenes Event bestätigen |
|
|
| POST | `/chat/reject/:conversationId/:messageId` | Vorgeschlagenes Event ablehnen |
|
|
| GET | `/chat/conversations` | Alle Konversationen abrufen |
|
|
| GET | `/chat/conversations/:id` | Nachrichten einer Konversation (mit Pagination) |
|
|
|
|
---
|
|
|
|
## Health
|
|
|
|
| Method | Endpoint | Beschreibung |
|
|
|--------|----------|--------------|
|
|
| GET | `/health` | Health Check |
|