archastro.platform.types.automations

 1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: 28786104a913
 4
 5from datetime import datetime
 6from typing import Any
 7
 8from pydantic import BaseModel, Field
 9
10
11class AutomationRun(BaseModel):
12    """
13    A single execution of an automation triggered by a platform event or direct invocation. Captures the run's status, input payload, and final result.
14    """
15
16    app: str = Field(..., description="ID of the app that owns this automation run (`dap_...`).")
17    automation: str = Field(..., description="ID of the automation that was executed (`aut_...`).")
18    created_at: datetime | None = Field(
19        default=None, description="When the automation run was created (ISO 8601)."
20    )
21    event_id: str | None = Field(
22        default=None,
23        description="ID of the platform event that triggered this run. `null` for directly invoked automations.",
24    )
25    id: str = Field(..., description="Automation run ID (`atr_...`).")
26    payload: dict[str, Any] | None = Field(
27        default=None,
28        description="The input event payload that triggered this run. Structure varies by automation type. Defaults to an empty object if no payload was provided.",
29    )
30    result: dict[str, Any] | None = Field(
31        default=None,
32        description="The output produced after the automation finished executing. Contains workflow-defined keys alongside any returned output. `null` if the run has not yet completed.",
33    )
34    status: str = Field(
35        ...,
36        description='Current execution status of the run. One of `"pending"` (queued, not yet started), `"running"` (actively executing), `"completed"` (finished successfully), `"failed"` (finished with an error), or `"cancelled"` (stopped before completion).',
37    )
38    team: str | None = Field(
39        default=None,
40        description="ID of the team that owns this run (`tea_...`). `null` if the run is owned by a user rather than a team.",
41    )
42    updated_at: datetime | None = Field(
43        default=None, description="When the automation run record was last updated (ISO 8601)."
44    )
45    user: str | None = Field(
46        default=None,
47        description="ID of the user that owns this run (`usr_...`). `null` if the run is owned by a team rather than a user.",
48    )
class AutomationRun(pydantic.main.BaseModel):
12class AutomationRun(BaseModel):
13    """
14    A single execution of an automation triggered by a platform event or direct invocation. Captures the run's status, input payload, and final result.
15    """
16
17    app: str = Field(..., description="ID of the app that owns this automation run (`dap_...`).")
18    automation: str = Field(..., description="ID of the automation that was executed (`aut_...`).")
19    created_at: datetime | None = Field(
20        default=None, description="When the automation run was created (ISO 8601)."
21    )
22    event_id: str | None = Field(
23        default=None,
24        description="ID of the platform event that triggered this run. `null` for directly invoked automations.",
25    )
26    id: str = Field(..., description="Automation run ID (`atr_...`).")
27    payload: dict[str, Any] | None = Field(
28        default=None,
29        description="The input event payload that triggered this run. Structure varies by automation type. Defaults to an empty object if no payload was provided.",
30    )
31    result: dict[str, Any] | None = Field(
32        default=None,
33        description="The output produced after the automation finished executing. Contains workflow-defined keys alongside any returned output. `null` if the run has not yet completed.",
34    )
35    status: str = Field(
36        ...,
37        description='Current execution status of the run. One of `"pending"` (queued, not yet started), `"running"` (actively executing), `"completed"` (finished successfully), `"failed"` (finished with an error), or `"cancelled"` (stopped before completion).',
38    )
39    team: str | None = Field(
40        default=None,
41        description="ID of the team that owns this run (`tea_...`). `null` if the run is owned by a user rather than a team.",
42    )
43    updated_at: datetime | None = Field(
44        default=None, description="When the automation run record was last updated (ISO 8601)."
45    )
46    user: str | None = Field(
47        default=None,
48        description="ID of the user that owns this run (`usr_...`). `null` if the run is owned by a team rather than a user.",
49    )

A single execution of an automation triggered by a platform event or direct invocation. Captures the run's status, input payload, and final result.

app: str = PydanticUndefined

ID of the app that owns this automation run (dap_...).

automation: str = PydanticUndefined

ID of the automation that was executed (aut_...).

created_at: datetime.datetime | None = None

When the automation run was created (ISO 8601).

event_id: str | None = None

ID of the platform event that triggered this run. null for directly invoked automations.

id: str = PydanticUndefined

Automation run ID (atr_...).

payload: dict[str, typing.Any] | None = None

The input event payload that triggered this run. Structure varies by automation type. Defaults to an empty object if no payload was provided.

result: dict[str, typing.Any] | None = None

The output produced after the automation finished executing. Contains workflow-defined keys alongside any returned output. null if the run has not yet completed.

status: str = PydanticUndefined

Current execution status of the run. One of "pending" (queued, not yet started), "running" (actively executing), "completed" (finished successfully), "failed" (finished with an error), or "cancelled" (stopped before completion).

team: str | None = None

ID of the team that owns this run (tea_...). null if the run is owned by a user rather than a team.

updated_at: datetime.datetime | None = None

When the automation run record was last updated (ISO 8601).

user: str | None = None

ID of the user that owns this run (usr_...). null if the run is owned by a team rather than a user.