feat(memoro/server): add Zod validation, consistent ApiResult responses, and pagination

- Zod schemas for all 30+ API endpoints with proper input validation
- Consistent `{ success: true/false, ... }` response wrapper on every endpoint
- Pagination (limit/offset) on spaces, space memos, bots, and recordings list endpoints
- Validation helper (validateBody/validateQuery) for clean route handlers
- Fix rate-limiter return type in both memoro and shared-hono

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-01 15:18:07 +02:00
parent 3c47997598
commit 304c1e8b7c
14 changed files with 923 additions and 795 deletions

View file

@ -40,7 +40,7 @@ setInterval(() => {
export function rateLimitMiddleware(options: RateLimitOptions = {}) {
const { max = 100, windowMs = 60_000, keyFn } = options;
return async (c: Context, next: Next) => {
return async (c: Context, next: Next): Promise<void | Response> => {
const key = keyFn
? keyFn(c)
: c.req.header('x-forwarded-for')?.split(',')[0]?.trim() ||