import { FetchAdapter } from '../adapter.ts';
import { z } from 'zod';
/**
 * Priority level for a task, from highest (`'high'`) to no priority (`'none'`).
 */
export declare const TaskPrioritySchema: z.ZodEnum<{
    high: "high";
    medium: "medium";
    low: "low";
    none: "none";
}>;
export type TaskPriority = z.infer<typeof TaskPrioritySchema>;
/**
 * The classification of a task.
 *
 * - `'epic'` — Large initiatives that span multiple features or tasks.
 * - `'feature'` — New capabilities to be built.
 * - `'enhancement'` — Improvements to existing features.
 * - `'bug'` — Defects to be fixed.
 * - `'task'` — General work items.
 */
export declare const TaskTypeSchema: z.ZodEnum<{
    epic: "epic";
    feature: "feature";
    enhancement: "enhancement";
    bug: "bug";
    task: "task";
}>;
export type TaskType = z.infer<typeof TaskTypeSchema>;
/**
 * The lifecycle status of a task.
 *
 * - `'open'` — Created, not yet started.
 * - `'in_progress'` — Actively being worked on.
 * - `'started'` — Alias for `'in_progress'`.
 * - `'done'` — Work completed.
 * - `'completed'` — Alias for `'done'`.
 * - `'closed'` — Alias for `'done'`.
 * - `'cancelled'` — Abandoned.
 */
export declare const TaskStatusSchema: z.ZodEnum<{
    open: "open";
    in_progress: "in_progress";
    started: "started";
    done: "done";
    completed: "completed";
    closed: "closed";
    cancelled: "cancelled";
}>;
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
/**
 * Normalize a task status value, converting aliases to their canonical form.
 * Maps `'completed'` → `'done'`, `'closed'` → `'done'`, `'started'` → `'in_progress'`.
 */
export declare function normalizeTaskStatus(status: TaskStatus): TaskStatus;
/**
 * A lightweight reference to a user or project entity, containing just the ID
 * and display name. Used for creator, assignee, closer, and project associations.
 */
export declare const EntityRefSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
}, z.core.$strip>;
export type EntityRef = z.infer<typeof EntityRefSchema>;
/**
 * The type of user entity.
 *
 * - `'human'` — A human user.
 * - `'agent'` — An AI agent.
 */
export declare const UserTypeSchema: z.ZodEnum<{
    human: "human";
    agent: "agent";
}>;
export type UserType = z.infer<typeof UserTypeSchema>;
/**
 * A reference to a user entity with type discrimination.
 * Extends {@link EntityRef} with a {@link UserEntityRef.type | type} field
 * to distinguish between human users and AI agents.
 */
export declare const UserEntityRefSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    type: z.ZodOptional<z.ZodEnum<{
        human: "human";
        agent: "agent";
    }>>;
}, z.core.$strip>;
export type UserEntityRef = z.infer<typeof UserEntityRefSchema>;
/**
 * A work item in the task management system.
 *
 * Tasks can represent epics, features, bugs, enhancements, or generic tasks.
 * They support hierarchical organization via {@link Task.parent_id | parent_id},
 * assignment tracking, and lifecycle management through status transitions.
 *
 * @remarks
 * Status transitions are tracked automatically — when a task moves to a new status,
 * the corresponding date field (e.g., {@link Task.open_date | open_date},
 * {@link Task.in_progress_date | in_progress_date}) is set by the server.
 */
export declare const TaskSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    title: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    priority: z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>;
    parent_id: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>;
    status: z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>;
    open_date: z.ZodOptional<z.ZodString>;
    in_progress_date: z.ZodOptional<z.ZodString>;
    closed_date: z.ZodOptional<z.ZodString>;
    created_id: z.ZodString;
    assigned_id: z.ZodOptional<z.ZodString>;
    closed_id: z.ZodOptional<z.ZodString>;
    deleted: z.ZodOptional<z.ZodBoolean>;
    creator: z.ZodOptional<z.ZodLazy<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>>;
    assignee: z.ZodOptional<z.ZodLazy<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>>;
    closer: z.ZodOptional<z.ZodLazy<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>>;
    project: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
    }, z.core.$strip>>;
    cancelled_date: z.ZodOptional<z.ZodString>;
    tags: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        name: z.ZodString;
        color: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>>;
    comments: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        task_id: z.ZodString;
        user_id: z.ZodString;
        author: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>;
        body: z.ZodString;
    }, z.core.$strip>>>>;
    subtask_count: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type Task = z.infer<typeof TaskSchema>;
/**
 * A comment on a task, supporting threaded discussion.
 */
export declare const CommentSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    updated_at: z.ZodString;
    task_id: z.ZodString;
    user_id: z.ZodString;
    author: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    body: z.ZodString;
}, z.core.$strip>;
export type Comment = z.infer<typeof CommentSchema>;
/**
 * A label that can be applied to tasks for categorization and filtering.
 */
export declare const TagSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    name: z.ZodString;
    color: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type Tag = z.infer<typeof TagSchema>;
/**
 * A record of a single field change on a task, providing an audit trail.
 */
export declare const TaskChangelogEntrySchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    task_id: z.ZodString;
    field: z.ZodString;
    old_value: z.ZodOptional<z.ZodString>;
    new_value: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type TaskChangelogEntry = z.infer<typeof TaskChangelogEntrySchema>;
/**
 * Parameters for creating a new task.
 */
export declare const CreateTaskParamsSchema: z.ZodObject<{
    title: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    parent_id: z.ZodOptional<z.ZodString>;
    type: z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>;
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    created_id: z.ZodString;
    assigned_id: z.ZodOptional<z.ZodString>;
    creator: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    assignee: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    project: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
    }, z.core.$strip>>;
    tag_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export type CreateTaskParams = z.infer<typeof CreateTaskParamsSchema>;
/**
 * Parameters for partially updating an existing task.
 *
 * @remarks Only provided fields are modified; omitted fields remain unchanged.
 */
