import { IChange, IFact, ObjectDiff, Result, RuleResult } from '@useoptic/openapi-utilities'; import { ExternalRuleBase } from '../rules/external-rule-base'; import { OpenAPIDocument, RuleContext } from '..'; import { OpenAPIFactNodes } from '../rule-runner/rule-runner-types'; type Lifecycle = 'added' | 'addedOrChanged' | 'changed' | 'always'; declare enum DiagnosticSeverity { Error = 0, Warning = 1, Information = 2, Hint = 3 } export interface SpectralResult { path: (string | number)[]; code: string | number; message: string; severity: DiagnosticSeverity; } export interface Spectral { run: (jsonSpec: any) => Promise; } export declare class SpectralRule extends ExternalRuleBase { private lifecycle; name: string; private rulesetPointer?; private flatSpecFile?; docsLink?: string; private spectral?; private matches?; constructor(options: { name: string; applies?: Lifecycle; rulesetPointer?: string; flatSpecFile?: string; docsLink?: string; matches?: (context: RuleContext) => boolean; spectral?: { run: (json: any) => Promise; }; }); runRulesV2(inputs: { context: any; diffs: ObjectDiff[]; fromSpec: OpenAPIDocument; toSpec: OpenAPIDocument; groupedFacts: OpenAPIFactNodes; }): Promise; runRules(inputs: { context: any; nextFacts: IFact[]; currentFacts: IFact[]; changelog: IChange[]; nextJsonLike: OpenAPIDocument; currentJsonLike: OpenAPIDocument; groupedFacts: OpenAPIFactNodes; }): Promise; } export {}; //# sourceMappingURL=spectral-rule.d.ts.map