/** * Task scheduling and reordering methods */ import type { UpdateTaskMoveToPanelPayload } from '../../types/index.js'; import { SubtaskMethods } from './subtasks.js'; export declare abstract class TaskSchedulingMethods extends SubtaskMethods { /** * Reorders a task within a day by moving it to a specific position * * This method handles the complexity of Sunsama's ordinal-based positioning system. * You simply specify a 0-based position and the method calculates the appropriate * ordinal value and constructs the full task list. * * @param taskId - The ID of the task to reorder * @param position - The target position (0 = top, 1 = second, etc.). Must be less than the total number of tasks for the day. * @param day - The day to reorder within (YYYY-MM-DD format) * @param options - Additional options * @returns The result with updated task IDs * @throws SunsamaAuthError if not authenticated or request fails * * @example * ```typescript * // Move a task to the top of today's list * const result = await client.reorderTask('taskId123', 0, '2026-01-12'); * * // Move a task to position 3 (fourth from top) * const result = await client.reorderTask('taskId123', 3, '2026-01-12'); * * // With explicit timezone * const result = await client.reorderTask('taskId123', 0, '2026-01-12', { * timezone: 'America/New_York' * }); * ``` */ reorderTask(taskId: string, position: number, day: string, options?: { timezone?: string; }): Promise; /** * Calculates the ordinal value for a task being moved to a new position * * Sunsama uses a spacing system where ordinals have gaps between them * to allow for easy insertion. This method calculates an appropriate * ordinal based on neighboring tasks. * * @param tasks - Current list of tasks in order * @param fromIndex - Current index of the task being moved * @param toIndex - Target index for the task * @returns The calculated ordinal value * @internal */ private calculateOrdinal; } //# sourceMappingURL=task-scheduling.d.ts.map