[PB-6608] feat/add favorites support for files and folders#418
Open
victor-ferro wants to merge 1 commit into
Open
[PB-6608] feat/add favorites support for files and folders#418victor-ferro wants to merge 1 commit into
victor-ferro wants to merge 1 commit into
Conversation
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.
Description
Adds SDK support for the new Favorites feature in the Drive API (
drive-server-wip).New methods in the
Storageclass:PUT /files/{uuid}/favoritemarkFileAsFavorite(uuid)DELETE /files/{uuid}/favoriteunmarkFileAsFavorite(uuid)GET /files/favoritesgetFavoriteFiles(payload)(cancellable)PUT /folders/{uuid}/favoritemarkFolderAsFavorite(uuid)DELETE /folders/{uuid}/favoriteunmarkFolderAsFavorite(uuid)GET /folders/favoritesgetFavoriteFolders(payload)(cancellable)New types in
drive/storage/types.ts:FavoriteStatusResponse,FavoriteFileDto,FavoriteFolderDto,GetFavoriteFilesPayload,GetFavoriteFoldersPayload. Thepaginated folder-content types and the hand-written item interfaces now expose an
optional
isFavorite?: booleanreturned by the backend.Includes unit tests for all six methods following the existing request-shape pattern.
Notes
The backend PR adding
isFavoriteto the API is not deployed to production yet, so thegenerated
src/schema.tsdoes not include the field. This PR bridges that gap withmanual
& { isFavorite?: boolean }intersections on the schema-derived types — safe toship before and after the backend deploy.
Once the backend is live in production, I have a follow-up PR already prepared that runs
yarn swagger(the production spec will then documentisFavoriteand the favoritesendpoints) and reverts those intersections to plain schema-derived aliases. Already
verified locally against the updated backend: types compile and tests pass without the
intersections.