pub struct ApplicationsResource {
pub local_automations: LocalAutomationsResource,
/* private fields */
}Expand description
Applications — /api/v2/applications, with a nested local_automations sub-resource.
Fields§
§local_automations: LocalAutomationsResourcePer-application local automations — /api/v2/applications/{applicationId}/actions.
Implementations§
Source§impl ApplicationsResource
impl ApplicationsResource
Sourcepub async fn list_all(&self) -> Result<Vec<ApplicationItem>, ManagerError>
pub async fn list_all(&self) -> Result<Vec<ApplicationItem>, ManagerError>
List all applications (auto-paginated).
Sourcepub async fn list_page(
&self,
page: i32,
per_page: Option<i32>,
) -> Result<Page<ApplicationItem>, ManagerError>
pub async fn list_page( &self, page: i32, per_page: Option<i32>, ) -> Result<Page<ApplicationItem>, ManagerError>
List one page of applications.
Sourcepub async fn all_local_automations(
&self,
) -> Result<Vec<LocalAutomation>, ManagerError>
pub async fn all_local_automations( &self, ) -> Result<Vec<LocalAutomation>, ManagerError>
List all local automations across applications (auto-paginated).
Sourcepub async fn create(
&self,
body: ApplicationCreateBody,
) -> Result<ApplicationItem, ManagerError>
pub async fn create( &self, body: ApplicationCreateBody, ) -> Result<ApplicationItem, ManagerError>
Create an application.
Routes the write through the raw JSON path and [decode_application], standing in for the
generated create_application — whose typed [models::ApplicationItemResponse] return
fails to deserialize on every real success payload, misreporting a completed create as
an error.
Sourcepub async fn create_raw(&self, body: Value) -> Result<Value, ManagerError>
pub async fn create_raw(&self, body: Value) -> Result<Value, ManagerError>
Create an application, reading the response raw — for callers that want the
server’s JSON verbatim instead of the decoded ApplicationItem.
Sourcepub async fn get(&self, id: &str) -> Result<ApplicationItem, ManagerError>
pub async fn get(&self, id: &str) -> Result<ApplicationItem, ManagerError>
Get an application by id.
Reads the response raw and decodes via [decode_application], standing in for the
generated get_application — whose typed [models::Application] return fails to
deserialize on every real payload.
Sourcepub async fn update(
&self,
id: &str,
body: ApplicationUpdateBody,
) -> Result<ApplicationItem, ManagerError>
pub async fn update( &self, id: &str, body: ApplicationUpdateBody, ) -> Result<ApplicationItem, ManagerError>
Update an application.
Routes the write through the raw JSON path and [decode_application], standing in for the
generated update_application — same typed-response decode failure as Self::create.
Sourcepub async fn update_raw(
&self,
id: &str,
body: Value,
) -> Result<Value, ManagerError>
pub async fn update_raw( &self, id: &str, body: Value, ) -> Result<Value, ManagerError>
Update an application, reading the response raw (the PUT sibling of
Self::create_raw).
Sourcepub async fn delete_many(
&self,
ids: Vec<String>,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn delete_many( &self, ids: Vec<String>, ) -> Result<DefaultV2MessageResponse, ManagerError>
Delete several applications by id.
Sourcepub async fn list_modules(&self) -> Result<ListModulesResponse, ManagerError>
pub async fn list_modules(&self) -> Result<ListModulesResponse, ManagerError>
List the available application modules.
Sourcepub async fn dispatch(
&self,
id: &str,
position: &str,
is_async: bool,
body: LocalAutomationDispatch,
) -> Result<DispatchLocalAutomationsResponse, ManagerError>
pub async fn dispatch( &self, id: &str, position: &str, is_async: bool, body: LocalAutomationDispatch, ) -> Result<DispatchLocalAutomationsResponse, ManagerError>
Dispatch an application’s local automations at a given position. is_async runs without
waiting for the result.
Sourcepub async fn clone(&self, id: &str) -> Result<ApplicationItem, ManagerError>
pub async fn clone(&self, id: &str) -> Result<ApplicationItem, ManagerError>
Clone an application by id.
Routes the write through the raw JSON path and [decode_application], standing in for the
generated clone_application — same typed-response decode failure as Self::create.
Sourcepub async fn clone_raw(&self, id: &str) -> Result<Value, ManagerError>
pub async fn clone_raw(&self, id: &str) -> Result<Value, ManagerError>
Clone an application by id, reading the response raw — for callers that want the
server’s JSON verbatim instead of the decoded ApplicationItem.
Sourcepub async fn bulk_update(
&self,
body: BulkUpdateApplicationsRequest,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn bulk_update( &self, body: BulkUpdateApplicationsRequest, ) -> Result<DefaultV2MessageResponse, ManagerError>
Bulk-update several applications in one request.
Sourcepub async fn list_app_actions(&self) -> Result<ObjectListResponse, ManagerError>
pub async fn list_app_actions(&self) -> Result<ObjectListResponse, ManagerError>
List the actions available across applications.
Sourcepub async fn list_errors(&self) -> Result<ObjectListResponse, ManagerError>
pub async fn list_errors(&self) -> Result<ObjectListResponse, ManagerError>
List application errors.