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<Application>, ManagerError>
pub async fn list_all(&self) -> Result<Vec<Application>, ManagerError>
List all applications (auto-paginated).
Sourcepub async fn list_page(
&self,
page: i32,
per_page: Option<i32>,
) -> Result<Page<Application>, ManagerError>
pub async fn list_page( &self, page: i32, per_page: Option<i32>, ) -> Result<Page<Application>, 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<ApplicationItemResponse, ManagerError>
pub async fn create( &self, body: ApplicationCreateBody, ) -> Result<ApplicationItemResponse, ManagerError>
Create an application.
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.
The typed Self::create returns [models::ApplicationItemResponse], whose derived
Application decode fails on every real success payload (the module discriminator
artifact — see [decode_application]) — misreporting a completed create as an error.
Callers that need the created record read raw and lose nothing.
Sourcepub async fn get(
&self,
id: &str,
) -> Result<ApplicationItemResponse, ManagerError>
pub async fn get( &self, id: &str, ) -> Result<ApplicationItemResponse, 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<ApplicationItemResponse, ManagerError>
pub async fn update( &self, id: &str, body: ApplicationUpdateBody, ) -> Result<ApplicationItemResponse, ManagerError>
Update an application.
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<ApplicationItemResponse, ManagerError>
pub async fn clone( &self, id: &str, ) -> Result<ApplicationItemResponse, ManagerError>
Clone an application by id.
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 (same decode caveat as
Self::create_raw: the typed Self::clone fails on populated success bodies).
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.