Creator public APIs: cache constants, query parsing, list envelope, and Prisma typings#71
Merged
Chucks1093 merged 1 commit intoMar 28, 2026
Conversation
|
@Jayrodri088 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! 🚀 |
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.
Description
Overview
This PR tightens public creator list and read routes in one pass: shared cache settings, safer query handling, a single list response shape, and reliable TypeScript builds with pnpm + Prisma. Behavior for fetching and serializing data is unchanged except where the HTTP JSON shape is intentionally standardized.
What changed
Cache-Controlstrings live increator-public-cache.constants.ts. Public GETs on creator list/profile routes usecacheControl(...)with those presets.orderis validated viacreatorListSortDirectionQueryParam().sort,search, andverifiedgo through shared trim/normalize preprocessing so empty/whitespace-only strings behave like missing values before Zod runs.items(array) andmeta(pagination or list metadata), viawrapPublicCreatorListResponse. Both the newer creators list flow and the legacy paginated list route usesendSuccesswith this shape so clients see the same structure.tsconfigmaps@prisma/clienttypes to the generated client undernode_modules/.prisma/clientsotscdoes not pick up the minimal pnpm stub. The query-string Zod helper no longer uses an incorrect explicitZodEffectsreturn type.Breaking change
List endpoints now return:
{ "success": true, "data": { "items": [...], "meta": { ... } }, ... }Update any client that still expects
creators/pagination, or the old legacy shape with a top-leveldataarray plus separatemeta.Small fix
Removed stray characters after the
tspec.configimport inapp.ts.Verification
Same as CI:
pnpm install --frozen-lockfile,pnpm exec prisma generate,pnpm lint,pnpm build.Closes: #63
Closes: #66
Closes: #64
Closes: #67