Feat/api versioning v1#385
Open
sweetesty wants to merge 9 commits into
Open
Conversation
…ompile & unit tests
|
@sweetesty 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! 🚀 |
Owner
|
resolve conflicts please |
…analytics routes under /api/v1/
…e state, waitlist notification, circleTemplates fields, test fixtures
…cessDueCycles, versioned circle/contribute routes, profile page trustline reset, package.json bullmq/ioredis fix
…sers/[id] routes from main
…polyfills, Jest node environments, flexible SQL string matchers, mock resets, and global ioredis/bullmq mocks
…legacy unversioned routes
…reputation route migration, and Jest JSDOM edge primitives polyfills
Contributor
Author
|
@JosephOnuh done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #260
This PR adds
/api/v1/versioning to all routes, resolves all compiler and IDE errors surfaced during migration, and validates the versioned routes with a full passing test suite.Route versioning
/api/v1/prefix in the Next.jsapp/api/v1/directory301 Moved Permanentlyredirects to their/api/v1/equivalents/api/v1/paths — no unversioned URLs remainingREADME.mdupdated with API versioning strategy, current version, and redirect behaviour for legacy URLsCompiler & IDE fixes resolved during migration
Disputetypes —Disputeinterface andDisputeStatustype added tosrc/types/index.ts; was causing errors in admin components and servicesany—errparameter inCircleChat.tsxmutationonErrorcallback explicitly cast asErrorJoinCircleForm.tsx—noSavedKey/setNoSavedKeystate declaration was absent; added viauseState(false)PayoutHistoryRowinterface extracted to@/types/index.tsto resolve compiler failures on dynamic route imports inPayoutHistory.tsxand the payouts routesession.user.idtype errors —session.usersafely cast as{ id: string } | undefinedacross 5 route files (approve,reject,pending-requests,contribute/verify,leave). Note: this pattern repeating across routes is a candidate for consolidation into anext-auth.d.tssession type extension as a follow-upuserIdused before declaration injoin/route.ts— latent runtime bug surfaced by the migration; fixed at the declaration sitecircle-1test string replaced with a valid UUID; Stellar public key and HTTPShorizonUrlmocked to satisfy SDK validationCreateCircleFormtest isolation — replaced fragilemockResolvedValueOncewith amockImplementationthat cleanly intercepts background FX rate queries on mount, preventing mock assertion interference on form submissionsTest suite — 4/4 suites passing
src/app/api/v1/circles/[id]/join/__tests__/route.test.tssrc/app/api/v1/circles/[id]/contribute/__tests__/route.test.tssrc/app/api/v1/circles/[id]/contribute/verify/__tests__/route.test.tssrc/components/circle/__tests__/CreateCircleForm.test.tsxAcceptance criteria met:
/api/v1/301redirect to versioned routes