import { Enum, Interface, Method, Parameter, Property, ReturnValue, Service, Type, ValidationRule } from '../ir'; export type ChangeKind = 'added' | 'changed' | 'increased' | 'decreased' | 'removed'; export type ChangeTarget = InterfaceChangeTarget | MethodChangeTarget | ParameterChangeTarget | ReturnTypeChangeTarget | TypeChangeTarget | PropertyChangeTarget | EnumChangeTarget | RuleChangeTarget; declare const interfaceChangeTarget: readonly ["interface", "interface-name-casing", "interface-description", "interface-deprecated"]; export type InterfaceChangeTarget = typeof interfaceChangeTarget[number]; export declare function isInterfaceChangeTarget(changeTarget: ChangeTarget): changeTarget is InterfaceChangeTarget; declare const methodChangeTarget: readonly ["method", "method-name-casing", "method-description", "method-deprecated"]; export type MethodChangeTarget = typeof methodChangeTarget[number]; export declare function isMethodChangeTarget(changeTarget: ChangeTarget): changeTarget is MethodChangeTarget; declare const parameterChangeTarget: readonly ["parameter", "parameter-name-casing", "parameter-description", "parameter-deprecated", "parameter-type", "parameter-type-array", "parameter-type-primitive"]; export type ParameterChangeTarget = typeof parameterChangeTarget[number]; export declare function isParameterChangeTarget(changeTarget: ChangeTarget): changeTarget is ParameterChangeTarget; declare const returnsChangeTarget: readonly ["returns", "returns-array", "returns-primitive"]; export type ReturnTypeChangeTarget = typeof returnsChangeTarget[number]; export declare function isReturnTypeChangeTarget(changeTarget: ChangeTarget): changeTarget is ReturnTypeChangeTarget; declare const typeChangeTarget: readonly ["input-type", "input-type-name-casing", "input-type-description", "input-type-deprecated", "output-type", "output-type-name-casing", "output-type-description", "output-type-deprecated"]; export type TypeChangeTarget = typeof typeChangeTarget[number]; export declare function isTypeChangeTarget(changeTarget: ChangeTarget): changeTarget is TypeChangeTarget; declare const propertyChangeTarget: readonly ["input-property", "input-property-name-casing", "input-property-description", "input-property-deprecated", "input-property-type", "input-property-type-array", "input-property-type-primitive", "output-property", "output-property-name-casing", "output-property-description", "output-property-deprecated", "output-property-type", "output-property-type-array", "output-property-type-primitive"]; export type PropertyChangeTarget = typeof propertyChangeTarget[number]; export declare function isPropertyChangeTarget(changeTarget: ChangeTarget): changeTarget is PropertyChangeTarget; declare const enumChangeTarget: readonly ["input-enum", "input-enum-name-casing", "input-enum-description", "input-enum-deprecated", "input-enum-member", "input-enum-member-casing", "input-enum-member-description", "input-enum-member-deprecated", "output-enum", "output-enum-name-casing", "output-enum-description", "output-enum-deprecated", "output-enum-member", "output-enum-member-casing", "output-enum-member-description", "output-enum-member-deprecated"]; export type EnumChangeTarget = typeof enumChangeTarget[number]; export declare function isEnumChangeTarget(changeTarget: ChangeTarget): changeTarget is EnumChangeTarget; type RuleChangeTarget = ValidationRule['id']; export declare function isRuleChangeTarget(changeTarget: ChangeTarget): changeTarget is RuleChangeTarget; export type ChangeContext = ServiceContext | InterfaceContext | MethodContext | ParameterContext | ReturnValueContext | TypeContext | PropertyContext | EnumContext; export type ServiceContext = { scope: 'service'; service: string; }; export type ServiceScope = { service: Service; }; export type InterfaceContext = Omit & { scope: 'interface'; interface: string; }; export type InterfaceScope = ServiceScope & { interface: Interface; }; export type MethodContext = Omit & { scope: 'method'; method: string; }; export type MethodScope = InterfaceScope & { method: Method; }; export type ParameterContext = Omit & { scope: 'parameter'; parameter: string; required: boolean; }; export type ParameterScope = MethodScope & { parameter: Parameter; }; export type ReturnValueContext = Omit & { scope: 'returns'; returns: string; }; export type ReturnValueScope = MethodScope & { returns: ReturnValue; }; export type TypeContext = Omit & { scope: 'input-type' | 'output-type'; type: string; }; export type TypeScope = ServiceScope & { type: Type; }; export type PropertyContext = Omit & { scope: 'input-property' | 'output-property'; property: string; required: boolean; }; export type PropertyScope = TypeScope & { property: Property; }; export type EnumContext = Omit & { scope: 'input-enum' | 'output-enum'; enum: string; }; export type EnumScope = ServiceScope & { enum: Enum; }; export type RuleContext = PropertyContext | ReturnValueContext | ParameterContext; export type RuleScope = PropertyScope | ReturnValueScope | ParameterScope; type Primitive = string | number | boolean | null; export type ChangeState = { context: Context; value: Primitive | Primitive[] | undefined; loc?: string; }; export type AAA = {}; type ChangeInfoKind = { kind: ChangeKind; target: Target; category: Category; a?: ChangeState; b?: ChangeState; }; export type ChangeInfo = InterfaceChangeInfo | MethodChangeInfo | ParameterChangeInfo | ReturnTypeChangeInfo | TypeChangeInfo | PropertyChangeInfo | EnumChangeInfo | RuleChangeInfo; export type InterfaceChangeInfo = ChangeInfoKind; export declare function isInterfaceChangeInfo(changeInfo: ChangeInfo): changeInfo is InterfaceChangeInfo; export type MethodChangeInfo = ChangeInfoKind; export declare function isMethodChangeInfo(changeInfo: ChangeInfo): changeInfo is MethodChangeInfo; export type ParameterChangeInfo = ChangeInfoKind; export declare function isParameterChangeInfo(changeInfo: ChangeInfo): changeInfo is ParameterChangeInfo; export type ReturnTypeChangeInfo = ChangeInfoKind; export declare function isReturnTypeChangeInfo(changeInfo: ChangeInfo): changeInfo is ReturnTypeChangeInfo; export type TypeChangeInfo = ChangeInfoKind; export declare function isTypeChangeInfo(changeInfo: ChangeInfo): changeInfo is TypeChangeInfo; export type PropertyChangeInfo = ChangeInfoKind; export declare function isPropertyChangeInfo(changeInfo: ChangeInfo): changeInfo is PropertyChangeInfo; export type EnumChangeInfo = ChangeInfoKind; export declare function isEnumChangeInfo(changeInfo: ChangeInfo): changeInfo is EnumChangeInfo; export type RuleChangeInfo = ChangeInfoKind; export declare function isRuleChangeInfo(changeInfo: ChangeInfo): changeInfo is RuleChangeInfo; export declare function diff(a: Service, b: Service): ChangeInfo[]; export type Category = 'major' | 'minor' | 'patch'; export {};