summaryrefslogtreecommitdiff
path: root/makima/src/daemon/api/supervisor.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-15 11:34:06 +0000
committersoryu <soryu@soryu.co>2026-01-15 11:34:06 +0000
commit1f853a39334cc80bb7a27142076c64ad0214c037 (patch)
tree07452cce86ff15928ac0d265bb2a7b945612d956 /makima/src/daemon/api/supervisor.rs
parentf432cd73e17ae3470349431ab344d9168be4d580 (diff)
downloadsoryu-1f853a39334cc80bb7a27142076c64ad0214c037.tar.gz
soryu-1f853a39334cc80bb7a27142076c64ad0214c037.zip
Advance stages of a contract
Diffstat (limited to 'makima/src/daemon/api/supervisor.rs')
-rw-r--r--makima/src/daemon/api/supervisor.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/makima/src/daemon/api/supervisor.rs b/makima/src/daemon/api/supervisor.rs
index a1e8682..0a68980 100644
--- a/makima/src/daemon/api/supervisor.rs
+++ b/makima/src/daemon/api/supervisor.rs
@@ -211,4 +211,21 @@ impl ApiClient {
};
self.post("/api/v1/mesh/supervisor/questions", &req).await
}
+
+ /// Advance contract to a new phase.
+ pub async fn supervisor_advance_phase(
+ &self,
+ contract_id: Uuid,
+ phase: &str,
+ ) -> Result<JsonValue, ApiError> {
+ #[derive(Serialize)]
+ struct AdvancePhaseRequest {
+ phase: String,
+ }
+ let req = AdvancePhaseRequest {
+ phase: phase.to_string(),
+ };
+ self.post(&format!("/api/v1/contracts/{}/phase", contract_id), &req)
+ .await
+ }
}