feat(search): add global titlebar search filters

This commit is contained in:
2026-07-29 22:01:18 +02:00
parent 6fcd9e0e65
commit bed704eb7a
8 changed files with 477 additions and 61 deletions
+31
View File
@@ -43,6 +43,26 @@ export type SearchResponse = {
has_more: boolean;
};
export type SearchProvider = {
id: string;
module_id: string;
resource_types: string[];
order: number;
};
export type SearchResourceType = {
provider_id: string;
module_id: string;
resource_type: string;
label: string;
order: number;
};
export type SearchProviderListResponse = {
providers: SearchProvider[];
resources: SearchResourceType[];
};
export type SearchRequest = {
query: string;
modules?: string[];
@@ -76,3 +96,14 @@ export function search(
{ signal }
);
}
export function listSearchProviders(
settings: ApiSettings,
signal?: AbortSignal
): Promise<SearchProviderListResponse> {
return apiFetch<SearchProviderListResponse>(
settings,
"/api/v1/search/providers",
{ signal }
);
}