import type { createDatabase } from "@prodobit/database"; import type { CreateTaskRequest, UpdateTaskRequest, TaskQuery, CreateTaskDependencyRequest } from "@prodobit/types"; export declare class TaskService { private db; constructor(db: ReturnType); /** * Get all tasks for a tenant with optional filters */ getTasks(tenantId: string, query?: TaskQuery): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }[]>; /** * Get a single task by ID */ getTaskById(id: string, tenantId: string): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Get subtasks of a parent task */ getSubtasks(parentTaskId: string, tenantId: string): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }[]>; /** * Create a new task */ createTask(data: CreateTaskRequest, tenantId: string, createdBy: string): Promise<{ id: string; description: string | null; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; startDate: Date | null; endDate: Date | null; locationId: string | null; notes: string | null; assignedBy: string | null; createdBy: string; title: string; priority: string; imageIds: string[] | null; documentIds: string[] | null; type: string; assigneeId: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; tags: string[] | null; completionNotes: string | null; blockingReason: string | null; }>; /** * Update a task */ updateTask(id: string, tenantId: string, data: UpdateTaskRequest): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Delete (soft delete) a task */ deleteTask(id: string, tenantId: string): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Create task dependency */ createTaskDependency(data: CreateTaskDependencyRequest, tenantId: string): Promise<{ id: string; insertedAt: Date; tenantId: string; taskId: string; dependsOnTaskId: string; dependencyType: string; lagDays: number | null; }>; /** * Get dependencies for a task */ getTaskDependencies(taskId: string, tenantId: string): Promise<{ id: string; tenantId: string; taskId: string; dependsOnTaskId: string; dependencyType: string; lagDays: number | null; insertedAt: Date; }[]>; /** * Delete task dependency */ deleteTaskDependency(id: string, tenantId: string): Promise<{ id: string; insertedAt: Date; tenantId: string; taskId: string; dependsOnTaskId: string; dependencyType: string; lagDays: number | null; }>; /** * Get overdue tasks */ getOverdueTasks(tenantId: string): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }[]>; /** * Get tasks by assignee */ getTasksByAssignee(assigneeId: string, tenantId: string): Promise<{ id: string; tenantId: string; title: string; description: string | null; type: string; priority: string; status: string; assigneeId: string | null; createdBy: string; assignedBy: string | null; parentTaskId: string | null; relatedAssetId: string | null; relatedIssueId: string | null; relatedMaintenancePlanId: string | null; relatedCalibrationPlanId: string | null; locationId: string | null; startDate: Date | null; endDate: Date | null; dueDate: Date | null; completedAt: Date | null; estimatedHours: number | null; actualHours: number | null; progressPercentage: number | null; checklistItems: unknown; checklistCompletedCount: number | null; isRecurring: boolean | null; recurrenceInterval: string | null; recurrenceCount: number | null; nextOccurrenceDate: Date | null; notes: string | null; tags: string[] | null; imageIds: string[] | null; documentIds: string[] | null; completionNotes: string | null; blockingReason: string | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }[]>; /** * Get task statistics */ getTaskStatistics(tenantId: string): Promise<{ status: string; priority: string; type: string; count: number; }[]>; /** * Calculate next occurrence date for recurring tasks */ private calculateNextOccurrence; } //# sourceMappingURL=service.d.ts.map