import type { IBundledHttpService, IHttpEndpointOperation, IHttpService } from '@stoplight/types'; import type { idGenerators } from './generators'; export declare type Fragment = Record; export declare type IdGenerator = (value: string, skipHashing?: boolean) => string; export declare type RefResolver = (this: TransformerContext, input: Fragment & { $ref: string; }) => unknown; export interface ITransformServiceOpts { document: T; ctx?: TransformerContext; } export declare type HttpServiceTransformer = (opts: T) => IHttpService; export declare type HttpServiceBundle = (opts: T) => IBundledHttpService; export declare type EndpointOperationConfig = { type: 'operation'; documentProp: 'paths'; nameProp: 'path'; } | { type: 'webhook'; documentProp: 'webhooks'; nameProp: 'name'; }; export interface ITransformEndpointOperationOpts { document: T; name: string; method: string; key?: string; config: EndpointOperationConfig; ctx?: TransformerContext; } export declare type HttpEndpointOperationTransformer = (opts: T) => TEndpoint; export declare type HttpSecurityKind = 'requirement' | 'scheme'; export declare type ArrayCallbackParameters = [T, number, T[]]; export declare type AvailableContext = 'service' | 'path' | 'operation' | 'callback' | 'webhook' | 'webhookName'; export declare type References = Record; export declare type TransformerContext = { document: T; context: AvailableContext; parentId: string; readonly ids: Omit, 'callback'>; readonly references: References; generateId: ((template: string) => string) & { [key in keyof typeof idGenerators]: (props: Omit[0], 'parentId'> & { parentId?: string; }) => string; }; maybeResolveLocalRef(target: unknown): unknown; }; export declare type TranslateFunction = (this: TransformerContext, ...params: P) => R;