export declare const UpdateTaskParamsSchema: z.ZodObject<{
    title: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    parent_id: z.ZodOptional<z.ZodString>;
    type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    assigned_id: z.ZodOptional<z.ZodString>;
    closed_id: z.ZodOptional<z.ZodString>;
    assignee: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    closer: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    project: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type UpdateTaskParams = z.infer<typeof UpdateTaskParamsSchema>;
/**
 * Additional fields to include in the task list response.
 * By default, list returns a reduced summary shape for performance.
 */
export declare const TaskIncludeFieldSchema: z.ZodEnum<{
    metadata: "metadata";
    description: "description";
    created_id: "created_id";
    deleted: "deleted";
    tags: "tags";
    subtask_count: "subtask_count";
}>;
export type TaskIncludeField = z.infer<typeof TaskIncludeFieldSchema>;
/**
 * Parameters for filtering and paginating the task list.
 */
export declare const ListTasksParamsSchema: z.ZodObject<{
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    assigned_id: z.ZodOptional<z.ZodString>;
    created_id: z.ZodOptional<z.ZodString>;
    parent_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    tag_id: z.ZodOptional<z.ZodString>;
    deleted: z.ZodOptional<z.ZodBoolean>;
    include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        metadata: "metadata";
        description: "description";
        created_id: "created_id";
        deleted: "deleted";
        tags: "tags";
        subtask_count: "subtask_count";
    }>>>;
    sort: z.ZodOptional<z.ZodString>;
    order: z.ZodOptional<z.ZodEnum<{
        asc: "asc";
        desc: "desc";
    }>>;
    limit: z.ZodOptional<z.ZodNumber>;
    offset: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type ListTasksParams = z.infer<typeof ListTasksParamsSchema>;
/**
 * Paginated list of tasks with total count.
 */
export declare const ListTasksResultSchema: z.ZodObject<{
    tasks: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        title: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        priority: z.ZodEnum<{
            high: "high";
            medium: "medium";
            low: "low";
            none: "none";
        }>;
        parent_id: z.ZodOptional<z.ZodString>;
        type: z.ZodEnum<{
            epic: "epic";
            feature: "feature";
            enhancement: "enhancement";
            bug: "bug";
            task: "task";
        }>;
        status: z.ZodEnum<{
            open: "open";
            in_progress: "in_progress";
            started: "started";
            done: "done";
            completed: "completed";
            closed: "closed";
            cancelled: "cancelled";
        }>;
        open_date: z.ZodOptional<z.ZodString>;
        in_progress_date: z.ZodOptional<z.ZodString>;
        closed_date: z.ZodOptional<z.ZodString>;
        created_id: z.ZodString;
        assigned_id: z.ZodOptional<z.ZodString>;
        closed_id: z.ZodOptional<z.ZodString>;
        deleted: z.ZodOptional<z.ZodBoolean>;
        creator: z.ZodOptional<z.ZodLazy<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>>;
        assignee: z.ZodOptional<z.ZodLazy<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>>;
        closer: z.ZodOptional<z.ZodLazy<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>>;
        project: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
        }, z.core.$strip>>;
        cancelled_date: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            created_at: z.ZodString;
            name: z.ZodString;
            color: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>>;
        comments: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            created_at: z.ZodString;
            updated_at: z.ZodString;
            task_id: z.ZodString;
            user_id: z.ZodString;
            author: z.ZodOptional<z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                type: z.ZodOptional<z.ZodEnum<{
                    human: "human";
                    agent: "agent";
                }>>;
            }, z.core.$strip>>;
            body: z.ZodString;
        }, z.core.$strip>>>>;
        subtask_count: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    total: z.ZodNumber;
    limit: z.ZodNumber;
    offset: z.ZodNumber;
}, z.core.$strip>;
export type ListTasksResult = z.infer<typeof ListTasksResultSchema>;
/**
 * Parameters for batch-deleting tasks by filter.
 * At least one filter must be provided.
 */
export declare const BatchDeleteTasksParamsSchema: z.ZodObject<{
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    parent_id: z.ZodOptional<z.ZodString>;
    created_id: z.ZodOptional<z.ZodString>;
    older_than: z.ZodOptional<z.ZodString>;
    limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type BatchDeleteTasksParams = z.infer<typeof BatchDeleteTasksParamsSchema>;
/**
 * Parameters for creating a new user entity.
 */
export interface CreateUserParams {
    /** The user's display name. */
    name: string;
    /** The user type — defaults to 'human'. */
    type?: 'human' | 'agent';
}
/**
 * Parameters for creating a new project entity.
 */
export interface CreateProjectParams {
    /** The project name. */
    name: string;
}
/**
 * A single task that was deleted in a batch operation.
 */
export declare const BatchDeletedTaskSchema: z.ZodObject<{
    id: z.ZodString;
    title: z.ZodString;
}, z.core.$strip>;
export type BatchDeletedTask = z.infer<typeof BatchDeletedTaskSchema>;
/**
 * Result of a batch delete operation.
 */
export declare const BatchDeleteTasksResultSchema: z.ZodObject<{
    deleted: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        title: z.ZodString;
    }, z.core.$strip>>;
    count: z.ZodNumber;
}, z.core.$strip>;
export type BatchDeleteTasksResult = z.infer<typeof BatchDeleteTasksResultSchema>;
/**
 * Parameters for batch-updating tasks by filter.
 * At least one filter must be provided. At least one update field must be provided.
 */
