interface ValidationResult { isValid: boolean; error?: string; suggestion?: string; } export declare class J1qlSyntaxError extends Error { readonly suggestion?: string | undefined; constructor(message: string, suggestion?: string | undefined); } export declare class J1QLValidator { /** * Statically validates a J1QL query using the same parser the JupiterOne query service runs * (@jupiterone/query-language-parser), so acceptance matches the server exactly. Purely local — * no backend call — which makes syntax failures instant instead of a wasted round-trip. */ validateQuery(query: string): ValidationResult; /** * Provides detailed error handling with suggestions */ handleQueryError(error: any, query: string): ValidationResult; /** * Consolidated error patterns for better maintainability */ private getErrorPatterns; /** * Analyzes generic "J1QL Query is invalid" errors for specific issues */ analyzeSyntaxError(query: string, _errorMessage: string): string; /** * All syntax-check messages matching the query. `includeBroad: false` restricts to the * high-precision checks — constructs that are always invalid J1QL — which are safe to * append to an unrelated primary error; the `broad` checks are guesses that only make * sense when the error itself gave no better signal. */ private knownIssues; /** * Query-aware suggestions for timeout and abort errors. Recovery keeps the caller's intent: * lead with retry-as-is (results are computed async and briefly cached server-side, so an * identical re-run often attaches to the finished result), then suggest rewrites that make the * same question cheaper — never advise abandoning wildcard discovery or deep traversal outright. */ analyzeTimeoutError(query: string): string; /** * Provides generic suggestions based on query structure */ private getGenericSuggestions; } export {}; //# sourceMappingURL=j1ql-validator.d.ts.map