import { ActivityEvent, Comment, MoveTaskArgs, PersonalProject, Section, Task, TodoistApi, WorkspaceProject } from '@doist/todoist-api-typescript';
export { appendToQuery, buildResponsibleUserQueryFilter, filterTasksByResponsibleUser, RESPONSIBLE_USER_FILTERING, type ResponsibleUserFiltering, resolveResponsibleUser, } from './filter-helpers.js';
export type Project = PersonalProject | WorkspaceProject;
export declare function isPersonalProject(project: Project): project is PersonalProject;
export declare function isWorkspaceProject(project: Project): project is WorkspaceProject;
/**
 * Generic pagination utility for Todoist API methods
 *
 * Recursively fetches all pages of data from paginated Todoist API endpoints.
 *
 * @template TArgs - The type of arguments accepted by the API method
 * @template TResponse - The type of response returned by the API method
 * @template TResult - The type of individual result items in the response
 *
 * @param options - Configuration options
 * @param options.apiMethod - The Todoist API method to call (e.g., todoistApi.getLabels)
 * @param options.args - Initial arguments to pass to the API method (excluding cursor and limit)
 * @param options.limit - Number of items to fetch per page (default: 100)
 * @returns Promise resolving to an array of all result items across all pages
 *
 * @example
 * const allLabels = await fetchAllPages({
 *   apiMethod: (args) => todoistApi.getLabels(args),
 *   args: {},
 *   limit: 100
 * })
 */
export declare function fetchAllPages<TArgs extends {
    cursor?: string | null;
    limit?: number;
}, TResponse extends {
    results: TResult[];
    nextCursor: string | null;
}, TResult>(options: {
    apiMethod: (args: TArgs) => Promise<TResponse>;
    args?: Omit<TArgs, 'cursor' | 'limit'>;
    limit?: number;
}): Promise<TResult[]>;
/**
 * Fetches all projects from Todoist by looping through paginated results.
 * This is useful when you need to search/filter projects client-side and want
 * to ensure no matches are missed due to pagination boundaries.
 *
 * @param client - The Todoist API client
 * @returns Promise resolving to array of all projects
 */
export declare function fetchAllProjects(client: TodoistApi): Promise<Project[]>;
/**
 * Fetches all sections for a project from Todoist by looping through paginated results.
 * This is useful when you need to search/filter sections client-side and want
 * to ensure no matches are missed due to pagination boundaries.
 *
 * @param client - The Todoist API client
 * @param projectId - The ID of the project to fetch sections from
 * @returns Promise resolving to array of all sections in the project
 */
export declare function fetchAllSections(client: TodoistApi, projectId?: string): Promise<Section[]>;
/**
 * Creates a MoveTaskArgs object from move parameters, validating that exactly one is provided.
 * @param taskId - The task ID (used for error messages)
 * @param projectId - Optional project ID to move to
 * @param sectionId - Optional section ID to move to
 * @param parentId - Optional parent ID to move to
 * @returns MoveTaskArgs object with exactly one destination
 * @throws Error if multiple move parameters are provided or none are provided
 */
export declare function createMoveTaskArgs(taskId: string, projectId?: string, sectionId?: string, parentId?: string): MoveTaskArgs;
/**
 * Map a single Todoist task to a more structured format, for LLM consumption.
 * @param task - The task to map.
 * @returns The mapped task.
 */
declare function mapTask(task: Task): {
    id: string;
    content: string;
    description: string;
    dueDate: string | undefined;
    recurring: string | boolean;
    deadlineDate: string | undefined;
    priority: "p1" | "p2" | "p3" | "p4";
    projectId: string;
    sectionId: string | undefined;
    parentId: string | undefined;
    labels: string[];
    duration: string | undefined;
    responsibleUid: string | undefined;
    assignedByUid: string | undefined;
    checked: boolean;
    completedAt: string | undefined;
};
type MappedTask = ReturnType<typeof mapTask>;
/**
 * Map a single Todoist project to a more structured format, for LLM consumption.
 * @param project - The project to map.
 * @returns The mapped project.
 */
declare function mapProject(project: Project): {
    id: string;
    name: string;
    color: string;
    isFavorite: boolean;
    isShared: boolean;
    parentId: string | undefined;
    inboxProject: boolean;
    viewStyle: string;
    workspaceId: string | undefined;
};
/**
 * Map a single Todoist comment to a more structured format, for LLM consumption.
 * @param comment - The comment to map.
 * @returns The mapped comment.
 */
declare function mapComment(comment: Comment): {
    id: string;
    taskId: string | undefined;
    projectId: string | undefined;
    content: string;
    postedAt: string;
    postedUid: string;
    fileAttachment: {
        resourceType: string;
        fileName: string | undefined;
        fileSize: number | undefined;
        fileType: string | undefined;
        fileUrl: string | undefined;
        fileDuration: number | undefined;
        uploadState: "pending" | "completed" | undefined;
        url: string | undefined;
        title: string | undefined;
        image: string | undefined;
        imageWidth: number | undefined;
        imageHeight: number | undefined;
    } | undefined;
};
/**
 * Map a single Todoist activity event to a more structured format, for LLM consumption.
 * @param event - The activity event to map.
 * @returns The mapped activity event.
 */
declare function mapActivityEvent(event: ActivityEvent): {
    id: string | undefined;
    objectType: string;
    objectId: string;
    eventType: string;
    eventDate: string;
    parentProjectId: string | undefined;
    parentItemId: string | undefined;
    initiatorId: string | undefined;
    extraData: Record<string, any> | undefined;
};
declare function getTasksByFilter({ client, query, limit, cursor, }: {
    client: TodoistApi;
    query: string;
    limit: number | undefined;
    cursor: string | undefined;
}): Promise<{
    tasks: {
        id: string;
        content: string;
        description: string;
        dueDate: string | undefined;
        recurring: string | boolean;
        deadlineDate: string | undefined;
        priority: "p1" | "p2" | "p3" | "p4";
        projectId: string;
        sectionId: string | undefined;
        parentId: string | undefined;
        labels: string[];
        duration: string | undefined;
        responsibleUid: string | undefined;
        assignedByUid: string | undefined;
        checked: boolean;
        completedAt: string | undefined;
    }[];
    nextCursor: string | null;
}>;
export { getTasksByFilter, mapActivityEvent, mapComment, mapProject, mapTask };
export type { MappedTask };
//# sourceMappingURL=tool-helpers.d.ts.map