/** * pop task update — edit any updatable task field via TaskManager.updateTask. * * updateTask is a FULL OVERWRITE on-chain: * updateTask(id, newPayout, newTitle, newMetadataHash, newBountyToken, * newBountyPayout, newAbsoluteDeadline, newCompletionWindow) * so this command reads the current state first (chain via task-lens for * payout/bounty/deadlines, subgraph + IPFS for title/description/metadata) * and merges only the flags the caller passed. Metadata is re-pinned to IPFS * only when --name/--description actually change it. * * Status gate — VERIFIED against contracts origin/main src/TaskManager.sol: * `if (t.status == Status.COMPLETED || t.status == Status.CANCELLED) revert BadStatus();` * i.e. UNCLAIMED, CLAIMED and SUBMITTED are all editable; only the terminal * states are immutable. (The permission gate is what narrows post-claim * editing: CREATE-holders may edit only while UNCLAIMED; executor / project * manager / EDIT_FULL(bit 128) may edit any non-terminal status.) * * Deadline semantics — also verified: a PAST --deadline is deliberately * accepted by the contract on update (unlike create). It is the admin lever * that opens an abandoned CLAIMED task to takeover, since cancelTask is * UNCLAIMED-only. * * Permissions are NOT pre-checked: TaskPerm masks are not readable on-chain, * so a decoded Unauthorized revert (with the perms hint from the error * catalog) is the authoritative answer. */ import type { Argv, ArgumentsCamelCase } from 'yargs'; interface UpdateArgs { org: string; task: string; payout?: number; name?: string; description?: string; 'bounty-token'?: string; 'bounty-amount'?: number; deadline?: string; 'completion-window'?: string; chain?: number; rpc?: string; 'private-key'?: string; 'dry-run'?: boolean; yes?: boolean; preflight?: boolean; } /** * parseDeadline for the update path: the contract deliberately accepts a * PAST absolute deadline here (admin lever — immediately opens a CLAIMED * task to takeover), so downgrade parseDeadline's past-check to a warning. * Only absolute forms (unix seconds / ISO date) can resolve to the past — * relative forms ("7d") are always future — so re-parsing with now=0 never * changes relative math. */ export declare function parseUpdateDeadline(input: string): { value: number; isPast: boolean; }; export declare const updateHandler: { builder: (yargs: Argv) => Argv<{ task: string; } & { payout: number | undefined; } & { name: string | undefined; } & { description: string | undefined; } & { "bounty-token": string | undefined; } & { "bounty-amount": number | undefined; } & { deadline: string | undefined; } & { "completion-window": string | undefined; }>; handler: (argv: ArgumentsCamelCase) => Promise; }; export {};