import type { DynamicModule, FactoryProvider, MiddlewareConsumer, ModuleMetadata, NestModule } from "@nestjs/common"; import { Inject } from "@nestjs/common"; import type { CreateFilesRouterOptions, FilesApi } from "../api/index.js"; import type { Files } from "../index.js"; /** Injection token for the configured `Files` instance — see `InjectFiles()`. */ export declare const FILES: unique symbol; /** Injection token for the mounted gateway router — for manual wiring or tests. */ export declare const FILES_API: unique symbol; export interface FilesModuleOptions extends Omit { /** * The `Files` instance shared through DI and served by the gateway. The * per-request factory form of `CreateFilesRouterOptions.files` is not * supported here (there is no single instance to provide) — mount * `files-sdk/express` manually for multi-tenant routing. */ files: Files; /** Register as a global module so `InjectFiles()` works everywhere without importing `FilesModule`. Default true. */ global?: boolean; /** Mount path for the gateway endpoint. Default `"/api/files"`. */ path?: string; } /** * What `forRootAsync`'s factory returns: everything but `global`, which the * `DynamicModule` needs *before* the factory runs and so lives on * `FilesModuleAsyncOptions` itself — a `global` returned from the factory * could only be silently ignored, so the type forbids it. */ export type FilesModuleFactoryResult = Omit; export interface FilesModuleAsyncOptions extends Pick { /** Same as `FilesModuleOptions.global`; lives here because a `DynamicModule` needs it before the factory runs. Default true. */ global?: boolean; inject?: FactoryProvider["inject"]; useFactory: (...args: never[]) => FilesModuleFactoryResult | Promise; } /** Constructor-parameter decorator injecting the configured `Files` instance. */ export declare const InjectFiles: () => ReturnType; export declare class FilesModule implements NestModule { static forRoot(options: FilesModuleOptions): DynamicModule; static forRootAsync(options: FilesModuleAsyncOptions): DynamicModule; private readonly options; private readonly api; constructor(options: FilesModuleOptions, api: FilesApi); configure(consumer: MiddlewareConsumer): void; } //# sourceMappingURL=index.d.ts.map