Files
CRM_Montzar/.superpowers/sdd/task-3-report.md
T
2026-10-17 16:52:20 +03:30

39 lines
1.7 KiB
Markdown

# Task 3 Report: Wire API call-sites + auth cutoff + stop auto-stamp
## Status
DONE_WITH_CONCERNS
## Summary
- Updated all API call sites in scope to use `dealPriorWhere(lens, cutoff)` and `activityPriorWhere(lens, cutoff)`.
- Removed person/company prior-lens filtering from contacts, reports, and AI count paths.
- Exposed `priorArchive.cutoffAt` from auth DTO generation and kept JWT `priorCutoff` null unless both grant and organization cutoff exist.
- Added `promotedFromPriorAt` mapping to Deal and Activity DTOs.
- Stopped billing module enable from auto-writing `priorArchiveEnabledAt`; existing cutoff values are preserved.
## Files Changed
- `apps/api/src/auth/jwt.strategy.ts`
- `apps/api/src/auth/auth.service.ts`
- `apps/api/src/billing/billing.service.ts`
- `apps/api/src/pipelines/pipelines.service.ts`
- `apps/api/src/pipelines/deals-excel.service.ts`
- `apps/api/src/activities/activities.service.ts`
- `apps/api/src/reports/reports.service.ts`
- `apps/api/src/ai/ai-ask.service.ts`
- `apps/api/src/contacts/people.service.ts`
- `apps/api/src/contacts/companies.service.ts`
## Verification
- `npx prisma generate` from `apps/api`: passed.
- `npm run typecheck -w @mento/api`: passed.
- IDE lint diagnostics for edited files: no errors found.
- `graphify update .`: attempted after edits, crashed with exit code `3221225477` and no output; treated as non-blocking per task instructions.
## Concerns
- No focused tests were added; verification is the requested API typecheck plus lint diagnostics.
- `billing.service.ts` still runs the existing prior-activity backfill only when an organization already has a cutoff. It no longer creates a cutoff when enabling the module.