Pass items endpoint data into item model [DR-3855]#453
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
We want to fully remove these manifest fetches, but in order to do so, I'll need to add more data to the existing items endpoint. In the meantime, get the ball rolling by using the items endpoint where I can and adding an interface to make the data types clearer.
emu47
reviewed
Sep 8, 2025
| orderInSequence: number; | ||
| } | ||
|
|
||
| export interface APIItem { |
emu47
reviewed
Sep 8, 2025
| } | ||
|
|
||
| static async getItemData(uuid: string) { | ||
| static async getItemData(uuid: string): Promise<APIItem> { |
Member
There was a problem hiding this comment.
like it ... just wondering if we're SURE we have ALL the fields we need in the ApiItem interface
Contributor
Author
There was a problem hiding this comment.
we don't yet! The page is still getting hydrated with both this and the manifest, this PR was just preliminary to split up some of the work. Once https://github.com/NYPL/collections-api/pull/243, I'll add a followup to this PR to completely cut out the manifest calls.
Member
|
I was able to click around a lot without any apparent issues. Not the most confident at understanding all the implications, but it looks good to me. |
emu47
approved these changes
Sep 8, 2025
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.
Ticket:
This PR does the following:
We want to fully remove these manifest fetches, but in order to do so, I'll need to add more data to the existing items endpoint. In the meantime, get the ball rolling by using the items endpoint where I can and adding an interface to make the data types clearer.
This also uses the new endpoint for all the fields we plan on removing from the manifest, so this will unblock that work
Open questions
How has this been tested? How should a reviewer test this?
Updated existing jest tests + clicked around
Accessibility concerns or updates
Checklist: