import { Global, Module } from '@nestjs/common'; import { CalendarSyncController } from './calendar-sync.controller'; import { CalendarSyncService } from './calendar-sync.service'; import { CalendarSyncSettingsService } from './calendar-sync-settings.service'; import { GraphClientService } from './graph-client.service'; // @Global(): CalendarSyncService.enqueue()/cancel() are called from ~6 // otherwise-unrelated domain modules (Tasks, Inspections, Treatments, // Feedings, Harvests, Queens) - matches WebhooksModule's own @Global() // rationale rather than having each of those six modules import this one. @Global() @Module({ controllers: [CalendarSyncController], providers: [ CalendarSyncService, CalendarSyncSettingsService, GraphClientService, ], exports: [CalendarSyncService], }) export class CalendarSyncModule {}