@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
DraftAutomationobject.Return Value
An
Automationobject. -
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
Automationobject to be deleted. -
List automation instances by id.
Declaration
Swift
@MainActor func listAutomations() async throws -> [any Automation]Return Value
If success, an array of
Automationobjects, else an empty array.