feat: implement Phase 2 Core features for AutoScheduler GTD System

- ConnectWise Manage Integration:
  - ConnectWiseModule with service, controller, entity
  - API endpoints for connection CRUD and sync
  - Syncs service tickets, project tickets, zero-ticket projects
  - Stores ConnectWise priority/SLA in task metadata

- Intelligent Calendar Scheduling:
  - CalendarModule with connection and event entities
  - Support for CalDAV, Microsoft Graph, Google Calendar providers
  - CalendarService with sync methods for all providers
  - SchedulingModule with automatic scheduling engine
  - Finds available slots respecting working hours
  - Groups tasks by context, respects priority and due dates

- Interactive Calendar Week View:
  - FullCalendar with timeGridWeek view
  - Drag-and-drop task rescheduling
  - Tasks auto-lock when manually moved
  - Color-coded by context
  - Regenerate Schedule button

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-01-11 09:58:15 +00:00
parent e7ffcce768
commit 9c6b85f28a
29 changed files with 1863 additions and 47 deletions

View File

@@ -227,6 +227,71 @@ export interface ProjectResponseDto {
updatedAt: string;
}
// DTOs - ConnectWise Connection
export interface CreateConnectWiseConnectionDto {
companyId: string;
publicKey: string;
privateKey: string;
apiUrl: string;
memberId: string;
}
export interface ConnectWiseConnectionResponseDto {
id: string;
companyId: string;
apiUrl: string;
memberId: string;
lastSync?: string;
createdAt: string;
updatedAt: string;
}
// DTOs - Calendar Connection
export enum CalendarProvider {
CALDAV = 'CALDAV',
MICROSOFT_GRAPH = 'MICROSOFT_GRAPH',
GOOGLE = 'GOOGLE',
}
export interface CreateCalendarConnectionDto {
provider: CalendarProvider;
calendarUrl?: string;
credentials?: {
username?: string;
password?: string;
accessToken?: string;
refreshToken?: string;
};
}
export interface CalendarConnectionResponseDto {
id: string;
provider: CalendarProvider;
calendarUrl?: string;
lastSync?: string;
createdAt: string;
updatedAt: string;
}
// DTOs - Calendar Events
export interface CalendarEventResponseDto {
id: string;
externalId: string;
title: string;
startTime: string;
endTime: string;
isAllDay: boolean;
source: CalendarProvider;
createdAt: string;
updatedAt: string;
}
// DTOs - Schedule
export interface ScheduleRegenerateResponseDto {
scheduledCount: number;
tasks: TaskResponseDto[];
}
// Health check
export interface HealthCheckResponseDto {
status: 'ok' | 'error';