Repository navigation
[TAS-6774] ✨ Add isPublicDomain to book listing - #1533
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
src/types/book.d.ts declares isLikerLandArt, isPublicDomain, and hasAiGeneratedContent twice each, causing a TS2300 duplicate-identifier error that breaks the build.
No open issues 🎉
What changed in this PR
This PR adds an isPublicDomain boolean flag to NFT book listings, wiring it through the request schema, business logic, response filter, response schema, and TypeScript types. Because it is based on #1532, the diff also carries the hasAiGeneratedContent and isLikerLandArt flags through the same layers. New tests exercise the read path and the settings-validation rejection path for these flags.
Changes:
- Add
isPublicDomain(plushasAiGeneratedContent/isLikerLandArt) to the listing settings request schema,newNftBookInfo/updateNftBookInfo, the/newand/settingsroutes, thefilterNFTBookListingInfoprojection, and the filtered response schema. - Extend the
NFTBookListingInfotype with the new flags. - Add two Vitest files covering flag read-back and non-boolean/one-way rejection.
| File | Description |
|---|---|
src/types/book.d.ts |
Adds the flags to the listing interface — but introduces duplicate property declarations. |
src/util/api/likernft/book/schemas.ts |
Adds flags to the settings request body and filtered response schemas. |
src/util/api/likernft/book/index.ts |
Threads flags through newNftBookInfo/updateNftBookInfo writes. |
src/routes/likernft/book/store.ts |
Destructures and forwards the flags in the /new and /settings handlers. |
src/util/ValidationHelper.ts |
Includes the flags in the filtered listing projection. |
test/api/likernft-book-boolean-flags.test.ts |
Parameterized tests for hasAiGeneratedContent and isPublicDomain. |
test/api/likernft-book-liker-land-art.test.ts |
Tests the one-way isLikerLandArt flag. |
Review effort: Balanced
nwingt
force-pushed
the
tas-6774
branch
3 times, most recently
from
October 22, 2026 06:58
3e0745c to
6bd2797
Compare
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.
No description provided.