import * as ts from 'typescript'; import { Request } from '../request'; import { FlowSuite } from '../flows'; import { Suite } from '../suite'; import { Ts } from '../ts'; import { EndpointMethod } from './plyex'; export interface MethodMeta { name: string; summary: string; description?: string; } /** * Raw info as parsed from plyex JSDoc tag. */ export interface PlyMeta { request?: string; responses?: { [key: string]: string[]; }; } export interface PlyEndpointMeta { operationId?: string; summaries: string[]; description?: string; plyMeta?: PlyMeta; examples?: { request?: string; responses?: { [key: string]: string[]; }; }; } export declare class PlyExampleRequest { readonly options?: { samplesFromActual?: boolean | undefined; } | undefined; readonly suitePath: string; readonly requestName: string; constructor(requestPath: string, options?: { samplesFromActual?: boolean | undefined; } | undefined); getSuite(): Promise | FlowSuite>; getExpected(): Promise; getActual(): Promise; getExampleRequest(): Promise; getExampleResponse(): Promise; private static requestSuites; private static flowSuites; private static expectedObjs; private static actualObjs; } export declare class JsDocReader { private ts; readonly sourceFile: ts.SourceFile; constructor(ts: Ts, sourceFile: ts.SourceFile); getPlyEndpointMeta(endpointMethod: EndpointMethod, tag?: string, untaggedMethods?: boolean, samplesFromActual?: boolean): Promise; /** * Summary is first line or sentence of a JSDoc comment, if any. * Description is the remainder. */ findMethodMeta(methodDeclaration: ts.MethodDeclaration): MethodMeta | undefined; readStringMeta(methodDeclaration: ts.MethodDeclaration, tag: string): string | undefined; readPlyMeta(className: string, methodDeclaration: ts.MethodDeclaration, tag: string): PlyMeta | undefined; }