Fetch the current draft chunks for a sandbox. `status_filter` may be `"pending"`, `"approved"`, `"rejected"`, or empty for all. Used by `policy.local`'s `GET /v1/proposals/{id}` and `/wait` routes to inspect proposal state.
(
&self,
sandbox_name: &str,
status_filter: &str,
)
| 793 | /// `policy.local`'s `GET /v1/proposals/{id}` and `/wait` routes to |
| 794 | /// inspect proposal state. |
| 795 | pub async fn get_draft_policy( |
| 796 | &self, |
| 797 | sandbox_name: &str, |
| 798 | status_filter: &str, |
| 799 | ) -> Result<Vec<PolicyChunk>> { |
| 800 | let response = self |
| 801 | .client |
| 802 | .clone() |
| 803 | .get_draft_policy(GetDraftPolicyRequest { |
| 804 | name: sandbox_name.to_string(), |
| 805 | status_filter: status_filter.to_string(), |
| 806 | }) |
| 807 | .await |
| 808 | .into_diagnostic()?; |
| 809 | Ok(response.into_inner().chunks) |
| 810 | } |
| 811 | |
| 812 | /// Report policy load status back to the server. |
| 813 | pub async fn report_policy_status( |
no outgoing calls
no test coverage detected