@seekora-ai/ui-sdk-core 0.2.30 → 0.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -1
- package/dist/index.esm.js +24 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeConfig, Theme } from '@seekora-ai/ui-sdk-types';
|
|
2
|
-
import { SearchResponse, SeekoraClient, SearchOptions, FilterOptions, FiltersResponse, FacetValuesSearchResponse, FiltersSchemaResponse } from '@seekora-ai/search-sdk';
|
|
2
|
+
import { SearchResponse, SeekoraClient, SearchOptions, FilterOptions, FiltersResponse, FacetValuesSearchResponse, FiltersSchemaResponse, MultiSearchQuery, MultiSearchResponse } from '@seekora-ai/search-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Field Mapping Utilities
|
|
@@ -367,6 +367,15 @@ declare class SearchStateManager {
|
|
|
367
367
|
searchFacetValues(facetName: string, query: string): Promise<FacetValuesSearchResponse>;
|
|
368
368
|
/** Get filter schema (for UI initialization) */
|
|
369
369
|
getFiltersSchema(): Promise<FiltersSchemaResponse>;
|
|
370
|
+
/**
|
|
371
|
+
* Execute multiple search queries in a single request.
|
|
372
|
+
* Each result gets its own SearchContext for independent analytics tracking.
|
|
373
|
+
* Useful for federated search (e.g., products + articles + suggestions in one call).
|
|
374
|
+
*
|
|
375
|
+
* @param queries - Array of 1-10 search queries
|
|
376
|
+
* @returns MultiSearchResponse with per-query results
|
|
377
|
+
*/
|
|
378
|
+
multiSearch(queries: MultiSearchQuery[]): Promise<MultiSearchResponse>;
|
|
370
379
|
clear(): void;
|
|
371
380
|
}
|
|
372
381
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1780,6 +1780,30 @@ class SearchStateManager {
|
|
|
1780
1780
|
throw error;
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Execute multiple search queries in a single request.
|
|
1785
|
+
* Each result gets its own SearchContext for independent analytics tracking.
|
|
1786
|
+
* Useful for federated search (e.g., products + articles + suggestions in one call).
|
|
1787
|
+
*
|
|
1788
|
+
* @param queries - Array of 1-10 search queries
|
|
1789
|
+
* @returns MultiSearchResponse with per-query results
|
|
1790
|
+
*/
|
|
1791
|
+
async multiSearch(queries) {
|
|
1792
|
+
log.verbose('SearchStateManager: Performing multi-search', { queryCount: queries.length });
|
|
1793
|
+
try {
|
|
1794
|
+
const response = await this.client.multiSearch(queries);
|
|
1795
|
+
log.info('SearchStateManager: Multi-search completed', {
|
|
1796
|
+
queryCount: queries.length,
|
|
1797
|
+
totalResults: response.results.map((r) => r.totalResults),
|
|
1798
|
+
});
|
|
1799
|
+
return response;
|
|
1800
|
+
}
|
|
1801
|
+
catch (err) {
|
|
1802
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
1803
|
+
log.error('SearchStateManager: Multi-search failed', { error: error.message });
|
|
1804
|
+
throw error;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1783
1807
|
// Clear all state
|
|
1784
1808
|
clear() {
|
|
1785
1809
|
this.state = {
|