diff options
Diffstat (limited to 'makima/frontend/src/lib/api.ts')
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index a4ec4db..b34f786 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3703,7 +3703,7 @@ export async function reorderDirectiveContract( async function postContractAction( contractId: string, - action: "start" | "pause" | "complete" | "unlock", + action: "start" | "pause" | "complete" | "unlock" | "reopen", body?: object, ): Promise<DirectiveContract> { const res = await authFetch(`${API_BASE}/api/v1/contracts/${contractId}/${action}`, { @@ -3743,6 +3743,14 @@ export async function unlockDirectiveContract(contractId: string): Promise<Direc return postContractAction(contractId, "unlock"); } +/** Reopen a shipped contract for amendment. Backend flips the contract + * to `active`, re-activates the directive, and clears the prior PR + * linkage so the orchestrator replans against the contract body with + * an amendment framing. */ +export async function reopenDirectiveContract(contractId: string): Promise<DirectiveContract> { + return postContractAction(contractId, "reopen"); +} + /** Steps and tasks attached to a single contract. Drives the per-contract * `tasks/` subfolder in the sidebar — when the contract ships, its * tasks visually move with it. */ |
