Commit Graph

15 Commits

Author SHA1 Message Date
maaz519 43f4133f1d feat: add qrCode field to Account for QR re-auth 2026-05-29 10:58:04 +05:30
maaz519 5d9df64849 fix(api): prevent self-loop routes, map P2003 to 400, forward DELETE error body
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:44:48 +05:30
maaz519 9d1799eab1 fix(api): export GroupSummary interface to fix TS4053 declaration emit error 2026-05-28 01:41:12 +05:30
maaz519 d92476f841 fix(api): use PrismaClientKnownRequestError instanceof, add ConflictException for duplicate routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:13:05 +05:30
maaz519 6b4920ce41 feat(api): add RoutesModule with GET/POST/DELETE /routes endpoints
Implements RoutesService and RoutesController for SyncRoute CRUD, wires
GroupsModule and RoutesModule into AppModule; 11 new tests, all 31 pass.
2026-05-28 01:07:15 +05:30
maaz519 f4a40b573e fix(api): add clearAllMocks and explicit return type to GroupsModule
- Add jest.clearAllMocks() in beforeEach of both spec files to prevent
  call-history state from leaking between tests as the suites grow
- Define GroupSummary interface and use it as explicit return type for
  GroupsService.list() to satisfy TypeScript strict typing requirements

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 01:00:09 +05:30
maaz519 0e92b24bf0 feat(api): add GroupsModule with GET /groups endpoint
Implements TDD-driven GroupsService and GroupsController with full unit test coverage. GET /groups returns all groups ordered by name, selecting id, name, platform, platformId, isActive, and accountId fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 00:55:13 +05:30
maaz519 e73d39b798 fix(api): escape filter values, clamp pagination, remove redundant ConfigModule import
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 00:31:43 +05:30
maaz519 8ad5f737bd feat(api): add SearchModule with GET /search endpoint backed by Meilisearch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 00:28:13 +05:30
maaz519 cbb32ed425 fix(schema): revert datasource URL, add Group.accountId index 2026-05-27 17:09:48 +05:30
maaz519 a7aa8bf5a9 feat(schema): Account model with AccountStatus enum, optional Group.accountId
Adds Account model (platform, jid, sessionPath, displayName, status) with
AccountStatus enum (ACTIVE/DISCONNECTED/BANNED) and optional accountId FK
on Group for multi-account WhatsApp session tracking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 17:07:39 +05:30
maaz519 b16a30beb2 feat: verify Turborepo pipeline — all 8 packages build and test
Adds packageManager field to root package.json (required by turbo v2.9),
loads .env via dotenv in API jest config so Prisma integration tests find
DATABASE_URL when run from the monorepo root. pnpm build + pnpm test: 8/8 passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:38:34 +05:30
maaz519 c1efde757d feat: add health check module with unit tests 2026-05-27 14:27:07 +05:30
maaz519 ae6c7ec94a feat: add Prisma schema and PrismaService with integration tests (postgres on :5433) 2026-05-27 14:25:49 +05:30
maaz519 ee353762a5 feat: scaffold NestJS API application 2026-05-27 14:19:42 +05:30