UNPKG

nestjs-temporal-core

Version:

Complete NestJS integration for Temporal.io with auto-discovery, declarative scheduling, enhanced monitoring, and enterprise-ready features

53 lines (52 loc) 1.85 kB
import { OnModuleInit } from '@nestjs/common'; import { TemporalDiscoveryService } from '../discovery/temporal-discovery.service'; import { SchedulesModuleOptions, ScheduleInfo } from '../interfaces'; export declare class TemporalSchedulesService implements OnModuleInit { private readonly options; private readonly discoveryService; private readonly logger; private readonly managedSchedules; constructor(options: SchedulesModuleOptions, discoveryService: TemporalDiscoveryService); onModuleInit(): Promise<void>; private initializeSchedules; private createScheduleInfo; private calculateNextRun; private parseInterval; getManagedSchedules(): ScheduleInfo[]; getSchedule(scheduleId: string): ScheduleInfo | undefined; getScheduleIds(): string[]; isScheduleManaged(scheduleId: string): boolean; getActiveSchedules(): ScheduleInfo[]; getSchedulesByWorkflow(workflowName: string): ScheduleInfo[]; getSchedulesByTaskQueue(taskQueue: string): ScheduleInfo[]; updateScheduleStatus(scheduleId: string, isActive: boolean): Promise<void>; recordScheduleTrigger(scheduleId: string): Promise<void>; getScheduleStats(): { total: number; active: number; inactive: number; cron: number; interval: number; errors: number; }; validateSchedules(): { isValid: boolean; issues: string[]; warnings: string[]; }; getHealthStatus(): { status: 'healthy' | 'degraded' | 'unhealthy'; schedules: { total: number; active: number; errors: number; }; validation: { isValid: boolean; issues: string[]; warnings: string[]; }; }; private isValidCronExpression; private logScheduleSummary; }