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 = 3Access 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_buyvar 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) ] = NoneBase 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var current_step : str | Nonevar model_configvar percentage : float | Nonevar step_number : int | Nonevar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context_id : str | Nonevar domain : Domain | Nonevar error : str | Nonevar message : str | Nonevar model_configvar operation_id : str | Nonevar progress : Progress | Nonevar result : dict[str, typing.Any] | Nonevar status : TaskStatusvar task_id : strvar task_type : TaskTypevar timestamp : pydantic.types.AwareDatetime
Inherited members