/** Any newable class (constructed by the container with no arguments). */ export type Ctor = new (...args: never[]) => T; /** The HTTP verbs a route decorator (`@get`, `@post`, …) can bind a handler to. */ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; /** * One route recorded by a verb decorator (`@get`/`@post`/…) on a controller * method. The array of these under {@link ROUTES} is read at mount time to build * the router. */ export interface RouteMeta { /** The HTTP verb the route answers, fixed by the verb decorator that recorded it (`@get`→`GET`, `@post`→`POST`, …). */ method: HttpMethod; /** The route path, relative to the controller's base path. */ path: string; /** Name of the controller method that handles the route. */ handlerName: string | symbol; /** Standard Schemas declared on the route decorator, if any. */ schemas?: import('./schema').RouteSchemas; /** OpenAPI metadata declared on the route decorator, if any. */ openapi?: import('./openapi').OperationMeta; } /** Metadata key: a bean's DI scope, written by `@injectable`/`@service`/`@repository` and read when the container constructs it. */ export declare const SCOPE: unique symbol; /** Metadata key: the array of {@link RouteMeta} a controller's verb decorators (`@get`/`@post`/…) record, read at mount time to build the router. */ export declare const ROUTES: unique symbol; /** Metadata key: the controller-wide `Guard[]` a class-level `@use` appends; applied to every route. */ export declare const CLASS_GUARDS: unique symbol; /** Metadata key: per-method `Guard[]` (a `Map` keyed by method name) a method-level `@use` appends. */ export declare const METHOD_GUARDS: unique symbol; /** Metadata key: the controller-wide `ErrorHandler[]` a class-level `@catchError` appends. */ export declare const CLASS_ERROR_HANDLERS: unique symbol; /** Metadata key: per-method `ErrorHandler[]` (a `Map` keyed by method name) a method-level `@catchError` appends. */ export declare const METHOD_ERROR_HANDLERS: unique symbol; /** Metadata key: the controller-wide `Deriver[]` a class-level `@derive` appends (run before guards). */ export declare const CLASS_DERIVERS: unique symbol; /** Metadata key: per-method `Deriver[]` (a `Map` keyed by method name) a method-level `@derive` appends. */ export declare const METHOD_DERIVERS: unique symbol; /** Metadata key: the controller-wide `Interceptor[]` a class-level `@intercept` appends. */ export declare const CLASS_INTERCEPTORS: unique symbol; /** Metadata key: per-method `Interceptor[]` (a `Map` keyed by method name) a method-level `@intercept` appends. */ export declare const METHOD_INTERCEPTORS: unique symbol; /** Metadata key: a controller's base path string, written by `@controller` and read at mount time. */ export declare const CONTROLLER_BASE: unique symbol; /** Metadata key: a class's `ModuleOptions`, written by `@module` and read when the module is expanded. */ export declare const MODULE: unique symbol; /** Metadata key: the method names marked `@postConstruct`, run by the container after construction. */ export declare const POST_CONSTRUCT: unique symbol; /** Metadata key: the method names marked `@preDestroy`, run in reverse construction order on `app.stop()`. */ export declare const PRE_DESTROY: unique symbol; /** Metadata key: the profile names a `@profile` gates mounting on, read at mount time. */ export declare const PROFILE: unique symbol; /** Metadata key: per-method before/after/around advice, written by `@before`/`@after`/`@around` (and `addAround`) and applied by `aspectProcessor`. */ export declare const ADVICE: unique symbol; /** Metadata key: the class-level `@macro` applications, expanded at mount time. */ export declare const CLASS_MACROS: unique symbol; /** Metadata key: per-method `@macro` applications (a `Map` keyed by method name), expanded at mount time. */ export declare const METHOD_MACROS: unique symbol; /** Metadata key: the controller-wide `Deriver[]` a class-level `@resolve` appends (run after input validation). */ export declare const CLASS_RESOLVERS: unique symbol; /** Metadata key: per-method `Deriver[]` (a `Map` keyed by method name) a method-level `@resolve` appends. */ export declare const METHOD_RESOLVERS: unique symbol; /** Metadata key: the `@onEvent` subscriptions on a class, read by the event-listener post-processor to wire them on construction. */ export declare const EVENT_LISTENERS: unique symbol; /** Metadata key: the set of method names to run in the bound `TransactionManager`, written by `@transactional` (and by `@repository` for every method) and applied by the transactional post-processor. */ export declare const TRANSACTIONAL: unique symbol; /** Metadata key: per-method `@cacheable` options (a `Map` keyed by method name), applied by the cache post-processor. */ export declare const CACHEABLE: unique symbol; /** Metadata key: the set of `@cacheEvict` method names, applied by the cache post-processor. */ export declare const CACHE_EVICT: unique symbol; /** Metadata key: per-method `@scheduled` options (a `Map` keyed by method name), read by the scheduling post-processor. */ export declare const SCHEDULED: unique symbol; /** * A decorator-metadata bag — the shared `Symbol.metadata` object that every * decorator on a class (and its members) reads and writes. Store your own * `Symbol`-keyed entries on it to coordinate between decorators (e.g. a class * decorator that reacts to markers left by member decorators). */ export type MetaBag = Record; /** * The shared metadata bag for the class being decorated, taken from a * decorator's `context`. Pair it with `addAround` (or your own bookkeeping) to * build custom decorators and plugins on the AOP seam. The runtime always * provides the bag during decoration, so the `undefined` is cast away. * * ```ts * function audited() { * return (cls, context: ClassDecoratorContext) => { * const meta = decoratorMeta(context) * for (const name of methodsOf(cls)) addAround(meta, name, advice) * } * } * ``` * * @param context - The decorator context whose shared `metadata` bag is returned. */ export declare function ctxMeta(context: { metadata: unknown; }): MetaBag; /** * The metadata bag attached to a class at runtime (`Class[Symbol.metadata]`), * or `undefined` if it carries none — the read side of {@link decoratorMeta}. Use it * in a container post-processor to inspect a class's decorator metadata and * decide whether (and how) to wrap its instances. * * @param target - The class whose attached metadata bag to read. * @returns The class's metadata bag, or `undefined` if it carries none. */ export declare function metadataOf(target: Ctor): MetaBag | undefined; //# sourceMappingURL=metadata.d.ts.map