Skip to content

[PB-6649]: feat/add advanced search filters to global search - #429

Open
victor-ferro wants to merge 4 commits into
masterfrom
PB-6649-advanced-search-filters
Open

[PB-6649]: feat/add advanced search filters to global search#429
victor-ferro wants to merge 4 commits into
masterfrom
PB-6649-advanced-search-filters

Conversation

@victor-ferro

@victor-ferro victor-ferro commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

In this PR we extend getGlobalSearchItems so it can receive an options object as its third argument, adding the new advanced search filters: type (file extensions, plus the reserved value folder to include folders, combined with OR), minSize/maxSize (in bytes, files only) and modifiedAfter/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 new GlobalSearchOptions type is accepted alongside number. We also added tests covering the personal and workspace fuzzy endpoints, the legacy numeric offset and the full serialization of the new filters.

@victor-ferro
victor-ferro marked this pull request as draft July 28, 2026 14:27
@victor-ferro

Copy link
Copy Markdown
Contributor Author

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: SearchFileCategory and GlobalSearchOptions are now derived from schema.ts instead of being hand-written, so the category list stays in sync with the backend contract automatically on every schema regeneration. Since the production gateway spec doesn't include the new params yet (and https://gateway.internxt.com/drive/api-json is currently returning 404, so yarn swagger is broken in general), the fuzzy-search operations in schema.ts were regenerated with openapi-typescript against a local backend running the PB-6630 branch. Once the backend is deployed, a regular yarn swagger run should produce the same result.

@victor-ferro
victor-ferro marked this pull request as ready for review July 29, 2026 12:43
@victor-ferro

Copy link
Copy Markdown
Contributor Author

Update: following the review discussion in drive-server-wip#1106, the backend no longer publishes file categories — the type param now takes plain file extensions (plus the reserved value folder). The schema has been regenerated accordingly, so GlobalSearchOptions['type'] is now string[] and the derived SearchFileCategory type is gone; the category-to-extensions mapping lives in drive-web.

@victor-ferro
victor-ferro requested a review from larryrider July 29, 2026 14:39
@larryrider

Copy link
Copy Markdown
Contributor

remember to bump the sdk package version if you are going to publish a new release

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