Module adcp.types.generated_poc.webhook_payload

Classes

class Domain (*args, **kwds)
Expand source code
class Domain(Enum):
    media_buy = 'media-buy'
    signals = 'signals'

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access::
>>> Color.RED
<Color.RED: 1>
  • value lookup:
>>> Color(1)
<Color.RED: 1>
  • name lookup:
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Ancestors

  • enum.Enum

Class variables

var media_buy
var signals
class Progress (**data: Any)
Expand source code
class Progress(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    current_step: Annotated[
        str | None, Field(description='Current step or phase of the operation')
    ] = None
    percentage: Annotated[
        float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
    ] = None
    step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
    total_steps: Annotated[
        int | None, Field(description='Total number of steps in the operation', ge=1)
    ] = None

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var current_step : str | None
var model_config
var percentage : float | None
var step_number : int | None
var total_steps : int | None

Inherited members

class WebhookPayload (**data: Any)
Expand source code
class WebhookPayload(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    context_id: Annotated[
        str | None,
        Field(
            description='Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters.'
        ),
    ] = None
    domain: Annotated[
        Domain | None,
        Field(
            description='AdCP domain this task belongs to. Helps classify the operation type at a high level.'
        ),
    ] = None
    error: Annotated[
        str | None,
        Field(description="Error message for failed tasks. Only present when status is 'failed'."),
    ] = None
    message: Annotated[
        str | None,
        Field(
            description='Human-readable summary of the current task state. Provides context about what happened and what action may be needed.'
        ),
    ] = None
    operation_id: Annotated[
        str | None,
        Field(
            description='Publisher-defined operation identifier correlating a sequence of task updates across webhooks.'
        ),
    ] = None
    progress: Annotated[
        Progress | None,
        Field(
            description="Progress information for tasks still in 'working' state. Rarely seen in webhooks since 'working' tasks typically complete synchronously, but may appear if a task transitions from 'submitted' to 'working'."
        ),
    ] = None
    result: Annotated[
        dict[str, Any] | None,
        Field(
            description='Task-specific payload for this status update. Validated against the appropriate response schema based on task_type.'
        ),
    ] = None
    status: Annotated[
        task_status.TaskStatus,
        Field(
            description='Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed).'
        ),
    ]
    task_id: Annotated[
        str,
        Field(
            description='Unique identifier for this task. Use this to correlate webhook notifications with the original task submission.'
        ),
    ]
    task_type: Annotated[
        task_type_1.TaskType,
        Field(
            description='Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic.'
        ),
    ]
    timestamp: Annotated[
        AwareDatetime, Field(description='ISO 8601 timestamp when this webhook was generated.')
    ]

Base model for AdCP types with spec-compliant serialization.

AdCP JSON schemas use additionalProperties: false and do not allow null for optional fields. Therefore, optional fields must be omitted entirely when not present (not sent as null).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_id : str | None
var domainDomain | None
var error : str | None
var message : str | None
var model_config
var operation_id : str | None
var progressProgress | None
var result : dict[str, typing.Any] | None
var statusTaskStatus
var task_id : str
var task_typeTaskType
var timestamp : pydantic.types.AwareDatetime

Inherited members