/** * NestJS Streaming Module * * Provides SSE streaming integration for NestJS applications. * Can be used standalone or integrated with CoreModule. * * @example Standalone usage * ```typescript * import { StreamingModule } from '@plyaz/core/nestjs'; * import { FilesStreamEndpoint, SystemStreamEndpoint } from '@plyaz/core/streaming'; * * @Module({ * imports: [ * StreamingModule.forRoot({ * server: { heartbeatInterval: 30000 }, * endpoints: [ * { endpoint: FilesStreamEndpoint, config: { enabled: true } }, * { endpoint: SystemStreamEndpoint, config: { enabled: true } }, * ], * }), * ], * }) * export class AppModule {} * ``` * * @example Async configuration * ```typescript * StreamingModule.forRootAsync({ * imports: [ConfigModule], * useFactory: (config: ConfigService) => ({ * server: { * heartbeatInterval: config.get('STREAM_HEARTBEAT_INTERVAL'), * }, * endpoints: [...], * }), * inject: [ConfigService], * }) * ``` */ import type { DynamicModule, OnModuleDestroy } from '@nestjs/common'; import { StreamServer } from '../../events/streaming'; import type { StreamingModuleConfig, StreamingModuleAsyncOptions } from '@plyaz/types/core'; /** * StreamingModule - NestJS streaming integration * * Provides: * - StreamServer instance with SSE transport * - StreamingController for /events/stream endpoint * - StreamRegistry initialization with endpoints * - Automatic cleanup on module destroy */ export declare class StreamingModule implements OnModuleDestroy { private static streamServer; onModuleDestroy(): Promise; /** * Register StreamingModule with static configuration */ static forRoot(config?: StreamingModuleConfig): DynamicModule; /** * Register StreamingModule with async configuration */ static forRootAsync(options: StreamingModuleAsyncOptions): DynamicModule; /** * Initialize StreamServer with configuration */ private static initializeStreamServer; /** * Get the current StreamServer instance (for testing/debugging) */ static getStreamServer(): StreamServer | null; } //# sourceMappingURL=StreamingModule.d.ts.map