Skip to main content

hanzo_client/apis/
deploy_api.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18/// struct for typed errors of method [`get_deploy_applications`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum GetDeployApplicationsError {
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`get_deploy_applications_by_name`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum GetDeployApplicationsByNameError {
29    UnknownValue(serde_json::Value),
30}
31
32/// struct for typed errors of method [`get_deploy_applications_by_name_resource_tree`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum GetDeployApplicationsByNameResourceTreeError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`get_deploy_applications_by_name_revisions_by_revision_metadata`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum GetDeployApplicationsByNameRevisionsByRevisionMetadataError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`get_deploy_applications_by_name_syncwindows`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum GetDeployApplicationsByNameSyncwindowsError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`get_deploy_callback`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum GetDeployCallbackError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`get_deploy_clusters`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum GetDeployClustersError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`get_deploy_gitops`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum GetDeployGitopsError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`get_deploy_health`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum GetDeployHealthError {
78    Status503(models::DeployHealth),
79    UnknownValue(serde_json::Value),
80}
81
82/// struct for typed errors of method [`get_deploy_login`]
83#[derive(Debug, Clone, Serialize, Deserialize)]
84#[serde(untagged)]
85pub enum GetDeployLoginError {
86    UnknownValue(serde_json::Value),
87}
88
89/// struct for typed errors of method [`get_deploy_projects`]
90#[derive(Debug, Clone, Serialize, Deserialize)]
91#[serde(untagged)]
92pub enum GetDeployProjectsError {
93    UnknownValue(serde_json::Value),
94}
95
96/// struct for typed errors of method [`get_deploy_session_userinfo`]
97#[derive(Debug, Clone, Serialize, Deserialize)]
98#[serde(untagged)]
99pub enum GetDeploySessionUserinfoError {
100    UnknownValue(serde_json::Value),
101}
102
103/// struct for typed errors of method [`get_deploy_settings`]
104#[derive(Debug, Clone, Serialize, Deserialize)]
105#[serde(untagged)]
106pub enum GetDeploySettingsError {
107    UnknownValue(serde_json::Value),
108}
109
110/// struct for typed errors of method [`get_deploy_stream_applications`]
111#[derive(Debug, Clone, Serialize, Deserialize)]
112#[serde(untagged)]
113pub enum GetDeployStreamApplicationsError {
114    UnknownValue(serde_json::Value),
115}
116
117/// struct for typed errors of method [`get_deploy_stream_applications_by_name_resource_tree`]
118#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(untagged)]
120pub enum GetDeployStreamApplicationsByNameResourceTreeError {
121    UnknownValue(serde_json::Value),
122}
123
124/// struct for typed errors of method [`get_deploy_version`]
125#[derive(Debug, Clone, Serialize, Deserialize)]
126#[serde(untagged)]
127pub enum GetDeployVersionError {
128    UnknownValue(serde_json::Value),
129}
130
131/// struct for typed errors of method [`post_deploy_applications_by_name_rollback`]
132#[derive(Debug, Clone, Serialize, Deserialize)]
133#[serde(untagged)]
134pub enum PostDeployApplicationsByNameRollbackError {
135    UnknownValue(serde_json::Value),
136}
137
138/// struct for typed errors of method [`post_deploy_applications_by_name_sync`]
139#[derive(Debug, Clone, Serialize, Deserialize)]
140#[serde(untagged)]
141pub enum PostDeployApplicationsByNameSyncError {
142    UnknownValue(serde_json::Value),
143}
144
145/// struct for typed errors of method [`post_deploy_logout`]
146#[derive(Debug, Clone, Serialize, Deserialize)]
147#[serde(untagged)]
148pub enum PostDeployLogoutError {
149    UnknownValue(serde_json::Value),
150}
151
152/// struct for typed errors of method [`post_deploy_reconcile`]
153#[derive(Debug, Clone, Serialize, Deserialize)]
154#[serde(untagged)]
155pub enum PostDeployReconcileError {
156    UnknownValue(serde_json::Value),
157}
158
159
160/// Returns the fleet as an argocd ApplicationList: one projected Application per operator App CR, carrying the image tag the CR DECLARES, the tag actually RUNNING in the cluster's Deployment, the reconciled health, and the sync verdict those two produce (declared == running ⇒ Synced, both known and different ⇒ OutOfSync, either unknown ⇒ Unknown).  It is TENANT-SCOPED: a platform SuperAdmin reads every platform namespace, a validated org member reads only its own org's tenant namespace and only the App CRs labelled with its org, and anyone else is refused. A cross-tenant CR is never projected into an answer.
161pub async fn get_deploy_applications(configuration: &configuration::Configuration, ) -> Result<models::ArgoAppList, Error<GetDeployApplicationsError>> {
162
163    let uri_str = format!("{}/v1/deploy/applications", configuration.base_path);
164    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
165
166    if let Some(ref user_agent) = configuration.user_agent {
167        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
168    }
169    if let Some(ref token) = configuration.bearer_access_token {
170        req_builder = req_builder.bearer_auth(token.to_owned());
171    };
172
173    let req = req_builder.build()?;
174    let resp = configuration.client.execute(req).await?;
175
176    let status = resp.status();
177    let content_type = resp
178        .headers()
179        .get("content-type")
180        .and_then(|v| v.to_str().ok())
181        .unwrap_or("application/octet-stream");
182    let content_type = super::ContentType::from(content_type);
183
184    if !status.is_client_error() && !status.is_server_error() {
185        let content = resp.text().await?;
186        match content_type {
187            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
188            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoAppList`"))),
189            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoAppList`")))),
190        }
191    } else {
192        let content = resp.text().await?;
193        let entity: Option<GetDeployApplicationsError> = serde_json::from_str(&content).ok();
194        Err(Error::ResponseError(ResponseContent { status, content, entity }))
195    }
196}
197
198/// Returns ONE projected argocd Application by name, with status.resources filled in from its reconciled resource tree — which is what makes it the detail view rather than a row of the list.  It is TENANT-SCOPED, and a name that belongs to another org is reported NOT FOUND rather than refused: a 403 would confirm the application exists, so the route would become a cross-tenant existence oracle. A name that is not a DNS-1123 label is a 400 before any cluster read.
199pub async fn get_deploy_applications_by_name(configuration: &configuration::Configuration, name: &str) -> Result<models::ArgoApp, Error<GetDeployApplicationsByNameError>> {
200    // add a prefix to parameters to efficiently prevent name collisions
201    let p_name = name;
202
203    let uri_str = format!("{}/v1/deploy/applications/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
204    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
205
206    if let Some(ref user_agent) = configuration.user_agent {
207        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
208    }
209    if let Some(ref token) = configuration.bearer_access_token {
210        req_builder = req_builder.bearer_auth(token.to_owned());
211    };
212
213    let req = req_builder.build()?;
214    let resp = configuration.client.execute(req).await?;
215
216    let status = resp.status();
217    let content_type = resp
218        .headers()
219        .get("content-type")
220        .and_then(|v| v.to_str().ok())
221        .unwrap_or("application/octet-stream");
222    let content_type = super::ContentType::from(content_type);
223
224    if !status.is_client_error() && !status.is_server_error() {
225        let content = resp.text().await?;
226        match content_type {
227            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
228            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoApp`"))),
229            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoApp`")))),
230        }
231    } else {
232        let content = resp.text().await?;
233        let entity: Option<GetDeployApplicationsByNameError> = serde_json::from_str(&content).ok();
234        Err(Error::ResponseError(ResponseContent { status, content, entity }))
235    }
236}
237
238/// Returns one application's argocd ApplicationTree: the objects the operator reconciled from its App CR, reached by ownerRef — the Deployment and, under it, the ReplicaSet and Pods, plus the Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget and ConfigMaps it owns — each node carrying its parent edges and its health.  Secrets are DELIBERATELY not walked, so no materialized environment can ever appear in the tree. Tenant-scoped exactly like the application read: another org's name is not found, a malformed name is a 400.
239pub async fn get_deploy_applications_by_name_resource_tree(configuration: &configuration::Configuration, name: &str) -> Result<models::ArgoTree, Error<GetDeployApplicationsByNameResourceTreeError>> {
240    // add a prefix to parameters to efficiently prevent name collisions
241    let p_name = name;
242
243    let uri_str = format!("{}/v1/deploy/applications/{name}/resource-tree", configuration.base_path, name=crate::apis::urlencode(p_name));
244    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
245
246    if let Some(ref user_agent) = configuration.user_agent {
247        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
248    }
249    if let Some(ref token) = configuration.bearer_access_token {
250        req_builder = req_builder.bearer_auth(token.to_owned());
251    };
252
253    let req = req_builder.build()?;
254    let resp = configuration.client.execute(req).await?;
255
256    let status = resp.status();
257    let content_type = resp
258        .headers()
259        .get("content-type")
260        .and_then(|v| v.to_str().ok())
261        .unwrap_or("application/octet-stream");
262    let content_type = super::ContentType::from(content_type);
263
264    if !status.is_client_error() && !status.is_server_error() {
265        let content = resp.text().await?;
266        match content_type {
267            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
268            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoTree`"))),
269            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoTree`")))),
270        }
271    } else {
272        let content = resp.text().await?;
273        let entity: Option<GetDeployApplicationsByNameResourceTreeError> = serde_json::from_str(&content).ok();
274        Err(Error::ResponseError(ResponseContent { status, content, entity }))
275    }
276}
277
278/// Returns the argocd RevisionMetadata for one revision of one application — what the detail view shows beside a revision.  An App CR is IMAGE-pinned rather than commit-pinned: the deploy names an image tag, and the git source this projection reports is the display-only manifest repo, not the application's own source. Nothing in this process can read a commit's author or message for an arbitrary revision. So rather than 404 (which the SPA turns into an error toast) or invent a git author, it answers the HONEST minimum: date is when the App CR was created, message is the revision asked for — with the empty revision and \"HEAD\" resolving to the image tag the CR declares — and author is empty. An over-long revision is truncated before it is echoed back.  Tenant-scoped exactly like the application read.
279pub async fn get_deploy_applications_by_name_revisions_by_revision_metadata(configuration: &configuration::Configuration, name: &str, revision: &str) -> Result<models::ArgoRevisionMetadata, Error<GetDeployApplicationsByNameRevisionsByRevisionMetadataError>> {
280    // add a prefix to parameters to efficiently prevent name collisions
281    let p_name = name;
282    let p_revision = revision;
283
284    let uri_str = format!("{}/v1/deploy/applications/{name}/revisions/{revision}/metadata", configuration.base_path, name=crate::apis::urlencode(p_name), revision=crate::apis::urlencode(p_revision));
285    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
286
287    if let Some(ref user_agent) = configuration.user_agent {
288        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
289    }
290    if let Some(ref token) = configuration.bearer_access_token {
291        req_builder = req_builder.bearer_auth(token.to_owned());
292    };
293
294    let req = req_builder.build()?;
295    let resp = configuration.client.execute(req).await?;
296
297    let status = resp.status();
298    let content_type = resp
299        .headers()
300        .get("content-type")
301        .and_then(|v| v.to_str().ok())
302        .unwrap_or("application/octet-stream");
303    let content_type = super::ContentType::from(content_type);
304
305    if !status.is_client_error() && !status.is_server_error() {
306        let content = resp.text().await?;
307        match content_type {
308            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
309            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoRevisionMetadata`"))),
310            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoRevisionMetadata`")))),
311        }
312    } else {
313        let content = resp.text().await?;
314        let entity: Option<GetDeployApplicationsByNameRevisionsByRevisionMetadataError> = serde_json::from_str(&content).ok();
315        Err(Error::ResponseError(ResponseContent { status, content, entity }))
316    }
317}
318
319/// Returns one application's argocd ApplicationSyncWindowState — the answer to \"is anything blocking a sync of this application right now?\".  This platform runs NO sync windows, so the answer is always the permissive empty one: canSync true, with no active and no assigned windows. The application is still resolved first, so a name that is not the caller's is not found rather than handed the static body — the endpoint discloses nothing about another tenant's fleet.
320pub async fn get_deploy_applications_by_name_syncwindows(configuration: &configuration::Configuration, name: &str) -> Result<models::ArgoSyncWindows, Error<GetDeployApplicationsByNameSyncwindowsError>> {
321    // add a prefix to parameters to efficiently prevent name collisions
322    let p_name = name;
323
324    let uri_str = format!("{}/v1/deploy/applications/{name}/syncwindows", configuration.base_path, name=crate::apis::urlencode(p_name));
325    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
326
327    if let Some(ref user_agent) = configuration.user_agent {
328        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
329    }
330    if let Some(ref token) = configuration.bearer_access_token {
331        req_builder = req_builder.bearer_auth(token.to_owned());
332    };
333
334    let req = req_builder.build()?;
335    let resp = configuration.client.execute(req).await?;
336
337    let status = resp.status();
338    let content_type = resp
339        .headers()
340        .get("content-type")
341        .and_then(|v| v.to_str().ok())
342        .unwrap_or("application/octet-stream");
343    let content_type = super::ContentType::from(content_type);
344
345    if !status.is_client_error() && !status.is_server_error() {
346        let content = resp.text().await?;
347        match content_type {
348            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
349            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoSyncWindows`"))),
350            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoSyncWindows`")))),
351        }
352    } else {
353        let content = resp.text().await?;
354        let entity: Option<GetDeployApplicationsByNameSyncwindowsError> = serde_json::from_str(&content).ok();
355        Err(Error::ResponseError(ResponseContent { status, content, entity }))
356    }
357}
358
359/// Completes the redirect from IAM: it validates `state` against the single-use flow cookie in constant time, redeems the authorization code with the PKCE verifier, and then VERIFIES the resulting token exactly as this deployment's identity boundary will on every later request — so a token that would be refused next request fails here with the real reason instead of producing a sign-in loop. On success it sets the session cookie, bounded by the token's own expiry, and redirects to the validated return path.  It fails closed, and closes on the ADMIN ORG: a principal whose verified owner claim is not the reserved admin org is told plainly that it lacks the role (403) and no cookie is minted for it. That check is not the authorization decision — every gated route re-derives SuperAdmin from the verified JWT — it exists so nobody is handed a session that silently 403s everything. No flow in progress, or a mismatched `state`, is a 400; a refused or unexchangeable code is a 401.
360pub async fn get_deploy_callback(configuration: &configuration::Configuration, ) -> Result<(), Error<GetDeployCallbackError>> {
361
362    let uri_str = format!("{}/v1/deploy/callback", configuration.base_path);
363    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
364
365    if let Some(ref user_agent) = configuration.user_agent {
366        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
367    }
368    if let Some(ref token) = configuration.bearer_access_token {
369        req_builder = req_builder.bearer_auth(token.to_owned());
370    };
371
372    let req = req_builder.build()?;
373    let resp = configuration.client.execute(req).await?;
374
375    let status = resp.status();
376
377    if !status.is_client_error() && !status.is_server_error() {
378        Ok(())
379    } else {
380        let content = resp.text().await?;
381        let entity: Option<GetDeployCallbackError> = serde_json::from_str(&content).ok();
382        Err(Error::ResponseError(ResponseContent { status, content, entity }))
383    }
384}
385
386/// Returns the argocd ClusterList of the destinations the caller's applications reconcile into: one entry per distinct destination server, carrying the count of applications reconciling into it. The in-cluster destination is always present, so an empty fleet still answers one cluster, and no cluster credential can appear — the projected type physically has no config field.  It is TENANT-SCOPED and reads the SAME App CRs the applications list reads: a platform SuperAdmin counts the whole fleet, a validated org member counts only its own org's applications, anyone else is refused.
387pub async fn get_deploy_clusters(configuration: &configuration::Configuration, ) -> Result<models::ArgoClusterList, Error<GetDeployClustersError>> {
388
389    let uri_str = format!("{}/v1/deploy/clusters", configuration.base_path);
390    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
391
392    if let Some(ref user_agent) = configuration.user_agent {
393        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
394    }
395    if let Some(ref token) = configuration.bearer_access_token {
396        req_builder = req_builder.bearer_auth(token.to_owned());
397    };
398
399    let req = req_builder.build()?;
400    let resp = configuration.client.execute(req).await?;
401
402    let status = resp.status();
403    let content_type = resp
404        .headers()
405        .get("content-type")
406        .and_then(|v| v.to_str().ok())
407        .unwrap_or("application/octet-stream");
408    let content_type = super::ContentType::from(content_type);
409
410    if !status.is_client_error() && !status.is_server_error() {
411        let content = resp.text().await?;
412        match content_type {
413            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
414            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoClusterList`"))),
415            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoClusterList`")))),
416        }
417    } else {
418        let content = resp.text().await?;
419        let entity: Option<GetDeployClustersError> = serde_json::from_str(&content).ok();
420        Err(Error::ResponseError(ResponseContent { status, content, entity }))
421    }
422}
423
424/// Lists every Hanzo CD Application in the cluster: the git source each one polls, the commit it last APPLIED, how its last sync operation ended, and its recent deploy history — newest deploy first, ordered by namespace then name.  This is the layer ABOVE the application board, and the two disagree in exactly the case an operator most needs to see: main carries a new image pin, CD has not applied that commit yet, so every App CR still declares the old tag and the application board is legitimately \"Synced\" while the deploy has not landed. Only the applied revision here can show that.  installed is false — with a reason and an empty list — when the CD CRD is not served in this cluster. That is a FACT about the cluster rather than a failure of the request, so the caller can say \"no CD plane here\" instead of rendering an error it cannot act on; a genuine transport or RBAC failure still errors.  Read-only, and platform SuperAdmin only: the CD plane is fleet infrastructure with no tenant dimension. This view observes CD and never drives it — the sync policy is automated with self-heal, and the actionable verb an operator has is the per-application reconcile at POST /v1/deploy/applications/{name}/sync.
425pub async fn get_deploy_gitops(configuration: &configuration::Configuration, ) -> Result<models::GitOpsPlane, Error<GetDeployGitopsError>> {
426
427    let uri_str = format!("{}/v1/deploy/gitops", configuration.base_path);
428    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
429
430    if let Some(ref user_agent) = configuration.user_agent {
431        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
432    }
433    if let Some(ref token) = configuration.bearer_access_token {
434        req_builder = req_builder.bearer_auth(token.to_owned());
435    };
436
437    let req = req_builder.build()?;
438    let resp = configuration.client.execute(req).await?;
439
440    let status = resp.status();
441    let content_type = resp
442        .headers()
443        .get("content-type")
444        .and_then(|v| v.to_str().ok())
445        .unwrap_or("application/octet-stream");
446    let content_type = super::ContentType::from(content_type);
447
448    if !status.is_client_error() && !status.is_server_error() {
449        let content = resp.text().await?;
450        match content_type {
451            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
452            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GitOpsPlane`"))),
453            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GitOpsPlane`")))),
454        }
455    } else {
456        let content = resp.text().await?;
457        let entity: Option<GetDeployGitopsError> = serde_json::from_str(&content).ok();
458        Err(Error::ResponseError(ResponseContent { status, content, entity }))
459    }
460}
461
462/// Health reports whether this deployment can observe the delivery plane.  200 only when the Kubernetes API answers AND the App custom resource is served; 503 with the same shape otherwise, naming which half failed. It reports BOOLEANS and never the underlying error, because the route is unauthenticated — liveness must be probe-able without a token — and a raw client error can disclose the apiserver address or an RBAC detail. That detail is logged server-side instead.
463pub async fn get_deploy_health(configuration: &configuration::Configuration, ) -> Result<models::DeployHealth, Error<GetDeployHealthError>> {
464
465    let uri_str = format!("{}/v1/deploy/health", configuration.base_path);
466    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
467
468    if let Some(ref user_agent) = configuration.user_agent {
469        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
470    }
471    if let Some(ref token) = configuration.bearer_access_token {
472        req_builder = req_builder.bearer_auth(token.to_owned());
473    };
474
475    let req = req_builder.build()?;
476    let resp = configuration.client.execute(req).await?;
477
478    let status = resp.status();
479    let content_type = resp
480        .headers()
481        .get("content-type")
482        .and_then(|v| v.to_str().ok())
483        .unwrap_or("application/octet-stream");
484    let content_type = super::ContentType::from(content_type);
485
486    if !status.is_client_error() && !status.is_server_error() {
487        let content = resp.text().await?;
488        match content_type {
489            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
490            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeployHealth`"))),
491            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeployHealth`")))),
492        }
493    } else {
494        let content = resp.text().await?;
495        let entity: Option<GetDeployHealthError> = serde_json::from_str(&content).ok();
496        Err(Error::ResponseError(ResponseContent { status, content, entity }))
497    }
498}
499
500/// Redirects the browser to IAM's authorize endpoint, having minted a nonce and a PKCE verifier into a short-lived, single-use flow cookie. The nonce comes back as `state` and is what proves the code belongs to the round trip THIS browser started; the verifier never appears in the address bar.  Necessarily public — this is how a browser gets a principal for this host in the first place — and it grants nothing by itself. An optional `returnTo` names where to land afterwards and is run through the open-redirect guard, so only a same-host path survives. A deployment with no sign-in configured answers 503 rather than redirecting nowhere.
501pub async fn get_deploy_login(configuration: &configuration::Configuration, ) -> Result<(), Error<GetDeployLoginError>> {
502
503    let uri_str = format!("{}/v1/deploy/login", configuration.base_path);
504    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
505
506    if let Some(ref user_agent) = configuration.user_agent {
507        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
508    }
509    if let Some(ref token) = configuration.bearer_access_token {
510        req_builder = req_builder.bearer_auth(token.to_owned());
511    };
512
513    let req = req_builder.build()?;
514    let resp = configuration.client.execute(req).await?;
515
516    let status = resp.status();
517
518    if !status.is_client_error() && !status.is_server_error() {
519        Ok(())
520    } else {
521        let content = resp.text().await?;
522        let entity: Option<GetDeployLoginError> = serde_json::from_str(&content).ok();
523        Err(Error::ResponseError(ResponseContent { status, content, entity }))
524    }
525}
526
527/// Returns the argocd AppProjectList this console groups and filters applications by. Projects are owned by Hanzo IAM rather than by argocd, so they are REFLECTED read-only from the IAM project store and nothing is persisted here: a validated org member gets its own organization's projects and a platform SuperAdmin gets every organization's.  A SuperAdmin whose IAM store is not reachable falls back to the real argoproj.io AppProject CRs when that CRD is served, and otherwise to one permissive synthesized project per distinct project name the App CRs declare. A project named \"default\" is always present, because that is what an App CR carrying no project label projects to.
528pub async fn get_deploy_projects(configuration: &configuration::Configuration, ) -> Result<models::ArgoProjectList, Error<GetDeployProjectsError>> {
529
530    let uri_str = format!("{}/v1/deploy/projects", configuration.base_path);
531    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
532
533    if let Some(ref user_agent) = configuration.user_agent {
534        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
535    }
536    if let Some(ref token) = configuration.bearer_access_token {
537        req_builder = req_builder.bearer_auth(token.to_owned());
538    };
539
540    let req = req_builder.build()?;
541    let resp = configuration.client.execute(req).await?;
542
543    let status = resp.status();
544    let content_type = resp
545        .headers()
546        .get("content-type")
547        .and_then(|v| v.to_str().ok())
548        .unwrap_or("application/octet-stream");
549    let content_type = super::ContentType::from(content_type);
550
551    if !status.is_client_error() && !status.is_server_error() {
552        let content = resp.text().await?;
553        match content_type {
554            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
555            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoProjectList`"))),
556            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoProjectList`")))),
557        }
558    } else {
559        let content = resp.text().await?;
560        let entity: Option<GetDeployProjectsError> = serde_json::from_str(&content).ok();
561        Err(Error::ResponseError(ResponseContent { status, content, entity }))
562    }
563}
564
565/// Answers \"is this browser signed in, and if not where does it sign in?\" — the dashboard SPA's bootstrap question, and the only route on this plane that answers for an anonymous caller.  The anonymous answer carries loggedIn:false and a URL and NOTHING else: no username, no org, no groups, no issuer, no hint about who the caller might be or what exists in the cluster. Answering it costs nothing (the caller already knows whether it holds a cookie) and withholding it costs the whole sign-in journey.  The predicate is the platform SuperAdmin fact — the SAME one every other route here gates on, minted from a validated principal whose org is the reserved admin org — so a validated-but-not-SuperAdmin caller is reported as NOT signed in, which is the truth as this console defines it: they cannot use it.
566pub async fn get_deploy_session_userinfo(configuration: &configuration::Configuration, ) -> Result<models::SessionUser, Error<GetDeploySessionUserinfoError>> {
567
568    let uri_str = format!("{}/v1/deploy/session/userinfo", configuration.base_path);
569    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
570
571    if let Some(ref user_agent) = configuration.user_agent {
572        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
573    }
574    if let Some(ref token) = configuration.bearer_access_token {
575        req_builder = req_builder.bearer_auth(token.to_owned());
576    };
577
578    let req = req_builder.build()?;
579    let resp = configuration.client.execute(req).await?;
580
581    let status = resp.status();
582    let content_type = resp
583        .headers()
584        .get("content-type")
585        .and_then(|v| v.to_str().ok())
586        .unwrap_or("application/octet-stream");
587    let content_type = super::ContentType::from(content_type);
588
589    if !status.is_client_error() && !status.is_server_error() {
590        let content = resp.text().await?;
591        match content_type {
592            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
593            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SessionUser`"))),
594            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SessionUser`")))),
595        }
596    } else {
597        let content = resp.text().await?;
598        let entity: Option<GetDeploySessionUserinfoError> = serde_json::from_str(&content).ok();
599        Err(Error::ResponseError(ResponseContent { status, content, entity }))
600    }
601}
602
603/// Returns the argocd AuthSettings object the dashboard SPA awaits before its first render.  Every value is a CONSTANT of this projection rather than configuration read from anywhere: the SPA's own login form is reported disabled and its OIDC config null because Hanzo IAM owns identity at the edge and this console's sign-in is GET /v1/deploy/login, and every argocd feature the projection does not implement — status badges, Dex connectors, config-management plugins, kustomize versions, the exec terminal, apps-in-any-namespace, the hydrator, sync-with-replace — is reported off. Platform SuperAdmin only.
604pub async fn get_deploy_settings(configuration: &configuration::Configuration, ) -> Result<models::ConsoleSettings, Error<GetDeploySettingsError>> {
605
606    let uri_str = format!("{}/v1/deploy/settings", configuration.base_path);
607    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
608
609    if let Some(ref user_agent) = configuration.user_agent {
610        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
611    }
612    if let Some(ref token) = configuration.bearer_access_token {
613        req_builder = req_builder.bearer_auth(token.to_owned());
614    };
615
616    let req = req_builder.build()?;
617    let resp = configuration.client.execute(req).await?;
618
619    let status = resp.status();
620    let content_type = resp
621        .headers()
622        .get("content-type")
623        .and_then(|v| v.to_str().ok())
624        .unwrap_or("application/octet-stream");
625    let content_type = super::ContentType::from(content_type);
626
627    if !status.is_client_error() && !status.is_server_error() {
628        let content = resp.text().await?;
629        match content_type {
630            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
631            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ConsoleSettings`"))),
632            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ConsoleSettings`")))),
633        }
634    } else {
635        let content = resp.text().await?;
636        let entity: Option<GetDeploySettingsError> = serde_json::from_str(&content).ok();
637        Err(Error::ResponseError(ResponseContent { status, content, entity }))
638    }
639}
640
641/// Holds the connection open as text/event-stream and pushes one watch event per application change. It opens with an `ADDED` frame for every application currently present — the same projection the applications list serves, so a client renders a complete fleet from the stream alone — and then forwards `ADDED`, `MODIFIED` and `DELETED` as they happen, with a keep-alive every 25 seconds that is also how a vanished client is noticed and its watch torn down.  Read-only and TENANT-SCOPED, fail-closed: a platform SuperAdmin streams the whole fleet, a validated org member streams only its own org's applications, anyone else gets 403 and no stream. No cluster client configured is 503. If the deployment is not granted the watch verb the stream degrades to keep-alives only — the initial state still renders, it simply stops updating — rather than failing the connection.
642pub async fn get_deploy_stream_applications(configuration: &configuration::Configuration, ) -> Result<(), Error<GetDeployStreamApplicationsError>> {
643
644    let uri_str = format!("{}/v1/deploy/stream/applications", configuration.base_path);
645    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
646
647    if let Some(ref user_agent) = configuration.user_agent {
648        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
649    }
650    if let Some(ref token) = configuration.bearer_access_token {
651        req_builder = req_builder.bearer_auth(token.to_owned());
652    };
653
654    let req = req_builder.build()?;
655    let resp = configuration.client.execute(req).await?;
656
657    let status = resp.status();
658
659    if !status.is_client_error() && !status.is_server_error() {
660        Ok(())
661    } else {
662        let content = resp.text().await?;
663        let entity: Option<GetDeployStreamApplicationsError> = serde_json::from_str(&content).ok();
664        Err(Error::ResponseError(ResponseContent { status, content, entity }))
665    }
666}
667
668/// Holds the connection open as text/event-stream and pushes the application's whole resource tree — its live child objects and each one's derived health — once immediately and again on every keep-alive tick, so a client always has a current picture without polling. The refresh IS the keep-alive: it is a cheap rebuild rather than a watch, so there is no multi-resource watch to leak.  TENANT-SCOPED and fail-closed BEFORE the stream opens, which is the rule that matters: the caller's scope and the application's namespace are resolved first, so an unvalidated caller gets a plain 403 and an application belonging to another tenant gets a plain 404 — never an opened stream that emits nothing. A SuperAdmin reaches the whole fleet, an org member only its own org's applications. No cluster client configured is 503.
669pub async fn get_deploy_stream_applications_by_name_resource_tree(configuration: &configuration::Configuration, name: &str) -> Result<(), Error<GetDeployStreamApplicationsByNameResourceTreeError>> {
670    // add a prefix to parameters to efficiently prevent name collisions
671    let p_name = name;
672
673    let uri_str = format!("{}/v1/deploy/stream/applications/{name}/resource-tree", configuration.base_path, name=crate::apis::urlencode(p_name));
674    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
675
676    if let Some(ref user_agent) = configuration.user_agent {
677        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
678    }
679    if let Some(ref token) = configuration.bearer_access_token {
680        req_builder = req_builder.bearer_auth(token.to_owned());
681    };
682
683    let req = req_builder.build()?;
684    let resp = configuration.client.execute(req).await?;
685
686    let status = resp.status();
687
688    if !status.is_client_error() && !status.is_server_error() {
689        Ok(())
690    } else {
691        let content = resp.text().await?;
692        let entity: Option<GetDeployStreamApplicationsByNameResourceTreeError> = serde_json::from_str(&content).ok();
693        Err(Error::ResponseError(ResponseContent { status, content, entity }))
694    }
695}
696
697/// Returns the argocd VersionMessage the dashboard SPA reads at bootstrap. There is no argocd binary behind this plane — it is a projection over operator App CRs — so the fields say so rather than describing a build: Version names the projection, BuildDate is the moment this response was generated, and Compiler/Platform/GoVersion are the constants the SPA tolerates rather than facts about this process. Platform SuperAdmin only.
698pub async fn get_deploy_version(configuration: &configuration::Configuration, ) -> Result<models::VersionMessage, Error<GetDeployVersionError>> {
699
700    let uri_str = format!("{}/v1/deploy/version", configuration.base_path);
701    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
702
703    if let Some(ref user_agent) = configuration.user_agent {
704        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
705    }
706    if let Some(ref token) = configuration.bearer_access_token {
707        req_builder = req_builder.bearer_auth(token.to_owned());
708    };
709
710    let req = req_builder.build()?;
711    let resp = configuration.client.execute(req).await?;
712
713    let status = resp.status();
714    let content_type = resp
715        .headers()
716        .get("content-type")
717        .and_then(|v| v.to_str().ok())
718        .unwrap_or("application/octet-stream");
719    let content_type = super::ContentType::from(content_type);
720
721    if !status.is_client_error() && !status.is_server_error() {
722        let content = resp.text().await?;
723        match content_type {
724            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
725            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VersionMessage`"))),
726            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::VersionMessage`")))),
727        }
728    } else {
729        let content = resp.text().await?;
730        let entity: Option<GetDeployVersionError> = serde_json::from_str(&content).ok();
731        Err(Error::ResponseError(ResponseContent { status, content, entity }))
732    }
733}
734
735/// Serves the console's rollback control, and today it requests a reconcile and nothing more.  The opening verb is not style. zipdoc drops a leading CamelCase symbol only when a plain verb follows it and never before a copula (internal/zipdoc/ extract.go:811-824, \"CompleteDeployment IS the CI completion hook\" would otherwise become \"Is the CI completion hook\") — so \"RollbackDeployApplication is …\" would publish a Go symbol no caller can see into the summary an SDK docstring, an MCP tool list and a CLI help line all show.  It performs exactly what the sync action performs — the same stamp on the same App CR, the same application re-projected — and it does NOT select, pin or revert to a prior image tag. That is the one thing to know before wiring anything to it: the name is the console's, the behaviour is the sync. Pinning a previous release rides the release client, which this address does not call yet.  Same gate, same refusals and the same absent request body as the sync it shares a core with.
736pub async fn post_deploy_applications_by_name_rollback(configuration: &configuration::Configuration, name: &str) -> Result<models::ArgoApp, Error<PostDeployApplicationsByNameRollbackError>> {
737    // add a prefix to parameters to efficiently prevent name collisions
738    let p_name = name;
739
740    let uri_str = format!("{}/v1/deploy/applications/{name}/rollback", configuration.base_path, name=crate::apis::urlencode(p_name));
741    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
742
743    if let Some(ref user_agent) = configuration.user_agent {
744        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
745    }
746    if let Some(ref token) = configuration.bearer_access_token {
747        req_builder = req_builder.bearer_auth(token.to_owned());
748    };
749
750    let req = req_builder.build()?;
751    let resp = configuration.client.execute(req).await?;
752
753    let status = resp.status();
754    let content_type = resp
755        .headers()
756        .get("content-type")
757        .and_then(|v| v.to_str().ok())
758        .unwrap_or("application/octet-stream");
759    let content_type = super::ContentType::from(content_type);
760
761    if !status.is_client_error() && !status.is_server_error() {
762        let content = resp.text().await?;
763        match content_type {
764            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
765            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoApp`"))),
766            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoApp`")))),
767        }
768    } else {
769        let content = resp.text().await?;
770        let entity: Option<PostDeployApplicationsByNameRollbackError> = serde_json::from_str(&content).ok();
771        Err(Error::ResponseError(ResponseContent { status, content, entity }))
772    }
773}
774
775/// Asks the operator to reconcile ONE application now.  It stamps a sync-requested timestamp onto the application's App CR, which the operator's watch observes, and answers the application re-projected. It ASKS, it does not apply: the operator reconciles on its own clock, so a 200 means the request landed, not that the rollout finished — the returned row's running version still lags until it does.  SuperAdmin-only and fail-closed, and the gate is INSIDE the op rather than in middleware wrapped around the route. That is a correctness requirement, not a preference: this op is also reached by POST /mcp and by the by-name call plane, neither of which runs route middleware, so a gate that only the REST projection runs would publish an unguarded alias of a fleet-mutating write. It reads no request body — the URL names the application and nothing else does. An unknown name is a 404 (never a 403, which would confirm the application exists), a name that is not a DNS-1123 label is a 400, and no cluster client is a 503.
776pub async fn post_deploy_applications_by_name_sync(configuration: &configuration::Configuration, name: &str) -> Result<models::ArgoApp, Error<PostDeployApplicationsByNameSyncError>> {
777    // add a prefix to parameters to efficiently prevent name collisions
778    let p_name = name;
779
780    let uri_str = format!("{}/v1/deploy/applications/{name}/sync", configuration.base_path, name=crate::apis::urlencode(p_name));
781    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
782
783    if let Some(ref user_agent) = configuration.user_agent {
784        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
785    }
786    if let Some(ref token) = configuration.bearer_access_token {
787        req_builder = req_builder.bearer_auth(token.to_owned());
788    };
789
790    let req = req_builder.build()?;
791    let resp = configuration.client.execute(req).await?;
792
793    let status = resp.status();
794    let content_type = resp
795        .headers()
796        .get("content-type")
797        .and_then(|v| v.to_str().ok())
798        .unwrap_or("application/octet-stream");
799    let content_type = super::ContentType::from(content_type);
800
801    if !status.is_client_error() && !status.is_server_error() {
802        let content = resp.text().await?;
803        match content_type {
804            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
805            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ArgoApp`"))),
806            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ArgoApp`")))),
807        }
808    } else {
809        let content = resp.text().await?;
810        let entity: Option<PostDeployApplicationsByNameSyncError> = serde_json::from_str(&content).ok();
811        Err(Error::ResponseError(ResponseContent { status, content, entity }))
812    }
813}
814
815/// Ends the console session on this host.  It clears this console's session cookie and answers the signed-out state with the sign-in URL to start again. IAM's own session is untouched — this ends the console session only, so signing back in may not prompt for credentials.  It is a POST because it CHANGES STATE. As a GET it was reachable by a cross-site top-level navigation, which a SameSite=Lax cookie still rides, so any page could sign a SuperAdmin out; a POST is not carried cross-site by that cookie. It reads no request body and takes no argument: the session it ends is the one the request already carries.
816pub async fn post_deploy_logout(configuration: &configuration::Configuration, ) -> Result<models::SessionEnded, Error<PostDeployLogoutError>> {
817
818    let uri_str = format!("{}/v1/deploy/logout", configuration.base_path);
819    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
820
821    if let Some(ref user_agent) = configuration.user_agent {
822        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
823    }
824    if let Some(ref token) = configuration.bearer_access_token {
825        req_builder = req_builder.bearer_auth(token.to_owned());
826    };
827
828    let req = req_builder.build()?;
829    let resp = configuration.client.execute(req).await?;
830
831    let status = resp.status();
832    let content_type = resp
833        .headers()
834        .get("content-type")
835        .and_then(|v| v.to_str().ok())
836        .unwrap_or("application/octet-stream");
837    let content_type = super::ContentType::from(content_type);
838
839    if !status.is_client_error() && !status.is_server_error() {
840        let content = resp.text().await?;
841        match content_type {
842            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
843            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SessionEnded`"))),
844            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SessionEnded`")))),
845        }
846    } else {
847        let content = resp.text().await?;
848        let entity: Option<PostDeployLogoutError> = serde_json::from_str(&content).ok();
849        Err(Error::ResponseError(ResponseContent { status, content, entity }))
850    }
851}
852
853/// Renders the configured git source and applies it to the cluster, once.  It runs one full GitOps sync through the embedded engine — render the configured repo, ref and path, then three-way server-side apply with scoped prune — and answers the revision it applied, the source it came from, the declared/synced/pruned/failed counts and a per-resource result. This is the WRITE half of the plane: it mutates live cluster objects and, with prune enabled, deletes objects the source no longer declares.  SuperAdmin-only and fail-closed, with the gate INSIDE the op because a typed op is also reached by POST /mcp and by the by-name call plane, where no route middleware runs. The git source is read AS THE PLATFORM, not as the caller: the coordinate is this deployment's own configuration and never a parameter, which is why the op reads no request body at all. A deployment with the engine switched off, or with no usable cluster config, answers 503; a failure to start, render or sync is a 502.
854pub async fn post_deploy_reconcile(configuration: &configuration::Configuration, ) -> Result<models::ReconcileReport, Error<PostDeployReconcileError>> {
855
856    let uri_str = format!("{}/v1/deploy/reconcile", configuration.base_path);
857    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
858
859    if let Some(ref user_agent) = configuration.user_agent {
860        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
861    }
862    if let Some(ref token) = configuration.bearer_access_token {
863        req_builder = req_builder.bearer_auth(token.to_owned());
864    };
865
866    let req = req_builder.build()?;
867    let resp = configuration.client.execute(req).await?;
868
869    let status = resp.status();
870    let content_type = resp
871        .headers()
872        .get("content-type")
873        .and_then(|v| v.to_str().ok())
874        .unwrap_or("application/octet-stream");
875    let content_type = super::ContentType::from(content_type);
876
877    if !status.is_client_error() && !status.is_server_error() {
878        let content = resp.text().await?;
879        match content_type {
880            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
881            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ReconcileReport`"))),
882            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ReconcileReport`")))),
883        }
884    } else {
885        let content = resp.text().await?;
886        let entity: Option<PostDeployReconcileError> = serde_json::from_str(&content).ok();
887        Err(Error::ResponseError(ResponseContent { status, content, entity }))
888    }
889}
890