/**
 * Interface defining a lifecycle hook that is called once the module has been initialized.
 * All dependencies have been resolved and instantiated at this point.
 */
export interface OnModuleInit {
	onModuleInit(): void | Promise<void>;
}

/**
 * Interface defining a lifecycle hook that is called once all modules have been initialized,
 * but before the application starts listening for connections.
 */
export interface OnApplicationBootstrap {
	onApplicationBootstrap(): void | Promise<void>;
}

/**
 * Interface defining a lifecycle hook that is called when the application is shutting down.
 * Useful for cleanup logic like closing database connections or stopping intervals.
 */
export interface OnModuleDestroy {
	onModuleDestroy(): void | Promise<void>;
}

/**
 * Interface defining a lifecycle hook that is called after all onModuleDestroy() handlers have completed.
 */
export interface BeforeApplicationShutdown {
	beforeApplicationShutdown(signal?: string): void | Promise<void>;
}

/**
 * Interface defining a lifecycle hook that is called after connections close (app.close() resolves).
 */
export interface OnApplicationShutdown {
	onApplicationShutdown(signal?: string): void | Promise<void>;
}