export declare const BatchUpdateTasksParamsSchema: z.ZodObject<{
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    parent_id: z.ZodOptional<z.ZodString>;
    created_id: z.ZodOptional<z.ZodString>;
    assigned_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    tag_id: z.ZodOptional<z.ZodString>;
    older_than: z.ZodOptional<z.ZodString>;
    ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    limit: z.ZodOptional<z.ZodNumber>;
    new_status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    new_priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    new_assigned_id: z.ZodOptional<z.ZodString>;
    new_assignee: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    new_title: z.ZodOptional<z.ZodString>;
    new_description: z.ZodOptional<z.ZodString>;
    new_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    new_type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    newer_than: z.ZodOptional<z.ZodString>;
    dry_run: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export type BatchUpdateTasksParams = z.infer<typeof BatchUpdateTasksParamsSchema>;
/**
 * A single task that was updated in a batch operation.
 */
export declare const BatchUpdatedTaskSchema: z.ZodObject<{
    id: z.ZodString;
    title: z.ZodString;
    status: z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>;
    priority: z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>;
}, z.core.$strip>;
export type BatchUpdatedTask = z.infer<typeof BatchUpdatedTaskSchema>;
/**
 * Result of a batch update operation.
 */
export declare const BatchUpdateTasksResultSchema: z.ZodObject<{
    updated: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        title: z.ZodString;
        status: z.ZodEnum<{
            open: "open";
            in_progress: "in_progress";
            started: "started";
            done: "done";
            completed: "completed";
            closed: "closed";
            cancelled: "cancelled";
        }>;
        priority: z.ZodEnum<{
            high: "high";
            medium: "medium";
            low: "low";
            none: "none";
        }>;
    }, z.core.$strip>>;
    count: z.ZodNumber;
    dry_run: z.ZodBoolean;
}, z.core.$strip>;
export type BatchUpdateTasksResult = z.infer<typeof BatchUpdateTasksResultSchema>;
/**
 * Parameters for batch-closing tasks by filter.
 * At least one filter must be provided.
 */
