import { BaseError } from "@ebec/core"; import { ClassDeclaration, CompilerOptions, EnumDeclaration, EnumMember, Expression, HasInitializer, InterfaceDeclaration, JSDoc, JSDocComment, JSDocTag, LiteralTypeNode, MethodDeclaration, Node, NodeArray, ParameterDeclaration, PropertyDeclaration, PropertySignature, SyntaxKind, Token, TypeAliasDeclaration, TypeChecker, TypeNode, TypeReferenceNode } from "typescript"; import { BaseType, Controller, DecoratorArgument, DecoratorHost, DecoratorSource, DecoratorTarget, DependencyResolver, Extension, HandlerContext, IControllerGenerator, IParameterGenerator, IResolverCache, JsDocHandlerContext, JsDocMatch, JsDocSource, Match, Metadata, Method, NeverType, Parameter, Preset, PrimitiveType, RefEnumType, RefObjectType, ReferenceType, Registry, ResolverProperty, Type, UnmatchedDecoratorReport, Validator, VoidType } from "@trapi/core"; export interface CacheOptions { /** * Specify if the cache driver should be enabled. * * Default: false * */ enabled: boolean; /** * Directory relative or absolute path. Auto-created on first save. * * Default: tmpDir() */ directoryPath: string; /** * Specify the cache file name. When set, the cache becomes a single-slot * store at this exact name (instead of one file per cache key). The * in-file `cacheKey` check still rejects mismatches; you just lose * multi-key caching. * * Default: .trapi-metadata-{cacheKey}.json */ fileName?: string; /** * Files older than this many milliseconds are pruned opportunistically * after each successful save. Set to `0` to disable eviction. * * Default: 7 days */ maxAgeMs: number; } export type CacheOptionsInput = Partial; export type CacheData = { /** * Opaque composite key — sha256 over (schema version, source files content, * compiler options, resolved registry shape, preset name). The reader * cross-checks this against the expected key to defend against collisions * or schema drift. */ cacheKey: string; /** Stamped at write time; rejected on read if not equal to the current value. */ schemaVersion: string; } & Metadata; export interface ICacheClient { save(data: CacheData): Promise; get(cacheKey: string): Promise; /** Prune cache files older than `maxAgeMs`. Safe to call concurrently. */ evict(): Promise; } export type CacheKeyParts = { schemaVersion: string; sourceFilesHash: string; compilerOptionsHash: string; registryHash: string; presetName?: string; }; export declare class CacheClient implements ICacheClient { private readonly options; constructor(input?: string | boolean | CacheOptionsInput); save(data: CacheData): Promise; get(cacheKey: string): Promise; /** * Prune cache files older than `maxAgeMs`. No-op when disabled or when * `maxAgeMs <= 0`. Each unlink is best-effort — a concurrent generator * may have already removed the file. */ evict(): Promise; private resolveFilePath; private ensureDirectory; } /** * Bump whenever the on-disk cache shape changes incompatibly * (Metadata, Controller, Method, Parameter, resolver type nodes, * or the cache wrapper itself), OR whenever the generator starts * producing different metadata from unchanged input. No other * contributor to the cache key tracks the generator itself — the key * folds source text, compiler options, the registry and the preset * name, all of which a resolution fix leaves untouched — so without a * bump an upgrade keeps serving pre-fix metadata from a warm cache. * Old cache files with a different version are rejected on read. */ export declare const CACHE_SCHEMA_VERSION = "9"; export declare const CACHE_FILE_PREFIX = ".trapi-metadata-"; export declare const CACHE_FILE_SUFFIX = ".json"; /** 7 days. */ export declare const CACHE_DEFAULT_MAX_AGE_MS: number; export declare function buildCacheOptions(input?: string | boolean | CacheOptionsInput): CacheOptions; /** * Combines all key contributors into a single sha256 hex string. The order is * stable; each part is null-separated to avoid concatenation ambiguity. */ export declare function composeCacheKey(parts: CacheKeyParts): string; /** * Hash a stable JSON projection of `compilerOptions`. Sorting keys keeps the * output deterministic regardless of declaration order in tsconfig.json. */ export declare function hashCompilerOptions(options?: CompilerOptions): string; /** * Hash the resolved registry's structural shape. Catches structural changes * (handler added/removed/renamed, marker changed, replaces policy changed) * AND most logic changes via `apply.toString()`. Misses changes that are * purely captured-variable shifts in factory-built handlers — acceptable * trade-off for catching local preset edits. */ export declare function hashRegistry(registry: Registry): string; export type TsconfigLoadContext = { cwd?: string; name?: string; }; export type TsCompilerOptions = CompilerOptions; export type TsConfig = { compilerOptions?: TsCompilerOptions; [key: string]: any; }; export declare function loadTSConfig(context?: TsconfigLoadContext): Promise; export declare function softLoadTsconfig(context?: TsconfigLoadContext): Promise; type EntryPointOptions = { cwd: string; pattern: string; }; type EntryPoint = string | string[] | EntryPointOptions | EntryPointOptions[]; type MetadataGeneratorOptions = { /** * The entry point to your API. */ entryPoint: EntryPoint; /** * Directory to ignore during TypeScript files scan. * Default: [] */ ignore?: string[]; /** * Directory to allow during TypeScript files scan. * Default: [] */ allow?: string[]; /** * Directory to store and cache metadata cache files. * Default: false */ cache?: string | boolean | Partial; /** * Decorator preset to load. Either: * - a string identifier resolved via {@link resolvePresetByName} * (npm package, relative path, or `module:` specifier), or * - an inline {@link Preset} object (still walked through `loadRegistry`, * so its `extends` chain — if any — is resolved by name). * * If both `preset` and `registry` are provided, the resolved preset * registry comes first and the inline `registry` is appended after. * Inline handlers therefore run last (winning on scalar mutations like * `into('path')`) and additively contribute on `append`-style fields. */ preset?: string | Preset; /** * An already-resolved decorator {@link Registry}. Use this to wire * decorator handlers manually without authoring a full {@link Preset}. * * If provided alongside `preset`, the registry is appended to the * preset-derived registry (preset first, registry second). Inline * handlers cannot carry `replaces` semantics — those are enforced at * preset-load time. To remove a preset handler, author a `Preset` with * `replaces` and pass it via `preset` instead. */ registry?: Registry; /** * Controls how unmatched decorators (decorators with no matching handler * in the resolved registry) are surfaced. * * - `false` / unset (default): silent. * - `true`: emit a single `console.warn` listing every unmatched decorator * at the end of generation. Useful for catching typos (e.g. `@Hiden` * instead of `@Hidden`) and unwired decorators in custom presets. * - `'throw'`: throw a `GeneratorError` instead of warning. Useful as a * CI gate. * * If `onUnmatchedDecorator` is also set, the callback is invoked instead * of warning/throwing — collection still happens, but reporting is yours. * * Note: JSDoc tags are not currently included in strict-mode reporting * because standard documentation tags (`@param`, `@returns`, ...) would * generate excessive noise. */ strict?: boolean | 'throw'; /** * Optional callback invoked at the end of generation with all unmatched- * decorator reports collected during the run. Replaces the default * `console.warn` / `throw` behaviour of `strict` — when set, the callback * is the terminal step (no warn, no throw). * * Setting this implicitly enables collection — you don't also need to set * `strict`. */ onUnmatchedDecorator?: (reports: UnmatchedDecoratorReport[]) => void; }; type MetadataGenerateOptions = MetadataGeneratorOptions & { /** * Path to tsconfig.json or a TsConfig object. */ tsconfig?: string | TsConfig; }; type MetadataGeneratorContext = { options: MetadataGeneratorOptions; sourceFiles: string[]; compilerOptions?: CompilerOptions; }; interface IMetadataGenerator { generate(): Promise; } /** * Narrow context interface for the type resolver. * Contains only what TypeNodeResolver needs — no generator methods. */ interface IResolverContext { readonly typeChecker: TypeChecker; readonly nodes: Node[]; readonly registry: Registry; readonly resolverCache: IResolverCache; isExportedNode(node: Node): boolean; } /** * Callback interface for resolver → generator communication. * Allows the resolver to register discovered reference types * without importing the MetadataGenerator class. */ interface IReferenceTypeRegistry { addReferenceType(type: ReferenceType): void; getReferenceType(refName: string): ReferenceType | undefined; registerDependencyResolver(callback: DependencyResolver): void; } /** * Context interface for generators. * Extends IResolverContext and IReferenceTypeRegistry so generators * can pass `this.current` directly to TypeNodeResolver. */ interface IGeneratorContext extends IResolverContext, IReferenceTypeRegistry { readonly config: MetadataGeneratorOptions; readonly registry: Registry; /** * Optional sink for unmatched-decorator reports. Generators forward to * this when `config.strict` is enabled. The metadata generator drains the * sink after the controller walk and emits a single warning summary. */ reportUnmatchedDecorator?(report: UnmatchedDecoratorReport): void; } export declare class MetadataError extends BaseError {} export declare class ConfigError extends MetadataError {} export declare const ConfigErrorCode: { readonly TSCONFIG_MALFORMED: "CONFIG_TSCONFIG_MALFORMED"; readonly PRESET_NOT_FOUND: "CONFIG_PRESET_NOT_FOUND"; readonly PRESET_MISSING: "CONFIG_PRESET_MISSING"; }; export type ConfigErrorCode = typeof ConfigErrorCode[keyof typeof ConfigErrorCode]; export declare class GeneratorError extends MetadataError {} export declare function isGeneratorError(input: unknown): input is GeneratorError & { code: string; }; export declare const GeneratorErrorCode: { readonly CONTROLLER_NO_SOURCE_FILE: "GENERATOR_CONTROLLER_NO_SOURCE_FILE"; readonly CONTROLLER_NO_NAME: "GENERATOR_CONTROLLER_NO_NAME"; readonly PARAMETER_GENERATION_FAILED: "GENERATOR_PARAMETER_GENERATION_FAILED"; readonly BODY_PARAMETER_DUPLICATE: "GENERATOR_BODY_PARAMETER_DUPLICATE"; readonly BODY_FORM_CONFLICT: "GENERATOR_BODY_FORM_CONFLICT"; readonly STRICT_UNMATCHED_DECORATORS: "GENERATOR_STRICT_UNMATCHED_DECORATORS"; readonly SUCCESS_STATUS_INVALID: "GENERATOR_SUCCESS_STATUS_INVALID"; }; export type GeneratorErrorCode = typeof GeneratorErrorCode[keyof typeof GeneratorErrorCode]; type UnsupportedTypeContext = { decoratorName: string; propertyName: string; type: BaseType; node?: Node; }; type UnsupportedMethodContext = { decoratorName: string; propertyName: string; method: string; node?: Node; }; type PathMatchInvalidContext = { decoratorName: string; propertyName: string; path: string; node?: Node; }; type ScopeRequiredContext = { decoratorName: string; node?: Node; }; export declare class ParameterError extends MetadataError { static typeUnsupported(context: UnsupportedTypeContext): ParameterError; static methodUnsupported(context: UnsupportedMethodContext): ParameterError; static invalidPathMatch(context: PathMatchInvalidContext): ParameterError; static scopeRequired(context: ScopeRequiredContext): ParameterError; static invalidExampleSchema(): ParameterError; static getCurrentLocation(node: Node): string; } export declare const ParameterErrorCode: { readonly TYPE_UNSUPPORTED: "PARAMETER_TYPE_UNSUPPORTED"; readonly METHOD_UNSUPPORTED: "PARAMETER_METHOD_UNSUPPORTED"; readonly PATH_MISMATCH: "PARAMETER_PATH_MISMATCH"; readonly SCOPE_REQUIRED: "PARAMETER_SCOPE_REQUIRED"; readonly INVALID_EXAMPLE: "PARAMETER_INVALID_EXAMPLE"; }; export type ParameterErrorCode = typeof ParameterErrorCode[keyof typeof ParameterErrorCode]; export declare class ResolverError extends MetadataError { readonly file?: string; readonly line?: number; constructor(message: string, node?: Node | TypeNode, options?: boolean | { onlyCurrent?: boolean; cause?: unknown; }); } export declare function isResolverError(input: unknown): input is ResolverError; export declare function prettyLocationOfNode(node: Node | TypeNode): { text: string; file: string; line?: number; } | undefined; export declare function prettyTroubleCause(node: Node | TypeNode, onlyCurrent?: boolean): string; export declare class ValidatorError extends MetadataError {} export declare const ValidatorErrorCode: { readonly EXPECTED_NUMBER: "VALIDATOR_EXPECTED_NUMBER"; readonly EXPECTED_DATE: "VALIDATOR_EXPECTED_DATE"; readonly EXPECTED_STRING: "VALIDATOR_EXPECTED_STRING"; }; export type ValidatorErrorCode = typeof ValidatorErrorCode[keyof typeof ValidatorErrorCode]; export type OverrideToken = Token | Token | Token; export type UsableDeclaration = InterfaceDeclaration | ClassDeclaration | PropertySignature | TypeAliasDeclaration | EnumMember; export type TypeNodeResolverContext = { [name: string]: TypeReferenceNode | TypeNode; }; export type SubResolverContext = { readonly typeChecker: TypeChecker; readonly current: IResolverContext & IReferenceTypeRegistry; readonly parentNode?: Node; readonly context: TypeNodeResolverContext; readonly referencer?: TypeNode; resolveType(typeNode: TypeNode, parentNode?: Node, context?: TypeNodeResolverContext, referencer?: TypeNode): Type; propertyFromSignature(sig: PropertySignature, overrideToken?: OverrideToken): ResolverProperty; propertyFromDeclaration(decl: PropertyDeclaration | ParameterDeclaration, overrideToken?: OverrideToken): ResolverProperty; getNodeDescription(node: UsableDeclaration | PropertyDeclaration | ParameterDeclaration | EnumDeclaration): string | undefined; getNodeExample(node: UsableDeclaration | PropertyDeclaration | ParameterDeclaration | EnumDeclaration): unknown; getNodeExtensions(node: UsableDeclaration | PropertyDeclaration | ParameterDeclaration | EnumDeclaration): Extension[]; }; export declare function resolveArrayType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare class ResolverBase { protected hasPublicModifier(node: Node): boolean; protected hasStaticModifier(node: Node): boolean | undefined; protected isAccessibleParameter(node: Node): boolean; } export declare function resolveIndexedAccessType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function resolveIntersectionType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function resolveLiteralType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function getLiteralValue(typeNode: LiteralTypeNode): string | number | boolean | null; export declare function resolveMappedType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function resolveObjectLiteralType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare class PrimitiveResolver { protected registry: Registry; constructor(registry: Registry); resolve(node: TypeNode, parentNode?: Node): PrimitiveType | NeverType | VoidType | undefined; resolveSyntaxKind(syntaxKind: SyntaxKind): "string" | "boolean" | "void" | "undefined" | "null" | "number" | "bigint" | "never" | undefined; } export declare class ReferenceResolver extends ResolverBase { protected typeChecker: TypeChecker; constructor(typeChecker: TypeChecker); merge(referenceTypes: ReferenceType[]): ReferenceType; mergeManyRefEnums(many: RefEnumType[]): RefEnumType; mergeRefEnums(first: RefEnumType, second: RefEnumType): RefEnumType; mergeManyRefObjects(many: RefObjectType[]): RefObjectType; mergeRefObject(first: RefObjectType, second: RefObjectType): RefObjectType; transformEnum(declaration: EnumDeclaration, enumName: string): RefEnumType; transformEnumMember(declaration: EnumMember, enumName: string): RefEnumType; } export declare function resolveTupleType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function resolveTypeOperatorType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare function resolveUnionType(typeNode: TypeNode, ctx: SubResolverContext): Type | undefined; export declare class TypeNodeResolver extends ResolverBase { private static readonly MAX_DEPTH; private readonly typeNode; private readonly current; private readonly parentNode?; private context; private readonly referencer; private readonly depth; private readonly primitiveResolver; private readonly referenceResolver; constructor(typeNode: TypeNode, current: IResolverContext & IReferenceTypeRegistry, parentNode?: Node, context?: TypeNodeResolverContext, referencer?: TypeNode, depth?: number); /** * @deprecated Use resolverCache.clear() on the context instead. * Kept for backward compatibility — no-ops since cache is now instance-scoped. */ static clearCache(): void; resolve(): Type; private createSubResolverContext; private resolveNestedType; private throwUnknownType; private resolveConditionalType; private resolveTypeReference; private static readonly CHECKER_RESOLVABLE_UTILITY_TYPES; private static isCheckerResolvableUtilityType; private resolveUtilityTypeViaChecker; /** * Shared checker delegation: resolves a type node by letting the TS * type checker evaluate it, converting back to a TypeNode, and * recursively resolving the result. */ private resolveTypeViaChecker; /** * Check if a type reference has type arguments that reference unbound * type parameters from this.context (e.g. `Awaited` where T is a * generic parameter mapped in context). */ private hasUnboundContextArgs; private static resolveSpecialReference; private getDateType; private static getDesignatedModels; private getReferenceType; private getTypeAliasReference; private getModelReference; private static getRefTypeName; private contextualizedName; private createCircularDependencyResolver; private static nodeIsUsable; private getModelTypeDeclarations; private getModelTypeDeclaration; private hasFlag; private getSymbolAtLocation; private getModelProperties; private propertyFromSignature; private propertyFromDeclaration; private getModelAdditionalProperties; private typeArgumentsToContext; private getModelInheritedProperties; private getNodeDescription; private static getNodeFormat; private getNodeExample; protected getNodeExtensions(node: UsableDeclaration | PropertyDeclaration | ParameterDeclaration | EnumDeclaration): Extension[]; } export declare class ResolverCache implements IResolverCache { private referenceTypes; private inProgressTypes; getCachedType(name: string): ReferenceType | undefined; setCachedType(name: string, type: ReferenceType): void; isInProgress(name: string): boolean; markInProgress(name: string): void; clearInProgress(name: string): void; clear(): void; } export declare function getNodeDescription(node: Node, typeChecker: TypeChecker): string | undefined; export declare function toTypeNodeOrFail(typeChecker: TypeChecker, ...args: Parameters): TypeNode; export declare function getNodeExtensions(node: Node, registry: Registry): Extension[]; export interface NodeDecorator { text: string; arguments: any[]; typeArguments: any[]; } /** * Get Decorators for a specific node. * * @param node * @param isMatching */ export declare function getNodeDecorators(node: Node, isMatching?: (data: NodeDecorator) => boolean): NodeDecorator[]; export declare function getInitializerValue(initializer?: Expression, typeChecker?: TypeChecker, type?: Type): unknown; export declare const hasInitializer: (node: Node) => node is HasInitializer; export declare enum JSDocTagName { ABSTRACT = "abstract", ACCESS = "access", ALIAS = "alias", ASYNC = "async", /** * Alias for @extends */ AUGMENTS = "augments", AUTHOR = "author", DEFAULT = "default", DEPRECATED = "deprecated", DESCRIPTION = "description", EXAMPLE = "example", FORMAT = "format", IGNORE = "ignore", SUMMARY = "summary" } export declare function getJSDocDescription(node: Node, index?: number): string | undefined; export declare function getJSDoc(node: Node, index?: number): undefined | JSDoc; export declare function getJSDocTags(node: Node, isMatching?: `${JSDocTagName}` | `${JSDocTagName}`[] | (string & {}) | (string & {})[] | ((tag: JSDocTag) => boolean)): JSDocTag[]; export declare function hasJSDocTag(node: Node, tagName: ((tag: JSDocTag) => boolean) | `${JSDocTagName}` | (string & {})): boolean; export declare function getJSDocTagComment(node: Node, tagName: ((tag: JSDocTag) => boolean) | `${JSDocTagName}`): undefined | string; export declare function getJSDocTagNames(node: Node, requireTagName?: boolean): string[]; export declare function transformJSDocComment(input?: string | NodeArray): string | undefined; export declare function getDeclarationValidators(declaration: PropertyDeclaration | TypeAliasDeclaration | PropertySignature | ParameterDeclaration, name?: string): Record; export type ApplyHandlersOptions = { target: DecoratorTarget; host: DecoratorHost; resolveTypeNode: (node: TypeNode) => Type; parameterType?: () => Type | undefined; typeChecker?: TypeChecker; /** * Optional reporter for decorator sources that no handler matched. * The orchestrator builds a {@link DecoratorSource} for every decorator * on the node; if iteration finishes without any handler claiming a * source, this callback fires once for that source. */ onUnmatchedDecorator?: (report: UnmatchedDecoratorReport, source: DecoratorSource) => void; }; type DecoratorHandlerLike = { match: Match; apply: (ctx: HandlerContext, draft: D) => void; }; type JsDocHandlerLike = { match: JsDocMatch; apply: (ctx: JsDocHandlerContext, draft: D) => void; }; export declare function buildHandlerContext(source: DecoratorSource, options: ApplyHandlersOptions): HandlerContext; export declare function buildJsDocHandlerContext(source: JsDocSource, options: ApplyHandlersOptions): JsDocHandlerContext; export declare function applyDecoratorHandlers(node: Node, handlers: DecoratorHandlerLike[], draft: D, options: ApplyHandlersOptions): void; export declare function applyJsDocHandlers(node: Node, handlers: JsDocHandlerLike[], draft: D, options: ApplyHandlersOptions): void; export type DecoratorSourceBuilderOptions = { target: DecoratorTarget; host: DecoratorHost; resolveTypeNode: (node: TypeNode) => Type; typeChecker?: TypeChecker; }; export type JsDocSourceBuilderOptions = { target: DecoratorTarget; host: DecoratorHost; resolveTypeNode: (node: TypeNode) => Type; }; export type RawDecorator = { name: string; arguments: DecoratorArgument[]; }; export declare function buildDecoratorSources(node: Node, options: DecoratorSourceBuilderOptions): DecoratorSource[]; export declare function buildJsDocSources(node: Node, options: JsDocSourceBuilderOptions): JsDocSource[]; /** * Enumerate decorators on a TS node and classify their argument values without * going through the registry. Used by read-side consumers (type resolver, * extension extraction) that only need decorator names + argument values. */ export declare function readNodeDecorators(node: Node, typeChecker?: TypeChecker): RawDecorator[]; export declare function findDecoratorByName(node: Node, name: string, typeChecker?: TypeChecker): RawDecorator | undefined; export declare function findDecoratorsByName(node: Node, name: string, typeChecker?: TypeChecker): RawDecorator[]; export declare function hasDecoratorNamed(node: Node, name: string, typeChecker?: TypeChecker): boolean; export declare function buildDecoratorArgument(expr: Expression, typeChecker?: TypeChecker): DecoratorArgument; export declare function scanSourceFiles(input: EntryPoint): Promise; export declare function generateMetadata(options: MetadataGenerateOptions): Promise; export declare class MetadataGenerator implements IGeneratorContext, IMetadataGenerator { readonly nodes: Node[]; readonly typeChecker: TypeChecker; registry: Registry; readonly resolverCache: ResolverCache; readonly config: MetadataGeneratorOptions; private readonly program; private cache; private controllers; private referenceTypes; private circularDependencyResolvers; private unmatchedDecorators; constructor(context: MetadataGeneratorContext); generate(): Promise; private assertPresetProducedControllers; reportUnmatchedDecorator(report: UnmatchedDecoratorReport): void; private dispatchUnmatchedDecoratorReports; private formatUnmatchedSummary; protected buildNodesFromSourceFiles(): string; /** * Check if the source file path is in the ignored path list. * * @param filePath * @protected */ protected isIgnoredPath(filePath: string): boolean; /** * Check if the source file path is in the ignored path list. * * @param filePath * @protected */ protected isAllowedPath(filePath: string): boolean; isExportedNode(_node: Node): boolean; addReferenceType(referenceType: ReferenceType): void; getReferenceType(refName: string): ReferenceType | undefined; registerDependencyResolver(callback: DependencyResolver): void; private buildControllers; } export declare class ControllerGenerator implements IControllerGenerator { protected readonly node: ClassDeclaration; protected readonly current: IGeneratorContext; constructor(node: ClassDeclaration, current: IGeneratorContext); isValid(): boolean; generate(): Controller | null; private applyOptions; protected buildMethods(controllerPaths: string[], successProduces?: string[]): Method[]; private collectInheritedMethodDeclarations; private resolveBaseClassDeclaration; } export declare class MethodGenerator { protected readonly node: MethodDeclaration; protected readonly current: IGeneratorContext; constructor(node: MethodDeclaration, current: IGeneratorContext); getMethodName(): string; generate(controllerPaths: string[], controllerSuccessProduces?: string[]): Method | null; /** * `successStatus` comes from handler code, so a bad value (an empty string, * `String(undefined)` from a missing decorator argument) would otherwise * become a response key no OpenAPI document accepts. */ private assertSuccessStatus; private applyOptions; private resolveReturnType; private buildParameters; } export declare class ParameterGenerator implements IParameterGenerator { private readonly parameter; private readonly method; private readonly paths; private readonly current; constructor(parameter: ParameterDeclaration, method: string, paths: string[], current: IGeneratorContext); generate(): Parameter[]; private finalize; private draftToParameter; private decomposeObject; private pathContainsParam; private validatePathDecomposition; private validatePathName; private isLeafTypeSupported; private isLeafOrEnumOrUnion; private resolveType; private getParameterName; private getDescription; private getJsDocExamples; private applyOptions; } export declare function isStringArray(input: unknown): input is string[]; export declare function hasOwnProperty(obj: unknown, prop: Y): obj is Record; export declare function normalizePath(str: string): string; export type { EntryPoint, EntryPointOptions, IGeneratorContext, IMetadataGenerator, IReferenceTypeRegistry, IResolverContext, MetadataGenerateOptions, MetadataGeneratorContext, MetadataGeneratorOptions }; //# sourceMappingURL=index.d.mts.map