[PB-6649]: feat/add advanced search filters to global search - #429
[PB-6649]: feat/add advanced search filters to global search#429victor-ferro wants to merge 4 commits into
Conversation
…al search types from it
…arch-filters # Conflicts: # src/drive/storage/types.ts
|
Marked as draft: this PR depends on the backend counterpart (drive-server-wip#1106 / #1107), which defines the new fuzzy-search query params. It shouldn't be published until those are merged and deployed. Note on the last commits: |
|
Update: following the review discussion in drive-server-wip#1106, the backend no longer publishes file categories — the |
|
remember to bump the sdk package version if you are going to publish a new release |
In this PR we extend
getGlobalSearchItemsso it can receive an options object as its third argument, adding the new advanced search filters:type(file extensions, plus the reserved valuefolderto include folders, combined with OR),minSize/maxSize(in bytes, files only) andmodifiedAfter/modifiedBefore(ISO 8601 dates), all serialized as query params and combined with AND by the backend. The category-to-extensions mapping lives in the client (drive-web), so the SDK stays agnostic. The change is backwards compatible: passing a numeric offset as before still works, since the newGlobalSearchOptionstype is accepted alongsidenumber. We also added tests covering the personal and workspace fuzzy endpoints, the legacy numeric offset and the full serialization of the new filters.