export declare const BatchCloseTasksParamsSchema: z.ZodObject<{
    status: z.ZodOptional<z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>>;
    type: z.ZodOptional<z.ZodEnum<{
        epic: "epic";
        feature: "feature";
        enhancement: "enhancement";
        bug: "bug";
        task: "task";
    }>>;
    priority: z.ZodOptional<z.ZodEnum<{
        high: "high";
        medium: "medium";
        low: "low";
        none: "none";
    }>>;
    parent_id: z.ZodOptional<z.ZodString>;
    created_id: z.ZodOptional<z.ZodString>;
    assigned_id: z.ZodOptional<z.ZodString>;
    project_id: z.ZodOptional<z.ZodString>;
    tag_id: z.ZodOptional<z.ZodString>;
    older_than: z.ZodOptional<z.ZodString>;
    newer_than: z.ZodOptional<z.ZodString>;
    ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
    limit: z.ZodOptional<z.ZodNumber>;
    closed_id: z.ZodOptional<z.ZodString>;
    closer: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    dry_run: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export type BatchCloseTasksParams = z.infer<typeof BatchCloseTasksParamsSchema>;
/**
 * A single task that was closed in a batch operation.
 */
export declare const BatchClosedTaskSchema: z.ZodObject<{
    id: z.ZodString;
    title: z.ZodString;
    status: z.ZodEnum<{
        open: "open";
        in_progress: "in_progress";
        started: "started";
        done: "done";
        completed: "completed";
        closed: "closed";
        cancelled: "cancelled";
    }>;
    closed_date: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type BatchClosedTask = z.infer<typeof BatchClosedTaskSchema>;
/**
 * Result of a batch close operation.
 */
export declare const BatchCloseTasksResultSchema: z.ZodObject<{
    closed: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        title: z.ZodString;
        status: z.ZodEnum<{
            open: "open";
            in_progress: "in_progress";
            started: "started";
            done: "done";
            completed: "completed";
            closed: "closed";
            cancelled: "cancelled";
        }>;
        closed_date: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    count: z.ZodNumber;
    dry_run: z.ZodBoolean;
}, z.core.$strip>;
export type BatchCloseTasksResult = z.infer<typeof BatchCloseTasksResultSchema>;
/**
 * Paginated list of changelog entries for a task.
 */
export declare const TaskChangelogResultSchema: z.ZodObject<{
    changelog: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        task_id: z.ZodString;
        field: z.ZodString;
        old_value: z.ZodOptional<z.ZodString>;
        new_value: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    total: z.ZodNumber;
    limit: z.ZodNumber;
    offset: z.ZodNumber;
}, z.core.$strip>;
export type TaskChangelogResult = z.infer<typeof TaskChangelogResultSchema>;
/**
 * Paginated list of comments on a task.
 */
export declare const ListCommentsResultSchema: z.ZodObject<{
    comments: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        updated_at: z.ZodString;
        task_id: z.ZodString;
        user_id: z.ZodString;
        author: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>;
        body: z.ZodString;
    }, z.core.$strip>>;
    total: z.ZodNumber;
    limit: z.ZodNumber;
    offset: z.ZodNumber;
}, z.core.$strip>;
export type ListCommentsResult = z.infer<typeof ListCommentsResultSchema>;
/**
 * List of all tags in the organization.
 */
export declare const ListTagsResultSchema: z.ZodObject<{
    tags: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        name: z.ZodString;
        color: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ListTagsResult = z.infer<typeof ListTagsResultSchema>;
/**
 * A file attachment on a task. Attachments are stored in S3 and accessed via presigned URLs.
 */
export declare const AttachmentSchema: z.ZodObject<{
    id: z.ZodString;
    created_at: z.ZodString;
    task_id: z.ZodString;
    user_id: z.ZodString;
    author: z.ZodOptional<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
    filename: z.ZodString;
    content_type: z.ZodOptional<z.ZodString>;
    size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type Attachment = z.infer<typeof AttachmentSchema>;
/**
 * Parameters for initiating a file upload to a task.
 */
export declare const CreateAttachmentParamsSchema: z.ZodObject<{
    filename: z.ZodString;
    content_type: z.ZodOptional<z.ZodString>;
    size: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type CreateAttachmentParams = z.infer<typeof CreateAttachmentParamsSchema>;
/**
 * Response from initiating an attachment upload. Contains a presigned S3 URL for direct upload.
 */
export declare const PresignUploadResponseSchema: z.ZodObject<{
    attachment: z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        task_id: z.ZodString;
        user_id: z.ZodString;
        author: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>;
        filename: z.ZodString;
        content_type: z.ZodOptional<z.ZodString>;
        size: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>;
    presigned_url: z.ZodString;
    expiry_seconds: z.ZodNumber;
}, z.core.$strip>;
export type PresignUploadResponse = z.infer<typeof PresignUploadResponseSchema>;
/**
 * Response containing a presigned S3 URL for downloading an attachment.
 */
export declare const PresignDownloadResponseSchema: z.ZodObject<{
    presigned_url: z.ZodString;
    expiry_seconds: z.ZodNumber;
}, z.core.$strip>;
export type PresignDownloadResponse = z.infer<typeof PresignDownloadResponseSchema>;
/**
 * List of attachments on a task.
 */
export declare const ListAttachmentsResultSchema: z.ZodObject<{
    attachments: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        created_at: z.ZodString;
        task_id: z.ZodString;
        user_id: z.ZodString;
        author: z.ZodOptional<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            type: z.ZodOptional<z.ZodEnum<{
                human: "human";
                agent: "agent";
            }>>;
        }, z.core.$strip>>;
        filename: z.ZodString;
        content_type: z.ZodOptional<z.ZodString>;
        size: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    total: z.ZodNumber;
}, z.core.$strip>;
export type ListAttachmentsResult = z.infer<typeof ListAttachmentsResultSchema>;
/**
 * List of all users who have been referenced in tasks (as creators, assignees, or closers).
 */
export declare const ListUsersResultSchema: z.ZodObject<{
    users: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        type: z.ZodOptional<z.ZodEnum<{
            human: "human";
            agent: "agent";
        }>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ListUsersResult = z.infer<typeof ListUsersResultSchema>;
/**
 * List of all projects that have been referenced in tasks.
 */
export declare const ListProjectsResultSchema: z.ZodObject<{
    projects: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ListProjectsResult = z.infer<typeof ListProjectsResultSchema>;
/**
 * Parameters for querying task activity time-series data.
 */
export declare const TaskActivityParamsSchema: z.ZodObject<{
    days: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type TaskActivityParams = z.infer<typeof TaskActivityParamsSchema>;
/**
 * A single day's snapshot of task counts by status.
 */
export declare const TaskActivityDataPointSchema: z.ZodObject<{
    date: z.ZodString;
    open: z.ZodNumber;
    inProgress: z.ZodNumber;
    done: z.ZodNumber;
    cancelled: z.ZodNumber;
}, z.core.$strip>;
export type TaskActivityDataPoint = z.infer<typeof TaskActivityDataPointSchema>;
/**
 * Task activity time-series data.
 */
export declare const TaskActivityResultSchema: z.ZodObject<{
    activity: z.ZodArray<z.ZodObject<{
        date: z.ZodString;
        open: z.ZodNumber;
        inProgress: z.ZodNumber;
        done: z.ZodNumber;
        cancelled: z.ZodNumber;
    }, z.core.$strip>>;
    days: z.ZodNumber;
}, z.core.$strip>;
export type TaskActivityResult = z.infer<typeof TaskActivityResultSchema>;
/**
 * Interface defining the contract for task storage operations.
 *
 * Implemented by {@link TaskStorageService}.
 */
export interface TaskStorage {
    /**
     * Create a new task.
     *
     * @param params - The task creation parameters
     * @returns The newly created task
     */
    create(params: CreateTaskParams): Promise<Task>;
    /**
     * Get a task by its ID.
     *
     * @param id - The unique task identifier
     * @returns The task if found, or `null` if not found
     */
    get(id: string): Promise<Task | null>;
    /**
     * List tasks with optional filtering and pagination.
     *
     * @param params - Optional filter and pagination parameters
     * @returns Paginated list of matching tasks
     */
    list(params?: ListTasksParams): Promise<ListTasksResult>;
    /**
     * Partially update an existing task.
     *
     * @param id - The unique task identifier
     * @param params - Fields to update (only provided fields are changed)
     * @returns The updated task
     */
    update(id: string, params: UpdateTaskParams): Promise<Task>;
    /**
     * Close a task by setting its status to done.
     *
     * @param id - The unique task identifier
     * @returns The task with updated closed_date and status set to done
     */
    close(id: string): Promise<Task>;
    /**
     * Soft-delete a task, marking it as deleted without permanent removal.
     *
     * @param id - The unique task identifier
     * @returns The soft-deleted task
     */
    softDelete(id: string): Promise<Task>;
    /**
     * Batch soft-delete tasks matching the given filters.
     * At least one filter must be provided.
     *
     * @param params - Filters to select which tasks to delete
     * @returns The list of deleted tasks and count
     */
    batchDelete(params: BatchDeleteTasksParams): Promise<BatchDeleteTasksResult>;
    /**
     * Batch update tasks matching the given filters.
     * At least one filter must be provided. At least one update field must be provided.
     *
     * @param params - Filters to select tasks and fields to update
     * @returns The list of updated tasks and count
     */
    batchUpdate(params: BatchUpdateTasksParams): Promise<BatchUpdateTasksResult>;
    /**
     * Batch close tasks matching the given filters.
     * At least one filter must be provided. Sets status to done and records closed_date.
     *
     * @param params - Filters to select which tasks to close
     * @returns The list of closed tasks and count
     */
    batchClose(params: BatchCloseTasksParams): Promise<BatchCloseTasksResult>;
    /**
     * Get the changelog (audit trail) for a task.
     *
     * @param id - The unique task identifier
     * @param params - Optional pagination parameters
     * @returns Paginated list of changelog entries
     */
    changelog(id: string, params?: {
        limit?: number;
        offset?: number;
    }): Promise<TaskChangelogResult>;
    /**
     * Create a comment on a task.
     *
     * @param taskId - The ID of the task to comment on
     * @param body - The comment text content
     * @param userId - The ID of the user authoring the comment
     * @param author - Optional entity reference with display name
     * @returns The newly created comment
     */
    createComment(taskId: string, body: string, userId: string, author?: EntityRef): Promise<Comment>;
    /**
     * Get a comment by its ID.
     *
     * @param commentId - The unique comment identifier
     * @returns The comment
     */
    getComment(commentId: string): Promise<Comment>;
    /**
     * Update a comment's body text.
     *
     * @param commentId - The unique comment identifier
     * @param body - The new comment text
     * @returns The updated comment
     */
    updateComment(commentId: string, body: string): Promise<Comment>;
    /**
     * Delete a comment.
     *
     * @param commentId - The unique comment identifier
     */
    deleteComment(commentId: string): Promise<void>;
    /**
     * List comments on a task with optional pagination.
     *
     * @param taskId - The ID of the task
     * @param params - Optional pagination parameters
     * @returns Paginated list of comments
     */
    listComments(taskId: string, params?: {
        limit?: number;
        offset?: number;
    }): Promise<ListCommentsResult>;
    /**
     * Create a new tag.
     *
     * @param name - The tag display name
     * @param color - Optional hex color code (e.g., `'#ff0000'`)
     * @returns The newly created tag
     */
    createTag(name: string, color?: string): Promise<Tag>;
    /**
     * Get a tag by its ID.
     *
     * @param tagId - The unique tag identifier
     * @returns The tag
     */
    getTag(tagId: string): Promise<Tag>;
    /**
     * Update a tag's name and optionally its color.
     *
     * @param tagId - The unique tag identifier
     * @param name - The new tag name
     * @param color - Optional new hex color code
     * @returns The updated tag
     */
    updateTag(tagId: string, name: string, color?: string): Promise<Tag>;
    /**
     * Delete a tag.
     *
     * @param tagId - The unique tag identifier
     */
    deleteTag(tagId: string): Promise<void>;
    /**
     * List all tags in the organization.
     *
     * @returns List of all tags
     */
    listTags(): Promise<ListTagsResult>;
    /**
     * Associate a tag with a task.
     *
     * @param taskId - The ID of the task
     * @param tagId - The ID of the tag to add
     */
    addTagToTask(taskId: string, tagId: string): Promise<void>;
    /**
     * Remove a tag association from a task.
     *
     * @param taskId - The ID of the task
     * @param tagId - The ID of the tag to remove
     */
    removeTagFromTask(taskId: string, tagId: string): Promise<void>;
    /**
     * List all tags associated with a specific task.
     *
     * @param taskId - The ID of the task
     * @returns Array of tags on the task
     */
    listTagsForTask(taskId: string): Promise<Tag[]>;
    /**
     * Initiate a file upload to a task. Returns a presigned S3 URL for direct upload.
     *
     * @param taskId - The ID of the task to attach the file to
     * @param params - Attachment metadata (filename, content type, size)
     * @returns The attachment record and a presigned upload URL
     */
    uploadAttachment(taskId: string, params: CreateAttachmentParams): Promise<PresignUploadResponse>;
    /**
     * Confirm that a file upload has completed successfully.
     *
     * @param attachmentId - The unique attachment identifier
     * @returns The confirmed attachment record
     */
    confirmAttachment(attachmentId: string): Promise<Attachment>;
    /**
     * Get a presigned S3 URL for downloading an attachment.
     *
     * @param attachmentId - The unique attachment identifier
     * @returns A presigned download URL
     */
    downloadAttachment(attachmentId: string): Promise<PresignDownloadResponse>;
    /**
     * List all attachments on a task.
     *
     * @param taskId - The ID of the task
     * @returns List of attachments with total count
     */
    listAttachments(taskId: string): Promise<ListAttachmentsResult>;
    /**
     * Delete an attachment.
     *
     * @param attachmentId - The unique attachment identifier
     */
    deleteAttachment(attachmentId: string): Promise<void>;
    /**
     * List all users who have been referenced in tasks.
     *
     * @returns List of user entity references
     */
    listUsers(): Promise<ListUsersResult>;
    /**
     * List all projects that have been referenced in tasks.
     *
     * @returns List of project entity references
     */
    listProjects(): Promise<ListProjectsResult>;
    /**
     * Create a new user entity.
     *
     * @param params - The user creation parameters
     * @returns The created user entity reference
     */
    createUser(params: CreateUserParams): Promise<UserEntityRef>;
    /**
     * Get a user entity by ID.
     *
     * @param userId - The unique user identifier
     * @returns The user entity reference
     */
    getUser(userId: string): Promise<UserEntityRef>;
    /**
     * Delete a user entity.
     *
     * @param userId - The unique user identifier
     */
    deleteUser(userId: string): Promise<void>;
    /**
     * Create a new project entity.
     *
     * @param params - The project creation parameters
     * @returns The created project entity reference
     */
    createProject(params: CreateProjectParams): Promise<EntityRef>;
    /**
     * Get a project entity by ID.
     *
     * @param projectId - The unique project identifier
     * @returns The project entity reference
     */
    getProject(projectId: string): Promise<EntityRef>;
    /**
     * Delete a project entity.
     *
     * @param projectId - The unique project identifier
     */
    deleteProject(projectId: string): Promise<void>;
    /**
     * Get task activity time-series data showing daily status counts.
     *
     * @param params - Optional parameters controlling the number of days to retrieve
     * @returns Time-series activity data
     */
    getActivity(params?: TaskActivityParams): Promise<TaskActivityResult>;
}
/**
 * Client for the Agentuity Task management service.
 *
 * Provides a full-featured project management API including task CRUD, hierarchical
 * organization (epics → features → tasks), comments, tags, file attachments via
 * presigned S3 URLs, changelog tracking, and activity analytics.
 *
 * Tasks support lifecycle management through status transitions (`open` → `in_progress`
 * → `done`/`cancelled`) with automatic date tracking for each transition.
 *
 * All methods validate inputs client-side and throw structured errors for invalid
 * parameters. API errors throw {@link ServiceException}.
 *
 * @example
 * ```typescript
 * const tasks = new TaskStorageService(baseUrl, adapter);
 *
 * // Create a task
 * const task = await tasks.create({
 *   title: 'Implement login flow',
 *   type: 'feature',
 *   created_id: 'user_123',
 *   creator: { id: 'user_123', name: 'Alice' },
 *   priority: 'high',
 * });
 *
 * // Add a comment
 * await tasks.createComment(task.id, 'Started working on this', 'user_123');
 *
 * // List open tasks
 * const { tasks: openTasks } = await tasks.list({ status: 'open' });
 * ```
 */
export declare class TaskStorageService implements TaskStorage {
    #private;
    /**
     * Creates a new TaskStorageService instance.
     *
     * @param baseUrl - The base URL of the task management API
     * @param adapter - The HTTP fetch adapter used for making API requests
     */
    constructor(baseUrl: string, adapter: FetchAdapter);
    /**
     * Create a new task.
     *
     * @param params - The task creation parameters including title, type, and optional fields
     * @returns The newly created task
     * @throws {@link TaskTitleRequiredError} if the title is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const task = await tasks.create({
     *   title: 'Fix login bug',
     *   type: 'bug',
     *   created_id: 'user_123',
     *   priority: 'high',
     *   creator: { id: 'user_123', name: 'Alice' },
     *   project: { id: 'proj_456', name: 'Auth Service' },
     * });
     * console.log('Created:', task.id);
     * ```
     */
    create(params: CreateTaskParams): Promise<Task>;
    /**
     * Get a task by its ID.
     *
     * @param id - The unique task identifier
     * @returns The task if found, or `null` if the task does not exist
     * @throws {@link TaskIdRequiredError} if the ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const task = await tasks.get('task_abc123');
     * if (task) {
     *   console.log(task.title, task.status);
     * } else {
     *   console.log('Task not found');
     * }
     * ```
     */
    get(id: string): Promise<Task | null>;
    /**
     * List tasks with optional filtering and pagination.
     *
     * @param params - Optional filter and pagination parameters
     * @returns Paginated list of tasks matching the filters
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * // List all open high-priority bugs
     * const result = await tasks.list({
     *   status: 'open',
     *   type: 'bug',
     *   priority: 'high',
     *   sort: '-created_at',
     *   limit: 20,
     * });
     * console.log(`Found ${result.total} bugs, showing ${result.tasks.length}`);
     * ```
     */
    list(params?: ListTasksParams): Promise<ListTasksResult>;
    /**
     * Partially update an existing task.
     *
     * @param id - The unique task identifier
     * @param params - Fields to update; only provided fields are changed
     * @returns The updated task
     * @throws {@link TaskIdRequiredError} if the ID is empty or not a string
     * @throws {@link TaskTitleRequiredError} if a title is provided but is empty
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const updated = await tasks.update('task_abc123', {
     *   status: 'in_progress',
     *   priority: 'high',
     *   assignee: { id: 'user_456', name: 'Bob' },
     * });
     * console.log('Updated status:', updated.status);
     * ```
     */
    update(id: string, params: UpdateTaskParams): Promise<Task>;
    /**
     * Close a task by setting its status to done.
     *
     * @param id - The unique task identifier
     * @returns The task with status set to done and updated closed_date
     * @throws {@link TaskIdRequiredError} if the ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const task = await tasks.close('task_abc123');
     * console.log('Done at:', task.closed_date);
     * ```
     */
    close(id: string): Promise<Task>;
    /**
     * Get the changelog (audit trail) for a task, showing all field changes over time.
     *
     * @param id - The unique task identifier
     * @param params - Optional pagination parameters
     * @returns Paginated list of changelog entries ordered by most recent first
     * @throws {@link TaskIdRequiredError} if the ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { changelog, total } = await tasks.changelog('task_abc123', {
     *   limit: 10,
     *   offset: 0,
     * });
     * for (const entry of changelog) {
     *   console.log(`${entry.field}: ${entry.old_value} → ${entry.new_value}`);
     * }
     * ```
     */
    changelog(id: string, params?: {
        limit?: number;
        offset?: number;
    }): Promise<TaskChangelogResult>;
    /**
     * Soft-delete a task, marking it as deleted without permanent removal.
     *
     * @param id - The unique task identifier
     * @returns The soft-deleted task
     * @throws {@link TaskIdRequiredError} if the ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const deleted = await tasks.softDelete('task_abc123');
     * console.log('Soft-deleted task:', deleted.id);
     * ```
     */
    softDelete(id: string): Promise<Task>;
    /**
     * Batch soft-delete tasks matching the given filters.
     * At least one filter must be provided. The server caps the limit at 200.
     *
     * @param params - Filters to select which tasks to delete
     * @returns The list of deleted tasks and count
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const result = await tasks.batchDelete({ status: 'done', older_than: '7d', limit: 50 });
     * console.log(`Deleted ${result.count} tasks`);
     * ```
     */
    batchDelete(params: BatchDeleteTasksParams): Promise<BatchDeleteTasksResult>;
    /**
     * Batch update tasks matching the given filters.
     * At least one filter (or ids) must be provided. At least one update field must be provided.
     *
     * @param params - Filters to select tasks and fields to update
     * @returns The list of updated tasks and count
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const result = await tasks.batchUpdate({
     *   status: 'open',
     *   new_status: 'in_progress',
     *   new_priority: 'high',
     *   limit: 50,
     * });
     * console.log(`Updated ${result.count} tasks`);
     * ```
     */
    batchUpdate(params: BatchUpdateTasksParams): Promise<BatchUpdateTasksResult>;
    /**
     * Batch close tasks matching the given filters.
     * At least one filter (or ids) must be provided. Sets status to done and records closed_date.
     *
     * @param params - Filters to select which tasks to close
     * @returns The list of closed tasks and count
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const result = await tasks.batchClose({
     *   status: 'in_progress',
     *   older_than: '7d',
     *   limit: 50,
     *   dry_run: true,
     * });
     * console.log(`Would close ${result.count} tasks`);
     * ```
     */
    batchClose(params: BatchCloseTasksParams): Promise<BatchCloseTasksResult>;
    /**
     * Create a comment on a task.
     *
     * @param taskId - The ID of the task to comment on
     * @param body - The comment text content (must be non-empty)
     * @param userId - The ID of the user authoring the comment
     * @param author - Optional entity reference with the author's display name
     * @returns The newly created comment
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link CommentBodyRequiredError} if the body is empty or not a string
     * @throws {@link UserIdRequiredError} if the user ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const comment = await tasks.createComment(
     *   'task_abc123',
     *   'This is ready for review.',
     *   'user_456',
     *   { id: 'user_456', name: 'Bob' },
     * );
     * console.log('Comment created:', comment.id);
     * ```
     */
    createComment(taskId: string, body: string, userId: string, author?: EntityRef): Promise<Comment>;
    /**
     * Get a comment by its ID.
     *
     * @param commentId - The unique comment identifier
     * @returns The comment
     * @throws {@link CommentIdRequiredError} if the comment ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const comment = await tasks.getComment('comment_xyz789');
     * console.log(`${comment.author?.name}: ${comment.body}`);
     * ```
     */
    getComment(commentId: string): Promise<Comment>;
    /**
     * Update a comment's body text.
     *
     * @param commentId - The unique comment identifier
     * @param body - The new comment text (must be non-empty)
     * @returns The updated comment
     * @throws {@link CommentIdRequiredError} if the comment ID is empty or not a string
     * @throws {@link CommentBodyRequiredError} if the body is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const updated = await tasks.updateComment(
     *   'comment_xyz789',
     *   'Updated: This is now ready for final review.',
     * );
     * console.log('Updated at:', updated.updated_at);
     * ```
     */
    updateComment(commentId: string, body: string): Promise<Comment>;
    /**
     * Delete a comment permanently.
     *
     * @param commentId - The unique comment identifier
     * @throws {@link CommentIdRequiredError} if the comment ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.deleteComment('comment_xyz789');
     * console.log('Comment deleted');
     * ```
     */
    deleteComment(commentId: string): Promise<void>;
    /**
     * List comments on a task with optional pagination.
     *
     * @param taskId - The ID of the task whose comments to list
     * @param params - Optional pagination parameters
     * @returns Paginated list of comments
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { comments, total } = await tasks.listComments('task_abc123', {
     *   limit: 25,
     *   offset: 0,
     * });
     * for (const c of comments) {
     *   console.log(`${c.author?.name}: ${c.body}`);
     * }
     * ```
     */
    listComments(taskId: string, params?: {
        limit?: number;
        offset?: number;
    }): Promise<ListCommentsResult>;
    /**
     * Create a new tag for categorizing tasks.
     *
     * @param name - The tag display name (must be non-empty)
     * @param color - Optional hex color code (e.g., `'#ff0000'`)
     * @returns The newly created tag
     * @throws {@link TagNameRequiredError} if the name is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const tag = await tasks.createTag('urgent', '#ff0000');
     * console.log('Created tag:', tag.id, tag.name);
     * ```
     */
    createTag(name: string, color?: string): Promise<Tag>;
    /**
     * Get a tag by its ID.
     *
     * @param tagId - The unique tag identifier
     * @returns The tag
     * @throws {@link TagIdRequiredError} if the tag ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const tag = await tasks.getTag('tag_def456');
     * console.log(`${tag.name} (${tag.color})`);
     * ```
     */
    getTag(tagId: string): Promise<Tag>;
    /**
     * Update a tag's name and optionally its color.
     *
     * @param tagId - The unique tag identifier
     * @param name - The new tag name (must be non-empty)
     * @param color - Optional new hex color code
     * @returns The updated tag
     * @throws {@link TagIdRequiredError} if the tag ID is empty or not a string
     * @throws {@link TagNameRequiredError} if the name is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const updated = await tasks.updateTag('tag_def456', 'critical', '#cc0000');
     * console.log('Updated:', updated.name);
     * ```
     */
    updateTag(tagId: string, name: string, color?: string): Promise<Tag>;
    /**
     * Delete a tag permanently.
     *
     * @param tagId - The unique tag identifier
     * @throws {@link TagIdRequiredError} if the tag ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.deleteTag('tag_def456');
     * console.log('Tag deleted');
     * ```
     */
    deleteTag(tagId: string): Promise<void>;
    /**
     * List all tags in the organization.
     *
     * @returns List of all tags
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { tags } = await tasks.listTags();
     * for (const tag of tags) {
     *   console.log(`${tag.name} (${tag.color ?? 'no color'})`);
     * }
     * ```
     */
    listTags(): Promise<ListTagsResult>;
    /**
     * Associate a tag with a task.
     *
     * @param taskId - The ID of the task
     * @param tagId - The ID of the tag to add
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link TagIdRequiredError} if the tag ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.addTagToTask('task_abc123', 'tag_def456');
     * console.log('Tag added to task');
     * ```
     */
    addTagToTask(taskId: string, tagId: string): Promise<void>;
    /**
     * Remove a tag association from a task.
     *
     * @param taskId - The ID of the task
     * @param tagId - The ID of the tag to remove
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link TagIdRequiredError} if the tag ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.removeTagFromTask('task_abc123', 'tag_def456');
     * console.log('Tag removed from task');
     * ```
     */
    removeTagFromTask(taskId: string, tagId: string): Promise<void>;
    /**
     * List all tags associated with a specific task.
     *
     * @param taskId - The ID of the task
     * @returns Array of tags on the task
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const tags = await tasks.listTagsForTask('task_abc123');
     * console.log('Tags:', tags.map((t) => t.name).join(', '));
     * ```
     */
    listTagsForTask(taskId: string): Promise<Tag[]>;
    /**
     * Initiate a file upload to a task. Returns a presigned S3 URL for direct upload.
     *
     * @remarks
     * After receiving the presigned URL, upload the file content via HTTP PUT to that URL.
     * Then call {@link TaskStorageService.confirmAttachment | confirmAttachment} to finalize.
     *
     * @param taskId - The ID of the task to attach the file to
     * @param params - Attachment metadata including filename, content type, and size
     * @returns The created attachment record and a presigned upload URL
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { attachment, presigned_url } = await tasks.uploadAttachment(
     *   'task_abc123',
     *   { filename: 'report.pdf', content_type: 'application/pdf', size: 102400 },
     * );
     *
     * // Upload the file to S3
     * await fetch(presigned_url, { method: 'PUT', body: fileContent });
     *
     * // Confirm the upload
     * await tasks.confirmAttachment(attachment.id);
     * ```
     */
    uploadAttachment(taskId: string, params: CreateAttachmentParams): Promise<PresignUploadResponse>;
    /**
     * Confirm that a file upload has completed successfully.
     *
     * @remarks
     * Call this after successfully uploading the file to the presigned URL
     * returned by {@link TaskStorageService.uploadAttachment | uploadAttachment}.
     *
     * @param attachmentId - The unique attachment identifier
     * @returns The confirmed attachment record
     * @throws {@link AttachmentIdRequiredError} if the attachment ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const confirmed = await tasks.confirmAttachment('att_ghi789');
     * console.log('Confirmed:', confirmed.filename);
     * ```
     */
    confirmAttachment(attachmentId: string): Promise<Attachment>;
    /**
     * Get a presigned S3 URL for downloading an attachment.
     *
     * @param attachmentId - The unique attachment identifier
     * @returns A presigned download URL with expiry information
     * @throws {@link AttachmentIdRequiredError} if the attachment ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { presigned_url, expiry_seconds } = await tasks.downloadAttachment('att_ghi789');
     * console.log(`Download URL (expires in ${expiry_seconds}s):`, presigned_url);
     * ```
     */
    downloadAttachment(attachmentId: string): Promise<PresignDownloadResponse>;
    /**
     * List all attachments on a task.
     *
     * @param taskId - The ID of the task
     * @returns List of attachments with total count
     * @throws {@link TaskIdRequiredError} if the task ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { attachments, total } = await tasks.listAttachments('task_abc123');
     * for (const att of attachments) {
     *   console.log(`${att.filename} (${att.content_type}, ${att.size} bytes)`);
     * }
     * ```
     */
    listAttachments(taskId: string): Promise<ListAttachmentsResult>;
    /**
     * Delete an attachment permanently.
     *
     * @param attachmentId - The unique attachment identifier
     * @throws {@link AttachmentIdRequiredError} if the attachment ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.deleteAttachment('att_ghi789');
     * console.log('Attachment deleted');
     * ```
     */
    deleteAttachment(attachmentId: string): Promise<void>;
    /**
     * List all users who have been referenced in tasks (as creators, assignees, or closers).
     *
     * @returns List of user entity references
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { users } = await tasks.listUsers();
     * for (const user of users) {
     *   console.log(`${user.name} (${user.id})`);
     * }
     * ```
     */
    listUsers(): Promise<ListUsersResult>;
    /**
     * List all projects that have been referenced in tasks.
     *
     * @returns List of project entity references
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { projects } = await tasks.listProjects();
     * for (const project of projects) {
     *   console.log(`${project.name} (${project.id})`);
     * }
     * ```
     */
    listProjects(): Promise<ListProjectsResult>;
    /**
     * Create a new user entity.
     *
     * @param params - The user creation parameters including name and optional type
     * @returns The created user entity reference
     * @throws {@link UserNameRequiredError} if the name is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const user = await tasks.createUser({ name: 'Jane Doe', type: 'human' });
     * console.log('Created user:', user.id, user.name);
     * ```
     */
    createUser(params: CreateUserParams): Promise<UserEntityRef>;
    /**
     * Get a user entity by ID.
     *
     * @param userId - The unique user identifier
     * @returns The user entity reference
     * @throws {@link UserIdRequiredError} if the user ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const user = await tasks.getUser('usr_abc123');
     * console.log(`${user.name} (${user.type})`);
     * ```
     */
    getUser(userId: string): Promise<UserEntityRef>;
    /**
     * Delete a user entity.
     *
     * @param userId - The unique user identifier
     * @throws {@link UserIdRequiredError} if the user ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.deleteUser('usr_abc123');
     * console.log('User deleted');
     * ```
     */
    deleteUser(userId: string): Promise<void>;
    /**
     * Create a new project entity.
     *
     * @param params - The project creation parameters including name
     * @returns The created project entity reference
     * @throws {@link ProjectNameRequiredError} if the name is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const project = await tasks.createProject({ name: 'My Project' });
     * console.log('Created project:', project.id, project.name);
     * ```
     */
    createProject(params: CreateProjectParams): Promise<EntityRef>;
    /**
     * Get a project entity by ID.
     *
     * @param projectId - The unique project identifier
     * @returns The project entity reference
     * @throws {@link ProjectIdRequiredError} if the project ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const project = await tasks.getProject('prj_abc123');
     * console.log(`${project.name} (${project.id})`);
     * ```
     */
    getProject(projectId: string): Promise<EntityRef>;
    /**
     * Delete a project entity.
     *
     * @param projectId - The unique project identifier
     * @throws {@link ProjectIdRequiredError} if the project ID is empty or not a string
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * await tasks.deleteProject('prj_abc123');
     * console.log('Project deleted');
     * ```
     */
    deleteProject(projectId: string): Promise<void>;
    /**
     * Get task activity time-series data showing daily task counts by status.
     *
     * @param params - Optional parameters controlling the number of days to retrieve
     * @returns Time-series activity data with daily snapshots
     * @throws {@link ServiceException} if the API request fails
     *
     * @example
     * ```typescript
     * const { activity, days } = await tasks.getActivity({ days: 30 });
     * console.log(`Activity over ${days} days:`);
     * for (const point of activity) {
     *   console.log(`${point.date}: ${point.open} open, ${point.inProgress} in progress`);
     * }
     * ```
     */
    getActivity(params?: TaskActivityParams): Promise<TaskActivityResult>;
}
//# sourceMappingURL=service.d.ts.map