iachat/app/controllers/api/v1/accounts/captain
Rodribm10 aed6d62640 feat(retention): summary KPIs + cohort endpoints
Exposes two JSON endpoints under /api/v1/accounts/:id/captain/reports:
- GET /retention — aggregate KPIs (active/recurring/sleeping/at-risk/
  churned, new vs returned in period, Pix generated/paid/conversion,
  retention rates at 30d and 90d)
- GET /retention/cohort — monthly cohort matrix, 12 months lookback,
  12 months of offset. Each cell is % of the cohort that interacted in
  month M+N. SQL-aggregated with DATE_TRUNC + DISTINCT so it is a
  single query even on large histories.
2026-04-22 09:59:21 -03:00
..
reports feat(retention): summary KPIs + cohort endpoints 2026-04-22 09:59:21 -03:00
preferences_controller.rb feat: add global config for captain settings (#13141) 2026-01-12 19:54:19 +05:30
units_controller.rb feat(lifecycle): expose concierge config update on UnitsController 2026-04-15 10:35:03 -03:00