Feat/creator utils 28 29 30 31#38
Merged
Chucks1093 merged 5 commits intoMar 26, 2026
Merged
Conversation
- parse verified and search filter inputs from raw query objects - reject unsupported filter keys with a descriptive error - keep parser pure and reusable across list handlers
- normalize casing, spacing, and special characters in creator handles - idempotent: repeated calls with same input return same result - small and reusable across creator flows
- define PublicCreatorStats shape for public endpoints - serializePublicCreatorStats formats CreatorMetrics for API responses - reusable across creator endpoints with one consistent output shape
- centralize DEFAULT_PAGE_SIZE, DEFAULT_PAGE, DEFAULT_OFFSET, MAX_PAGE_SIZE, MIN_PAGE_SIZE - reusable for all current and future list endpoints - single source of truth for pagination defaults
|
@caxtonacollins 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.
feat: creator utils — filter parser, handle normalizer, public stats helper, pagination constants
Closes #28
Closes #29
Closes #30
Closes #31
What's in this PR
#28 — Creator filter parser (
creators.filter.ts)Parses
verifiedandsearchfilter inputs from raw query objects. Rejects unsupported filter keys with a clear error. Pure function, reusable across any list handler.#29 — Handle normalization helper (
creators.handle.ts)normalizeCreatorHandlelowercases, trims, and strips unsupported characters from creator handles. Idempotent — same input always returns the same output.#30 — Public creator stats helper (
creators.stats.ts)serializePublicCreatorStatsformats internalCreatorMetricsinto aPublicCreatorStatsshape. One consistent response structure for all public creator endpoints.#31 — Pagination constants module (
src/constants/pagination.constants.ts)Centralizes
DEFAULT_PAGE_SIZE,DEFAULT_PAGE,DEFAULT_OFFSET,MAX_PAGE_SIZE, andMIN_PAGE_SIZE. Single source of truth — easy to update across all list endpoints.Notes
creator.utils.ts,wallet.types.ts, andprisma.utils.tsare unrelated to this PR (Prisma client not generated in dev environment)