/** * Todo API * Wrapper for Paean AI todo/task management endpoints */ /** Subtask/checklist item within a todo */ export interface ChecklistItem { id: string; content: string; completed: boolean; order?: number; createdAt?: string; completedAt?: string; } export interface TodoItem { id: string; content: string; description?: string; priority: 'high' | 'medium' | 'low'; status: 'pending' | 'in_progress' | 'completed' | 'cancelled'; dueDate?: string; tags?: string[]; sourceNoteHashKey?: string; sourceContext?: string; metadata?: Record; order?: number; createdAt: string; updatedAt: string; completedAt?: string; /** Subtasks/checklist items */ checklist?: ChecklistItem[]; } export interface TodoListResponse { success: boolean; data: { items: TodoItem[]; stats: { total: number; completed: number; pending: number; overdue?: number; dueToday?: number; }; lastProcessedAt?: string; }; } export interface PendingChange { id: number; status: 'pending' | 'accepted' | 'rejected' | 'partial'; summary: string; changeCount: number; operationCounts: { add: number; update: number; complete: number; delete: number; }; sourceNoteHashKey?: string; sourceNoteTitle?: string; createdAt: string; expiresAt: string; isExpired: boolean; } export interface PendingChangesResponse { success: boolean; data: PendingChange[]; } export interface TodoPreferences { todoEnabled: boolean; todoAutoProcess: boolean; todoDefaultPriority: 'high' | 'medium' | 'low'; turboModeEnabled: boolean; } /** * Get todo list with optional filters */ export declare function getTodoList(options?: { status?: 'all' | 'pending' | 'completed' | 'in_progress' | 'cancelled'; priority?: 'high' | 'medium' | 'low'; }): Promise; /** * Get a specific todo item by ID */ export declare function getTodoItem(id: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Create a new todo item */ export declare function createTodoItem(data: { content: string; description?: string; priority?: 'high' | 'medium' | 'low'; status?: 'pending' | 'in_progress'; dueDate?: string; tags?: string[]; sourceContext?: string; /** Metadata for worker integration (executor hints, verification, etc.) */ metadata?: Record; /** Subtask contents - will be converted to checklist items */ subtasks?: string[]; }): Promise<{ success: boolean; data: TodoItem; }>; /** * Update a todo item */ export declare function updateTodoItem(id: string, data: Partial<{ content: string; priority: 'high' | 'medium' | 'low'; status: 'pending' | 'in_progress' | 'completed' | 'cancelled'; dueDate: string; tags: string[]; order: number; metadata: Record; }>): Promise<{ success: boolean; data: TodoItem; }>; /** * Complete a todo item */ export declare function completeTodoItem(id: string, summary?: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Reopen a completed/cancelled todo item */ export declare function reopenTodoItem(id: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Delete a todo item */ export declare function deleteTodoItem(id: string): Promise<{ success: boolean; }>; /** * Get pending changes from LLM analysis */ export declare function getPendingChanges(status?: 'pending' | 'all'): Promise; /** * Accept a pending change */ export declare function acceptPendingChange(changeId: number): Promise<{ success: boolean; }>; /** * Partially accept a pending change (select specific operations) */ export declare function partialAcceptPendingChange(changeId: number, acceptedOperations: string[]): Promise<{ success: boolean; }>; /** * Get pending change detail */ export declare function getPendingChangeDetail(changeId: number): Promise<{ success: boolean; data: PendingChange & { changes?: Array<{ id: string; operation: 'add' | 'update' | 'complete' | 'delete'; content?: string; targetItemId?: string; details?: Record; }>; }; }>; /** * Reject a pending change */ export declare function rejectPendingChange(changeId: number, notes?: string): Promise<{ success: boolean; }>; /** * Get todo preferences */ export declare function getTodoPreferences(): Promise<{ success: boolean; data: TodoPreferences; }>; /** * Update todo preferences */ export declare function updateTodoPreferences(prefs: Partial): Promise<{ success: boolean; data: TodoPreferences; }>; /** * Analyze content for todos (manual trigger) */ export declare function analyzeTodos(content: string, options?: { context?: string; autoAccept?: boolean; }): Promise<{ success: boolean; data: { pendingChangeId?: number; changes?: unknown[]; summary?: string; }; }>; /** * Add a subtask to an existing todo item */ export declare function addSubtask(taskId: string, content: string): Promise<{ success: boolean; data: TodoItem; subtaskId?: string; }>; /** * Complete a subtask */ export declare function completeSubtask(taskId: string, subtaskId: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Update a subtask */ export declare function updateSubtask(taskId: string, subtaskId: string, updates: { content?: string; completed?: boolean; }): Promise<{ success: boolean; data: TodoItem; }>; /** * Delete a subtask */ export declare function deleteSubtask(taskId: string, subtaskId: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Get subtask progress for a task */ export declare function getSubtaskProgress(item: TodoItem): { total: number; completed: number; percentage: number; }; export interface ScheduleConfig { cron: string; timezone: string; startDate?: string; endDate?: string; enabled: boolean; lastTriggeredAt?: string; nextTriggerAt?: string; maxConsecutiveFailures?: number; consecutiveFailures?: number; } export interface ScheduledTodoItem extends TodoItem { taskType: 'scheduled'; schedule: ScheduleConfig; } export declare function getScheduledTasks(options?: { enabled?: boolean; search?: string; }): Promise<{ success: boolean; data: { items: ScheduledTodoItem[]; count: number; }; }>; export declare function pauseSchedule(taskId: string): Promise<{ success: boolean; data: ScheduledTodoItem; }>; export declare function resumeSchedule(taskId: string): Promise<{ success: boolean; data: ScheduledTodoItem; }>; export declare function triggerSchedule(taskId: string): Promise<{ success: boolean; data: TodoItem; }>; /** * Atomically claim a scheduled task trigger for a specific CLI session. * Returns success: true only for the first caller, preventing duplicate execution. */ export declare function claimScheduleTrigger(taskId: string, sessionId: string): Promise<{ success: boolean; claimed: boolean; data?: TodoItem; error?: string; }>; export declare function deleteSchedule(taskId: string): Promise<{ success: boolean; }>; export declare function getScheduleHistory(taskId: string, limit?: number): Promise<{ success: boolean; data: { items: Array<{ id: string; content: string; status: string; createdAt: string; completedAt?: string; }>; count: number; }; }>; //# sourceMappingURL=todo.d.ts.map