import type { JupiterOneClient } from '../../client/jupiterone-client.js'; import type { Query } from '../../types/jupiterone.js'; import type { ToolResult } from './types.js'; /** * Static checks against documented product behaviour, run before a widget is written. * * A different certainty class from the value diagnosis: these are facts about what JupiterOne * Insights supports, stable on product-release timescales, not point-in-time facts about an * account's data. That is why one of them blocks and the others inform. */ export interface WidgetConfigFinding { code: 'managed-board' | 'markdown-without-text' | 'percentage-line-without-x' | 'percentage-numerator-unmatched' | 'percentage-total-empty' | 'percentage-without-total' | 'trend-with-parameters' | 'trend-has-no-history' | 'unsupported-chart-type'; blocking: boolean; message: string; } /** * Check a widget's configuration against documented product behaviour. * * Returns findings in severity order — every blocking finding precedes the advisory ones, so the * rejection's `lintCode` names the first real reason. A finding blocks only where the widget is * verified to draw nothing (`managed-board`, `markdown-without-text`, `unsupported-chart-type`) or * to draw a number that is provably not the one asked for (`percentage-numerator-unmatched`). */ export declare function lintWidgetConfig(client: JupiterOneClient, dashboardId: string, input: { type?: string; config?: { queries?: Query[]; settings?: unknown; }; } | undefined, operation: 'create' | 'update'): Promise; /** * The rejection an agent receives for a blocking configuration finding. * * Carries `lintCode` so the telemetry chokepoint can count blocks by cause rather than * string-matching the message, the same way the render-contract gate carries `contractOk`. Error * results are exempt from output-schema validation, so it never reaches a client validator. */ export declare function widgetConfigErrorResponse(operation: 'create' | 'update', findings: WidgetConfigFinding[]): ToolResult; //# sourceMappingURL=widget-config-lint.d.ts.map