import { Prisma, Task, TaskStage } from '@prisma/client';
import { DeliveryRuleKey } from '../lib/deliveryRules';
import { AuthUser } from '../lib/rbac';
type ProjectPolicy = {
    id: string;
    adminId: string;
    internalStatuses: {
        id: string;
        text: string;
        stage: TaskStage;
        active: boolean;
    }[];
} & Partial<Record<DeliveryRuleKey, boolean>>;
type TaskFull = Task & {
    assignments: {
        employeeId: string;
        allocatedHours: Prisma.Decimal;
    }[];
    attachments: {
        kind: string | null;
    }[];
    project: ProjectPolicy;
};
export declare function validateGateA(task: TaskFull): Promise<string[]>;
export declare function validateGateB(task: TaskFull): Promise<string[]>;
export declare function validateGateC(task: TaskFull): Promise<string[]>;
export declare function validateTransition(task: TaskFull, toStageLabel: string): Promise<{
    ok: boolean;
    errors: string[];
    reverse?: boolean;
}>;
export declare function tryTransition(user: AuthUser, taskId: string, toStageLabel: string, opts?: {
    reason?: string;
}): Promise<{
    ok: true;
    errors: string[];
}>;
export declare function reopenTask(user: AuthUser, taskId: string, reason: string): Promise<{
    ok: true;
}>;
export declare function returnToInProgress(user: AuthUser, taskId: string, reason: string): Promise<{
    ok: true;
    errors: string[];
}>;
/** Undo accidental Inbox → In Progress (reason required). */
export declare function returnToInbox(user: AuthUser, taskId: string, reason: string): Promise<{
    ok: true;
    errors: string[];
}>;
export declare function assertTaskAccess(user: AuthUser, task: {
    projectId: string;
    assigneeId: string | null;
    contributors: string[];
    stage: TaskStage;
}, action: 'view_task' | 'edit_task' | 'change_task_status', assignmentEmployeeIds?: string[]): Promise<void>;
export {};
