@MainActor
protocol AutomationManager : SendableA protocol for handling Automation objects. This protocol will support the various CRUD operations that can be performed on an automation including lifecycle and management.
-
Executes a create Automation command, expecting a result.
Declaration
Swift
@MainActor func createAutomation(_ automation: any DraftAutomation) async throws -> any AutomationParameters
automationThe Automation object.
Return Value
An Automation object.
-
Delete an automation instance by its ID.
Declaration
Swift
@MainActor func deleteAutomation(id: String) async throws -
Delete an automation object.
Declaration
Swift
@MainActor func deleteAutomation(_ automation: any Automation) async throwsParameters
automationThe automation object to be deleted.
-
List automation instances by id.
Declaration
Swift
@MainActor func listAutomations() async throws -> [any Automation]Return Value
If success, an array of Automation objects, else an empty array.