import { Result } from 'neverthrow'; import { PrTaskStatus } from './status.js'; import { PrTaskId } from './pr_task_id.js'; import { AcceptanceCriterion } from './acceptance_criterion.js'; import { type RequestedDefinitionOfReady } from './definition_of_ready.js'; type ConstructPrTask = (params: RequestedPrTask) => Result; type ApplyUpdate = (task: PrTask, update: PrTaskUpdate) => Result; type AssignWorktree = (task: PrTask, worktreeName: string) => Result; type RequestedPrTask = { id: string; title: string; description: string; dependencies?: PrTaskId[]; acceptanceCriteria: ReadonlyArray<{ readonly scenario: string; readonly given: readonly string[]; readonly when: readonly string[]; readonly then: readonly string[]; }>; definitionOfReady: RequestedDefinitionOfReady; }; type PrTaskUpdate = { title?: string; description?: string; status?: PrTaskStatus; dependencies?: PrTaskId[]; }; export type PrTask = { readonly id: PrTaskId; readonly title: string; readonly description: string; readonly branch: string; readonly worktree: string; readonly status: PrTaskStatus; readonly dependencies: PrTaskId[]; readonly acceptanceCriteria: readonly AcceptanceCriterion[]; readonly definitionOfReady: readonly string[]; readonly assignedWorktree?: string; }; type PrTaskError = { type: 'InvalidTitle' | 'InvalidDescription' | 'InvalidId' | 'InvalidStatusTransition' | 'TaskCreationFailed' | 'AcceptanceCriteriaCreationFailed' | 'DefinitionOfReadyValidationFailed' | 'InvalidWorktreeName'; message: string; }; declare const PrTaskError: { readonly create: (type: PrTaskError["type"], message: string) => PrTaskError; }; export declare const PrTask: { readonly create: ConstructPrTask; readonly applyUpdate: ApplyUpdate; readonly assignWorktree: AssignWorktree; }; export {}; //# sourceMappingURL=pr_task.d.ts.map