export interface TodoTaskList { id: string; displayName: string; isOwner: boolean; isShared: boolean; wellknownListName?: "none" | "defaultList" | "flaggedEmails" | "unknownFutureValue"; } export type RecurrencePatternType = "daily" | "weekly" | "absoluteMonthly" | "relativeMonthly" | "absoluteYearly" | "relativeYearly"; export type DayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; export interface PatternedRecurrence { pattern: { type: RecurrencePatternType; interval: number; daysOfWeek?: DayOfWeek[]; firstDayOfWeek?: DayOfWeek; dayOfMonth?: number; weekIndex?: "first" | "second" | "third" | "fourth" | "last"; month?: number; index?: "first" | "second" | "third" | "fourth" | "last"; }; range: { type: "endDate" | "noEnd" | "numbered"; startDate: string; endDate?: string; numberOfOccurrences?: number; recurrenceTimeZone?: string; }; } export interface TodoTask { id: string; title: string; body?: { content: string; contentType: "text" | "html"; }; status: "notStarted" | "inProgress" | "completed" | "waitingOnOthers" | "deferred"; importance: "low" | "normal" | "high"; isReminderOn: boolean; reminderDateTime?: { dateTime: string; timeZone: string; }; dueDateTime?: { dateTime: string; timeZone: string; }; recurrence?: PatternedRecurrence; createdDateTime: string; lastModifiedDateTime: string; categories?: string[]; } export interface ChecklistItem { id: string; displayName: string; isChecked: boolean; createdDateTime: string; checkedDateTime?: string; } export interface LinkedResource { id: string; webUrl?: string; applicationName?: string; displayName?: string; externalId?: string; } export interface BatchRequest { id: string; method: "GET" | "POST" | "PATCH" | "DELETE"; url: string; body?: unknown; headers?: Record; } export interface BatchResponse { id: string; status: number; body?: unknown; headers?: Record; } export declare function graphBatch(requests: BatchRequest[]): Promise; export declare function listTaskLists(opts?: { paginate?: boolean; }): Promise; export interface CreateTaskInput { title: string; body?: string; importance?: TodoTask["importance"]; dueDateTime?: string; timeZone?: string; categories?: string[]; recurrence?: PatternedRecurrence; isReminderOn?: boolean; reminderDateTime?: string; reminderTimeZone?: string; } export interface UpdateTaskInput { title?: string; status?: TodoTask["status"]; importance?: TodoTask["importance"]; body?: string; dueDateTime?: string; timeZone?: string; categories?: string[]; recurrence?: PatternedRecurrence | null; isReminderOn?: boolean; reminderDateTime?: string; reminderTimeZone?: string; } export declare function listTasks(listId: string, opts?: { filter?: string; top?: number; orderby?: string; paginate?: boolean; }): Promise; export declare function getTask(listId: string, taskId: string): Promise; export declare function createTask(listId: string, task: CreateTaskInput): Promise; export declare function updateTask(listId: string, taskId: string, patch: UpdateTaskInput): Promise; export declare function deleteTask(listId: string, taskId: string): Promise; export declare function completeTask(listId: string, taskId: string): Promise; export declare function moveTask(sourceListId: string, taskId: string, targetListId: string): Promise; export interface SearchResult { list: { id: string; displayName: string; }; task: TodoTask; } /** * Searches a term in the titles of non-completed tasks across all lists. * Uses $filter contains() — case-sensitive on Graph side. Includes completed if includeCompleted. */ export declare function searchTasks(query: string, opts?: { topPerList?: number; includeCompleted?: boolean; }): Promise; export interface DailySummary { date: string; totalDueToday: number; totalOverdue: number; byList: Array<{ list: { id: string; displayName: string; }; dueToday: TodoTask[]; overdue: TodoTask[]; }>; } export declare function summarizeToday(timeZone?: string): Promise; export interface ListWithTasks { list: { id: string; displayName: string; }; tasks: TodoTask[]; error?: string; } export declare function listAllTasks(opts?: { filter?: string; topPerList?: number; includeCompleted?: boolean; }): Promise; export declare function listChecklistItems(listId: string, taskId: string, opts?: { select?: string; paginate?: boolean; }): Promise; export declare function createChecklistItem(listId: string, taskId: string, displayName: string, isChecked?: boolean): Promise; export declare function updateChecklistItem(listId: string, taskId: string, itemId: string, patch: { displayName?: string; isChecked?: boolean; }): Promise; export declare function deleteChecklistItem(listId: string, taskId: string, itemId: string): Promise; export declare function listLinkedResources(listId: string, taskId: string, opts?: { select?: string; paginate?: boolean; }): Promise; export declare function createLinkedResource(listId: string, taskId: string, resource: { webUrl?: string; applicationName?: string; displayName?: string; externalId?: string; }): Promise; export declare function deleteLinkedResource(listId: string, taskId: string, resourceId: string): Promise; export interface BatchResultItem { index: number; status: number; ok: boolean; result?: T; error?: string; } export declare function batchCreateTasks(items: Array<{ listId: string; task: CreateTaskInput; }>): Promise>>; export declare function batchCompleteTasks(items: Array<{ listId: string; taskId: string; }>): Promise>>; export declare function batchDeleteTasks(items: Array<{ listId: string; taskId: string; }>): Promise>>; export interface OpenExtension { id: string; extensionName: string; [key: string]: unknown; } export declare function listTaskExtensions(listId: string, taskId: string, opts?: { paginate?: boolean; }): Promise; export declare function setTaskExtension(listId: string, taskId: string, extensionName: string, data: Record): Promise; export declare function deleteTaskExtension(listId: string, taskId: string, extensionName: string): Promise; export declare function listOverdueTasks(topPerList?: number): Promise; export declare function listTasksByCategory(category: string, opts?: { topPerList?: number; includeCompleted?: boolean; }): Promise; export declare function bulkUpdateCategories(refs: Array<{ listId: string; taskId: string; }>, changes: { add?: string[]; remove?: string[]; }): Promise>>; export declare function exportTasksIcs(opts?: { listIds?: string[]; includeCompleted?: boolean; topPerList?: number; }): Promise;