@the_cfdude/productboard-mcp
Version:
Model Context Protocol server for Productboard REST API with dynamic tool loading
82 lines (81 loc) • 2.5 kB
TypeScript
/**
* Core search engine that handles entity searches and result processing
*/
import { SearchParams, NormalizedSearchParams, SearchResults } from '../types/search-types.js';
export declare class SearchEngine {
private entityMappings;
private outputProcessor;
/**
* Validate and normalize search parameters
*/
validateAndNormalizeParams(params: SearchParams): Promise<NormalizedSearchParams>;
/**
* Execute search against the appropriate entity endpoint(s)
*/
executeEntitySearch(_context: any, params: NormalizedSearchParams): Promise<SearchResults>;
/**
* Execute search for a single entity type
*/
private executeSingleEntitySearch;
/**
* Process raw results with filtering and output formatting
*/
processResults(rawResults: SearchResults, params: NormalizedSearchParams): Promise<SearchResults>;
/**
* Check if a field is searchable for the given entity type
*/
private isFieldSearchable;
/**
* Validate filters for multiple entity types
*/
private validateFiltersForMultipleTypes;
/**
* Validate output fields for multiple entity types
*/
private validateOutputFieldsForMultipleTypes;
/**
* Validate operator fields and values
*/
private validateOperators;
/**
* Build parameters for the underlying list function
*/
private buildListParams;
/**
* Check if a filter can be applied server-side
*/
private canFilterServerSide;
/**
* Map filter field to API parameter name
*/
private mapFilterToApiParam;
/**
* Route to appropriate entity handler with pagination support
*/
private routeToEntityHandler;
/**
* Parse response from tool handlers
*/
private parseHandlerResponse;
/**
* Apply client-side filtering for complex operators
*/
private applyClientSideFiltering;
/**
* Handle hierarchical filtering for cross-entity relationships
* Inspects actual parent object structure rather than assuming fixed hierarchy
*/
private handleHierarchicalFiltering;
/**
* Get nested field value using dot notation (helper for debugging)
*/
private getNestedFieldValue;
/**
* Normalize filter values
*/
private normalizeFilterValue;
/**
* Generate smart suggestions when no results are found
*/
generateSmartSuggestions(params: NormalizedSearchParams): Promise<any[]>;
}