import {DiffInterceptor} from './diff'; export declare type Endpoint = | string | { url: string; method?: 'get' | 'GET' | 'post' | 'POST'; headers?: { [name: string]: string; }; }; export interface SchemaPointer { ref: string; path: string; } export interface LegacyConfig { diff?: boolean | Diff; notifications?: Notifications; endpoint?: string; schema: SchemaPointer; } export interface Notifications { slack?: string; discord?: string; webhook?: string; } interface Diff { annotations?: boolean; failOnBreaking?: boolean; intercept?: DiffInterceptor; } interface Environment { branch: string; endpoint?: string; diff?: Diff | boolean; notifications?: Notifications | boolean; } export interface NormalizedEnvironment { name: string; schema: string; branch: string; endpoint?: string; diff: Diff | false; notifications: Notifications | false; } interface SingleEnvironmentConfig extends Environment { schema: string; others?: { diff?: Diff | boolean; notifications?: Notifications | boolean; }; } interface MultipleEnvironmentConfig { schema: string; diff?: Diff | boolean; notifications?: Notifications | boolean; env: { [env: string]: Environment; }; others?: { diff?: Diff | boolean; notifications?: Notifications | boolean; }; } export declare type Config = | SingleEnvironmentConfig | MultipleEnvironmentConfig | LegacyConfig; export declare type NormalizedConfig = { [env: string]: NormalizedEnvironment; }; export declare type NormalizedLegacyConfig = { __default: NormalizedEnvironment; }; export declare const defaultConfigName = '__default'; export declare const defaultFallbackBranch = '*'; export declare function createConfig( rawConfig: Config, branches?: string[], fallbackBranch?: string, ): NormalizedEnvironment; export {};