import { isPersonalProject, isWorkspaceProject, ActivityEvent, ColorKey, Comment, CurrentUser, Goal, Label, MoveTaskArgs, PersonalProject, Reminder, Section, Task, TodoistApi, WorkspaceProject } from '@doist/todoist-sdk';
export { appendToQuery, buildResponsibleUserQueryFilter, filterTasksByResponsibleUser, RESPONSIBLE_USER_FILTERING, type ResponsibleUserFiltering, resolveResponsibleUser, } from './filter-helpers.js';
export type Project = PersonalProject | WorkspaceProject;
export { isPersonalProject, isWorkspaceProject };
/**
 * Checks if a project ID represents the inbox (case-insensitive).
 *
 * @param projectId - The project ID to check
 * @returns true if the project ID is inbox-like
 */
export declare function isInboxProjectId(projectId: string | undefined): boolean;
/**
 * Resolves "inbox" project ID to actual inbox project ID (case-insensitive).
 * Only makes API calls when necessary (when projectId is inbox-like and user not provided).
 *
 * @param args - Configuration object
 * @param args.projectId - The project ID to resolve (may be "inbox", "Inbox", etc.)
 * @param args.user - The current user object (if already fetched)
 * @param args.client - The API client (if user needs to be fetched)
 * @returns Promise resolving to the resolved project ID
 */
export declare function resolveInboxProjectId(args: {
    projectId: string | undefined;
    user?: CurrentUser;
    client?: TodoistApi;
}): Promise<string | undefined>;
/**
 * 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[]>;
/**
 * Wraps a search query with wildcards for substring matching.
 * If the query already contains unescaped wildcards, it is returned as-is
 * to preserve intentional wildcard patterns (e.g. prefix matching with "work*").
 */
export declare function toWildcardQuery(query: string): string;
/**
 * Searches projects by name and fetches all matching pages.
 *
 * @param client - The Todoist API client
 * @param query - The search query string
 * @returns Promise resolving to array of matching projects
 */
export declare function searchAllProjects(client: TodoistApi, query: string): Promise<Project[]>;
/**
 * Searches labels by name and fetches all matching pages.
 *
 * @param client - The Todoist API client
 * @param query - The search query string
 * @returns Promise resolving to array of matching labels
 */
export declare function searchAllLabels(client: TodoistApi, query: string): Promise<Label[]>;
export declare function fetchAllSharedLabels(client: TodoistApi): Promise<string[]>;
/**
 * Searches sections by name (optionally scoped to a project) and fetches all matching pages.
 *
 * @param client - The Todoist API client
 * @param query - The search query string
 * @param projectId - Optional project ID to scope the search
 * @returns Promise resolving to array of matching sections
 */
export declare function searchAllSections(client: TodoistApi, query: string, 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;
    description: string;
    color: ColorKey;
    isFavorite: boolean;
    isShared: boolean;
    parentId: string | undefined;
    inboxProject: boolean;
    viewStyle: string;
    workspaceId: string | undefined;
    folderId: string | undefined;
    childOrder: number;
};
/**
 * 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: "completed" | "pending" | undefined;
        url: string | undefined;
        title: string | undefined;
        image: string | undefined;
        imageWidth: number | undefined;
        imageHeight: number | undefined;
    } | undefined;
};
/**
 * Map a single Todoist goal to a more structured format, for LLM consumption.
 * Drops `null` values so the output matches `GoalSchema` (which makes nullable
 * fields optional — `registerTool` strips nulls from `structuredContent`).
 */
declare function mapGoal(goal: Goal): {
    id: string;
    name: string;
    ownerType: "USER" | "WORKSPACE";
    ownerId: string;
    description: string | undefined;
    deadline: string | undefined;
    responsibleUid: string | undefined;
    isCompleted: boolean;
    progress: {
        [x: string]: unknown;
        totalTaskCount: number;
        completedTaskCount: number;
        percentage: number;
    } | 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;
}>;
/**
 * Map a single Todoist reminder to a more structured format, for LLM consumption.
 * Normalizes SDK's `itemId` to `taskId` for consistency with other tools.
 * @param reminder - The reminder to map (any of the 3 types).
 * @returns The mapped reminder.
 */
declare function mapReminder(reminder: Reminder): {
    minuteOffset: number;
    due: {
        isRecurring: boolean;
        string: string;
        date: string;
        datetime: string | undefined;
        timezone: string | undefined;
    } | undefined;
    isUrgent: boolean | undefined;
    id: string;
    taskId: string;
    type: "location" | "absolute" | "relative";
} | {
    due: {
        isRecurring: boolean;
        string: string;
        date: string;
        datetime: string | undefined;
        timezone: string | undefined;
    };
    isUrgent: boolean | undefined;
    id: string;
    taskId: string;
    type: "location" | "absolute" | "relative";
} | {
    name: string;
    locLat: string;
    locLong: string;
    locTrigger: "on_enter" | "on_leave";
    radius: number;
    id: string;
    taskId: string;
    type: "location" | "absolute" | "relative";
};
/**
 * Count reminders by category: time-based (relative/absolute) and location.
 */
declare function countRemindersByType(reminders: {
    type: string;
}[]): {
    timeBasedCount: number;
    locationCount: number;
};
export type { MappedTask };
export { countRemindersByType, getTasksByFilter, mapActivityEvent, mapComment, mapGoal, mapProject, mapReminder, mapTask, };
//# sourceMappingURL=tool-helpers.d.ts.map