Repository: PrefectHQ/prefect

Issue:
Programmatic declaration of Automation only allows for RunDeployment action type
### First check

- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is related to Prefect and not one of its dependencies.

### Bug summary

Programmatic declaration of an [Automation](https://github.com/PrefectHQ/prefect/blob/1c24349f23dfe486174ed8e6df9d05df8e6e25ba/src/prefect/events/schemas.py#L256) allows only for the [ActionTypes](https://github.com/PrefectHQ/prefect/blob/1c24349f23dfe486174ed8e6df9d05df8e6e25ba/src/prefect/events/actions.py#L22) actions which only support `run-deployment` action; all action types should be supported including:

<img width="775" alt="image" src="https://github.com/PrefectHQ/prefect/assets/8518288/04aca2e5-1c2f-4d98-b486-87afb919a464">


### Reproduction

```python3
from uuid import UUID
import asyncio

from prefect import get_client
from prefect.events.actions import Action
from prefect.events.schemas import Automation


async def create_automation(automation: Automation) -> UUID:
    async with get_client() as client:
        automation_uuid: UUID = await client.create_automation(automation)
        return automation_uuid


action = Action(
    type="send-notification", block_document_id="6a1788f0-e808-44e0-9d6a-42e10b97315c", subject="subject", body="body"
)
automation = Automation(
    name="foo",
    description="",
    trigger={},
    actions=[action],
    enabled=True,
)
asyncio.run(create_automation(automation=automation))
```


### Error

```python3
Traceback (most recent call last):
  File "/Users/constantinoschillebeeckx/Documents/hs-prefect-utils/foo.py", line 18, in <module>
    automation = Automation(
                 ^^^^^^^^^^^
  File "/Users/constantinoschillebeeckx/.pyenv/versions/hs-prefect-utils/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 2 validation errors for Automation
actions -> 0 -> type
  unexpected value; permitted: 'run-deployment' (type=value_error.const; given=send-notification; permitted=('run-deployment',))
actions -> 0 -> deployment_id
  field required (type=value_error.missing)
```


### Versions

```Text
Version:             2.14.11
API version:         0.8.4
Python version:      3.11.6
Git commit:          e6d7d76d
Built:               Thu, Dec 14, 2023 5:45 PM
OS/Arch:             darwin/arm64
Profile:             default
Server type:         cloud
```


### Additional context

Happy to submit PR to fix.


Discussion:
Thanks @ConstantinoSchillebeeckx!
Looks like this was implemented in https://github.com/PrefectHQ/prefect/pull/9885 by @bunchesofdonald and only `run-deployment` was explicitly exposed:
> The spec for the triggers is an abbreviated form of the full Automation specification and results in an implicit RunDeployment action for the deployment that they're creating



Resolving patch:
diff --git a/src/prefect/events/actions.py b/src/prefect/events/actions.py
--- a/src/prefect/events/actions.py
+++ b/src/prefect/events/actions.py
@@ -1,4 +1,4 @@
-from typing import Any, Dict, Optional
+from typing import Any, Dict, Optional, Union
 from uuid import UUID
 
 from prefect._internal.pydantic import HAS_PYDANTIC_V2
@@ -34,4 +34,15 @@ class RunDeployment(Action):
     deployment_id: UUID = Field(..., description="The identifier of the deployment")
 
 
-ActionTypes = RunDeployment
+class SendNotification(Action):
+    """Send a notification with the given parameters"""
+
+    type: Literal["send-notification"] = "send-notification"
+    block_document_id: UUID = Field(
+        ..., description="The identifier of the notification block"
+    )
+    body: str = Field(..., description="Notification body")
+    subject: Optional[str] = Field(None, description="Notification subject")
+
+
+ActionTypes = Union[RunDeployment, SendNotification]
diff --git a/src/prefect/events/schemas.py b/src/prefect/events/schemas.py
--- a/src/prefect/events/schemas.py
+++ b/src/prefect/events/schemas.py
@@ -341,7 +341,7 @@ def set_deployment_id(self, deployment_id: UUID):
     def owner_resource(self) -> Optional[str]:
         return f"prefect.deployment.{self._deployment_id}"
 
-    def actions(self) -> List[ActionTypes]:
+    def actions(self) -> List[RunDeployment]:
         assert self._deployment_id
         return [
             RunDeployment(


Test patch: