Skip to content

[TAS-6774] ✨ Add isPublicDomain to book listing - #1533

Merged
nwingt merged 1 commit into
likecoin:masterfrom
nwingt:tas-6774
Oct 22, 2026
Merged

nwingt merged 1 commit into
likecoin:masterfrom
nwingt:tas-6774

Conversation

@nwingt

@nwingt nwingt commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

No description provided.

@notion-workspace

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 (plus hasAiGeneratedContent/isLikerLandArt) to the listing settings request schema, newNftBookInfo/updateNftBookInfo, the /new and /settings routes, the filterNFTBookListingInfo projection, and the filtered response schema.
  • Extend the NFTBookListingInfo type 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
nwingt force-pushed the tas-6774 branch 3 times, most recently from 3e0745c to 6bd2797 Compare October 22, 2026 06:58
@nwingt
nwingt requested a balanced review from Copilot October 22, 2026 07:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The new field is wired symmetrically through every layer matching the already-approved hasAIGeneratedContent pattern, with test coverage and no identified defects.

No open issues 🎉

Review effort: Balanced

@nwingt
nwingt merged commit 33370f3 into likecoin:master Oct 22, 2026
2 checks passed
@nwingt
nwingt deleted the tas-6774 branch October 22, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants