import { type ListFilter, type StateMachineDef, type Task, type TaskFireOptions, type TaskList, type Tasks } from "../../../task-list/dist/index.js"; type MockTaskListMethod = "allTasks" | "get" | "list" | "lists" | "create" | "update" | "setState" | "fire" | "comment" | "refresh" | "all" | "canFire" | "events" | "delete" | "move" | "reorder" | "moveBetweenLists"; export interface MockTaskListEvent { method: MockTaskListMethod; args: readonly unknown[]; result: unknown; } export interface MockTaskListClock { now(): Date | number | string; } export interface MockTaskListFailures { getError?: (taskId: string) => Error | undefined; setStateError?: (taskId: string, from: string, to: string) => Error | undefined; refreshError?: (taskId: string) => Error | undefined; allTasksError?: (state: string | undefined) => Error | undefined; transient?: MockTaskListTransientFailures; } export type MockTaskListTransientFailures = Partial Error); }>>; export interface CreateMockTaskListOptions { tasks?: readonly Task[]; lists?: readonly string[]; stateMachine?: StateMachineDef; failures?: MockTaskListFailures; clock?: MockTaskListClock; readers?: MockTaskListReaders; } export interface MockTaskListReaders { allTasks?: (filter: ListFilter | undefined, store: MockTaskListReadStore) => readonly Task[] | Promise; get?: (qualifiedId: string, store: MockTaskListReadStore) => Task | Promise; } export interface MockTaskListReadStore { get(qualifiedId: string): Task; listNames(): string[]; } export interface MockTaskListMutationStore { get(qualifiedId: string): Task; set(task: Task): void; delete(qualifiedId: string): void; listNames(): string[]; } export type MockTasks = Tasks & { setState(id: string, state: string, opts?: TaskFireOptions): Promise; refresh(id: string): Promise; comment(id: string, body: string): Promise; }; export type MockTaskList = TaskList & { readonly taskList: TaskList; readonly stateMachine: StateMachineDef; readonly events: MockTaskListEvent[]; setState(qualifiedId: string, state: string, opts?: TaskFireOptions): Promise; refresh(qualifiedId: string): Promise; mutate(mutator: (store: MockTaskListMutationStore) => void): void; }; export declare function createMockTaskList(options?: CreateMockTaskListOptions): MockTaskList; export {};