Skip to content

Creator public APIs: cache constants, query parsing, list envelope, and Prisma typings#71

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Jayrodri088:feat-creator-related-issues
Mar 28, 2026
Merged

Creator public APIs: cache constants, query parsing, list envelope, and Prisma typings#71
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Jayrodri088:feat-creator-related-issues

Conversation

@Jayrodri088
Copy link
Copy Markdown
Contributor

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

Area Details
Caching Creator-scoped presets and optional full Cache-Control strings live in creator-public-cache.constants.ts. Public GETs on creator list/profile routes use cacheControl(...) with those presets.
Query params List order is validated via creatorListSortDirectionQueryParam(). sort, search, and verified go through shared trim/normalize preprocessing so empty/whitespace-only strings behave like missing values before Zod runs.
List responses Success bodies use one envelope: items (array) and meta (pagination or list metadata), via wrapPublicCreatorListResponse. Both the newer creators list flow and the legacy paginated list route use sendSuccess with this shape so clients see the same structure.
Build / CI tsconfig maps @prisma/client types to the generated client under node_modules/.prisma/client so tsc does not pick up the minimal pnpm stub. The query-string Zod helper no longer uses an incorrect explicit ZodEffects return 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-level data array plus separate meta.

Small fix

Removed stray characters after the tspec.config import in app.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

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 27, 2026

@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! 🚀

Learn more about application limits

@Chucks1093 Chucks1093 merged commit 34389e4 into accesslayerorg:main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants