UNPKG

@the_cfdude/productboard-mcp

Version:

Model Context Protocol server for Productboard REST API with dynamic tool loading

72 lines (71 loc) 1.93 kB
/** * Dynamic field selection utilities * Provides precise field specification to replace basic/standard/full detail levels */ export interface FieldSelectionConfig { fields?: string[]; exclude?: string[]; validateFields?: boolean; } export interface FieldValidationResult { valid: boolean; invalidFields?: string[]; suggestions?: string[]; error?: string; } /** * Field selection processor for precise response filtering */ export declare class FieldSelector { private entityFieldMaps; constructor(); /** * Initialize field mappings for different entity types */ private initializeFieldMaps; /** * Validate requested fields against entity schema */ validateFields(entityType: string, requestedFields: string[]): FieldValidationResult; /** * Apply field selection to response data */ selectFields(data: unknown, config: FieldSelectionConfig): unknown; /** * Select fields from a single object */ private selectFieldsFromObject; /** * Exclude specific fields from object */ private excludeFields; /** * Get nested value using dot notation (e.g., "owner.email") */ private getNestedValue; /** * Set nested value using dot notation */ private setNestedValue; /** * Delete nested value using dot notation */ private deleteNestedValue; /** * Suggest similar field names for typos */ private suggestSimilarField; /** * Calculate Levenshtein distance for typo suggestions */ private levenshteinDistance; /** * Get essential fields for an entity type (used as smart defaults) */ getEssentialFields(entityType: string): string[]; /** * Get all available fields for an entity type */ getAvailableFields(entityType: string): string[]; } export declare const fieldSelector: FieldSelector;