Skip to content

feat(server): add profile and KYC management APIs - #185

Open
eulami wants to merge 6 commits into
arflexx:mainfrom
eulami:fix/issue-74-profile-kyc
Open

eulami wants to merge 6 commits into
arflexx:mainfrom
eulami:fix/issue-74-profile-kyc

Conversation

@eulami

@eulami eulami commented Aug 27, 2026

Copy link
Copy Markdown

Closes #74

Summary

  • Add authenticated profile retrieval and updates
  • Add paginated user trade history with status filtering
  • Add KYC migration and admin-only KYC update endpoint
  • Add reusable admin authorization middleware
  • Update OpenAPI documentation
  • Add profile and KYC endpoint tests
  • Fix existing server TypeScript/test failures

Verification

  • pnpm --filter airflex-server lint
  • pnpm --filter airflex-server test
  • 11 test suites passed, 82 tests passed

Closes arflexx#74

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
@eulami
eulami requested a review from dark-sarge as a code owner August 27, 2026 22:07
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@eulami Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@dark-sarge dark-sarge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve all conflicts

@eulami

eulami commented Sep 1, 2026

Copy link
Copy Markdown
Author

Conflicts resolved

@eulami
eulami requested a review from dark-sarge September 2, 2026 12:39
@eulami

eulami commented Sep 7, 2026

Copy link
Copy Markdown
Author

Hello. Is there a reason why this issue isn't closed yet? Kindy respond.

eulami and others added 3 commits September 29, 2026 00:22
The earlier "Merge branch 'main'" commits resolved every conflict by
keeping the branch side, so the PR silently dropped main's work (auth
revoke/recovery endpoints, referrals/rates/kyc/analytics mounts, admin
trade/user endpoints, profile referral fields, assertEnvValid startup
validation, several test env shims) and left broken code behind
(duplicate initJobQueue import, stray closing brace, duplicate kycStatus
key) — that is what `tsc --noEmit` was failing on.

Re-apply the issue arflexx#74 work on top of current main instead:
- GET /api/v1/profile returns role, kycStatus and virtualAccountNumber
- PATCH /api/v1/profile (alias / notificationsEnabled, zod-validated)
- GET /api/v1/profile/trades paginated with ?status validation
- PATCH /api/v1/admin/users/:id/kyc (admin only) + OpenAPI docs
- profile/KYC migration and endpoint tests, merged with main's tests

Also fix two pre-existing main breakages that block the server gates:
- export @airflex/shared/units from the package exports map (introduced
  in fd80d00 but never exported, so 12 suites could not resolve it)
- use the named `pool` export in trade-lifecycle.test.ts

Verified: pnpm --filter airflex-server lint passes; 25/29 suites and
202/209 tests pass — the remaining suites fail on main too or need a
live database.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[server] - Create User Profile API: Update Phone, Settings, and KYC Status

2 participants