Map inputs like Super Admin to built-in SUPER_ADMIN during team_role validation so invite API matches RBAC role keys.
Co-authored-by: Cursor <cursoragent@cursor.com>
Return a clear allowed-values message for oneof tags so issue status updates no longer surface empty field errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the analytics dashboard with live subscription snapshots, renewal/resubscribe metrics, and field-options normalization so Unknown and invalid profile values aggregate as Other. Also include exam_prep in the learner progress summary.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enforce account status on email, phone OTP, social login, token refresh, and authenticated learner requests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve real LMS practice IDs and return stimulus blocks, block links, and additive effective dynamic payloads for paginated practice questions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Harden LMS and exam-prep gates so only STUDENT is enforced, and return FREE effective_access_tier for OPEN_LEARNER so clients do not show paywall locks.
Co-authored-by: Cursor <cursoragent@cursor.com>
User profile and single-user endpoints now return active_subscriptions with plan category alongside subscription_status.
Co-authored-by: Cursor <cursoragent@cursor.com>
GET /subscriptions/me now returns every active subscription with plan category. PREP_TIME and ANSWER_TIMER dynamic slots are normalized to { seconds: N } on save.
Co-authored-by: Cursor <cursoragent@cursor.com>
Link checkout payments to a pending subscription row and activate it on success, or cancel it when payment fails, is cancelled, or expires.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use one user-scoped extend endpoint that grants or renews by plan_id, charge admin payments at plan price for revenue, and refresh the admin panel integration guide.
Co-authored-by: Cursor <cursoragent@cursor.com>
Record complimentary admin payment rows for audit, cancel only open payments so paid revenue stays intact, and exclude ADMIN_GRANT/ADMIN_EXTEND from revenue analytics.
Co-authored-by: Cursor <cursoragent@cursor.com>
Omit limit/offset on exam-prep practice list endpoints to fetch the full set instead of defaulting to limit=20.
Co-authored-by: Cursor <cursoragent@cursor.com>
Learners get email/SMS OTP codes via /user/sendResetCode; team members get reset links via new /team/sendResetCode and /team/resetPassword APIs, with admin panel integration docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Document real-time TUS upload progress, transcode polling, and React integration patterns for the admin panel.
Co-authored-by: Cursor <cursoragent@cursor.com>
Synthesize dynamic_payload from flat legacy fields on outbound API responses so AUDIO, MCQ, and SHORT_ANSWER questions match DYNAMIC question structure.
Co-authored-by: Cursor <cursoragent@cursor.com>
Presign minio:// references on outbound /api/v1 JSON so clients get usable URLs from resource GETs without calling the refresh endpoint.
Co-authored-by: Cursor <cursoragent@cursor.com>
The practices-by-question-type endpoint only exposed exam_prep_lesson_id, so catalog course and unit links appeared unlinked in the admin panel. Now returns exam_prep_parents for all exam-prep parent kinds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds DELETE /practices/:id/parents/:parentKind/:parentId and exam-prep equivalent so admins can remove one location link without replacing the full parents array. Includes admin panel integration guide and parent kind parse tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Documents authoring_profile, stimulus_blocks, stimulus_block_key, effective_dynamic_payload merge rules, and full practice GET/PUT integration for the admin panel.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce practice_stimulus_blocks, authoring_profile, and stimulus_block_key on question set items. Full practice GET/PUT returns merged effective_dynamic_payload for admin authoring.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent handler panics from dropping connections as nginx 502s and surface export DB errors as JSON 500 responses with CORS headers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Build the full CSV in memory before sending so nginx and browsers receive a Content-Length response instead of a truncated chunked stream.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop pinning AllowHeaders to a fixed list so browsers can send Accept and other fetch headers on export requests without failing OPTIONS preflight.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add streaming CSV export for payments, users, subscriptions, activity logs, and team members with list-filter parity, RBAC permissions, and admin panel documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add POST/GET /exam-prep/practices and PUT .../parents mirroring the LMS shell-then-link flow. Update admin panel integration guide and exam_prep.practices.list permission.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use email-based ON CONFLICT to refresh bcrypt hash when the account pre-exists, and repair null or invalid passwords for the Reach for Change seed user.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add tsegaye.negera@reachforchange.org as an OPEN_LEARNER in initial seed data for customer-login testing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow bulk in-app and email sends to target team_member_ids and team_role alongside platform users, including scheduled dispatch. Document team refresh token admin integration and select-missing-words sequence order.
Co-authored-by: Cursor <cursoragent@cursor.com>