import { IPrism, IPrismComponents, IPrismProxyConfig, IPrismMockConfig } from '@stoplight/prism-core'; import { Overwrite } from 'utility-types'; import { Dictionary, HttpMethod, IHttpOperation, INodeExample, INodeExternalExample } from '@stoplight/types'; import type { JSONSchema7 } from 'json-schema'; import { Either } from 'fp-ts/Either'; export type PrismHttpInstance = IPrism; export type PrismHttpComponents = IPrismComponents; export interface IHttpOperationConfig { mediaTypes?: string[]; code?: number; exampleKey?: string; dynamic: boolean; ignoreExamples?: boolean; seed?: string; } export type IHttpMockConfig = Overwrite; export type IHttpProxyConfig = Overwrite; export type IHttpConfig = IHttpProxyConfig | IHttpMockConfig; export type IHttpNameValues = Dictionary; export type IHttpNameValue = Dictionary; export interface IHttpUrl { baseUrl?: string; path: string; query?: IHttpNameValues; } export interface IHttpRequest { method: HttpMethod; url: IHttpUrl; headers?: IHttpNameValue; body?: unknown; } export interface IHttpResponse { statusCode: number; headers?: IHttpNameValue; body?: unknown; } export type ProblemJson = { type: string; title: string; status: number; detail: string; }; export declare class ProblemJsonError extends Error { readonly name: string; readonly message: string; readonly status: number; readonly detail: string; readonly additional?: Dictionary | undefined; static fromTemplate(template: Omit, detail?: string, additional?: Dictionary): ProblemJsonError; static toProblemJson(error: Error & { detail?: string; status?: number; additional?: Dictionary; }): ProblemJson; constructor(name: string, message: string, status: number, detail: string, additional?: Dictionary | undefined); } export type ContentExample = INodeExample | INodeExternalExample; export type PayloadGenerator = (f: JSONSchema) => Either; export type PickRequired = Omit & Required>; export type JSONSchema = JSONSchema7;