import { Enum, Interface, Method, HttpMethod, Parameter, HttpParameter, HttpRoute, Property, Service, Type, Union, EnumMember } from './ir'; import { Rule, Severity, Violation } from './types'; export type ContextIterator = (service: Service, options: any) => Context[]; export interface ServiceRuleContext { service: Service; options: any; } export declare function serviceRule(rule: (context: ServiceRuleContext) => Violation | undefined): Rule; export interface InterfaceRuleContext extends ServiceRuleContext { interface: Interface; } export declare function interfaceRule(rule: (context: InterfaceRuleContext) => Violation | undefined): Rule; export declare const allInterfaces: ContextIterator; export interface MethodRuleContext extends InterfaceRuleContext { method: Method; httpMethod?: HttpMethod; } export declare function methodRule(rule: (context: MethodRuleContext) => Violation | undefined): Rule; export declare const allMethods: ContextIterator; export interface HttpRouteRuleContext extends InterfaceRuleContext { httpRoute: HttpRoute; } export declare function httpPathRule(rule: (context: HttpRouteRuleContext) => Violation | undefined): Rule; export declare const allHttpRoutes: ContextIterator; export interface ParameterRuleContext extends MethodRuleContext { parameter: Parameter; httpParameter?: HttpParameter; } export declare function parameterRule(rule: (context: ParameterRuleContext) => Violation | undefined): Rule; export declare const allParameters: ContextIterator; export interface TypeRuleContext extends ServiceRuleContext { type: Type; } export declare function typeRule(rule: (context: TypeRuleContext) => Violation | undefined): Rule; export declare const allTypes: ContextIterator; export interface PropertyRuleContext extends TypeRuleContext { property: Property; } export declare function propertyRule(rule: (context: PropertyRuleContext) => Violation | undefined): Rule; export declare const allProperties: ContextIterator; export interface EnumRuleContext extends ServiceRuleContext { enum: Enum; } export declare function enumRule(rule: (context: EnumRuleContext) => Violation | undefined): Rule; export declare const allEnums: ContextIterator; export interface EnumMemberRuleContext extends EnumRuleContext { member: EnumMember; } export declare function enumValueRule(rule: (context: EnumMemberRuleContext) => Violation | undefined): Rule; export declare const allEnumMembers: ContextIterator; export interface UnionRuleContext extends ServiceRuleContext { union: Union; } export declare function unionRule(rule: (context: UnionRuleContext) => Violation | undefined): Rule; export declare const allUnions: ContextIterator; export declare function combineRules(...rules: Rule[]): Rule; export declare function parseSeverity(input: any, fallback?: Severity): Severity; export declare function getHttpMethodByName(service: Service, methodName: string | undefined): HttpMethod | undefined; export declare function getTypeByName(service: Service, typeName: string | undefined): Type | undefined; export declare function getEnumByName(service: Service, enumName: string | undefined): Enum | undefined; export declare function getUnionByName(service: Service, unionName: string | undefined): Union | undefined;