adcp 1.6.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adcp/__init__.py +19 -221
- adcp/adagents.py +11 -12
- adcp/client.py +16 -11
- adcp/types/generated.py +540 -1129
- adcp/types/generated_poc/__init__.py +3 -0
- adcp/types/generated_poc/activate_signal_request.py +34 -0
- adcp/types/generated_poc/activate_signal_response.py +57 -0
- adcp/types/generated_poc/activation_key.py +30 -0
- adcp/types/generated_poc/adagents.py +266 -0
- adcp/types/generated_poc/asset_type.py +100 -0
- adcp/types/generated_poc/audio_asset.py +26 -0
- adcp/types/generated_poc/brand_manifest.py +260 -0
- adcp/types/generated_poc/brand_manifest_ref.py +361 -0
- adcp/types/generated_poc/build_creative_request.py +43 -0
- adcp/types/generated_poc/build_creative_response.py +57 -0
- adcp/types/generated_poc/channels.py +19 -0
- adcp/types/generated_poc/cpc_option.py +39 -0
- adcp/types/generated_poc/cpcv_option.py +41 -0
- adcp/types/generated_poc/cpm_auction_option.py +54 -0
- adcp/types/generated_poc/cpm_fixed_option.py +39 -0
- adcp/types/generated_poc/cpp_option.py +60 -0
- adcp/types/generated_poc/cpv_option.py +73 -0
- adcp/types/generated_poc/create_media_buy_request.py +96 -0
- adcp/types/generated_poc/create_media_buy_response.py +66 -0
- adcp/types/generated_poc/creative_asset.py +83 -0
- adcp/types/generated_poc/creative_assignment.py +27 -0
- adcp/types/generated_poc/creative_manifest.py +61 -0
- adcp/types/generated_poc/creative_policy.py +34 -0
- adcp/types/generated_poc/creative_status.py +14 -0
- adcp/types/generated_poc/css_asset.py +20 -0
- adcp/types/generated_poc/daast_asset.py +76 -0
- adcp/types/generated_poc/delivery_metrics.py +111 -0
- adcp/types/generated_poc/delivery_type.py +12 -0
- adcp/types/generated_poc/deployment.py +78 -0
- adcp/types/generated_poc/destination.py +43 -0
- adcp/types/generated_poc/error.py +29 -0
- adcp/types/generated_poc/flat_rate_option.py +93 -0
- adcp/types/generated_poc/format.py +260 -0
- adcp/types/generated_poc/format_id.py +29 -0
- adcp/types/generated_poc/frequency_cap.py +19 -0
- adcp/types/generated_poc/frequency_cap_scope.py +16 -0
- adcp/types/generated_poc/get_media_buy_delivery_request.py +65 -0
- adcp/types/generated_poc/get_media_buy_delivery_response.py +220 -0
- adcp/types/generated_poc/get_products_request.py +83 -0
- adcp/types/generated_poc/get_products_response.py +29 -0
- adcp/types/generated_poc/get_signals_request.py +77 -0
- adcp/types/generated_poc/get_signals_response.py +65 -0
- adcp/types/generated_poc/html_asset.py +18 -0
- adcp/types/generated_poc/identifier_types.py +29 -0
- adcp/types/generated_poc/image_asset.py +23 -0
- adcp/types/generated_poc/index.py +17 -0
- adcp/types/generated_poc/javascript_asset.py +25 -0
- adcp/types/generated_poc/list_authorized_properties_request.py +39 -0
- adcp/types/generated_poc/list_authorized_properties_response.py +85 -0
- adcp/types/generated_poc/list_creative_formats_request.py +93 -0
- adcp/types/generated_poc/list_creative_formats_response.py +63 -0
- adcp/types/generated_poc/list_creatives_request.py +154 -0
- adcp/types/generated_poc/list_creatives_response.py +234 -0
- adcp/types/generated_poc/markdown_asset.py +43 -0
- adcp/types/generated_poc/measurement.py +40 -0
- adcp/types/generated_poc/media_buy.py +37 -0
- adcp/types/generated_poc/media_buy_status.py +14 -0
- adcp/types/generated_poc/pacing.py +13 -0
- adcp/types/generated_poc/package.py +61 -0
- adcp/types/generated_poc/package_request.py +61 -0
- adcp/types/generated_poc/package_status.py +14 -0
- adcp/types/generated_poc/performance_feedback.py +89 -0
- adcp/types/generated_poc/placement.py +37 -0
- adcp/types/generated_poc/preview_creative_request.py +163 -0
- adcp/types/generated_poc/preview_creative_response.py +175 -0
- adcp/types/generated_poc/preview_render.py +144 -0
- adcp/types/generated_poc/pricing_model.py +17 -0
- adcp/types/generated_poc/pricing_option.py +365 -0
- adcp/types/generated_poc/product.py +211 -0
- adcp/types/generated_poc/promoted_offerings.py +102 -0
- adcp/types/generated_poc/promoted_products.py +38 -0
- adcp/types/generated_poc/property.py +79 -0
- adcp/types/generated_poc/protocol_envelope.py +61 -0
- adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
- adcp/types/generated_poc/provide_performance_feedback_response.py +59 -0
- adcp/types/generated_poc/publisher_identifier_types.py +15 -0
- adcp/types/generated_poc/push_notification_config.py +55 -0
- adcp/types/generated_poc/reporting_capabilities.py +68 -0
- adcp/types/generated_poc/response.py +24 -0
- adcp/types/generated_poc/standard_format_ids.py +45 -0
- adcp/types/generated_poc/start_timing.py +13 -0
- adcp/types/generated_poc/sub_asset.py +55 -0
- adcp/types/generated_poc/sync_creatives_request.py +69 -0
- adcp/types/generated_poc/sync_creatives_response.py +117 -0
- adcp/types/generated_poc/targeting.py +53 -0
- adcp/types/generated_poc/task_status.py +19 -0
- adcp/types/generated_poc/task_type.py +15 -0
- adcp/types/generated_poc/tasks_get_request.py +29 -0
- adcp/types/generated_poc/tasks_get_response.py +112 -0
- adcp/types/generated_poc/tasks_list_request.py +121 -0
- adcp/types/generated_poc/tasks_list_response.py +122 -0
- adcp/types/generated_poc/text_asset.py +20 -0
- adcp/types/generated_poc/update_media_buy_request.py +160 -0
- adcp/types/generated_poc/update_media_buy_response.py +67 -0
- adcp/types/generated_poc/url_asset.py +33 -0
- adcp/types/generated_poc/vast_asset.py +86 -0
- adcp/types/generated_poc/vcpm_auction_option.py +57 -0
- adcp/types/generated_poc/vcpm_fixed_option.py +43 -0
- adcp/types/generated_poc/video_asset.py +28 -0
- adcp/types/generated_poc/webhook_asset.py +65 -0
- adcp/types/generated_poc/webhook_payload.py +102 -0
- adcp/utils/preview_cache.py +57 -39
- adcp/validation.py +172 -0
- {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/METADATA +3 -1
- adcp-2.0.0.dist-info/RECORD +130 -0
- adcp/types/tasks.py +0 -511
- adcp-1.6.0.dist-info/RECORD +0 -28
- {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/WHEEL +0 -0
- {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/entry_points.txt +0 -0
- {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: sync-creatives-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AnyUrl, AwareDatetime, ConfigDict, Field, RootModel
|
|
12
|
+
|
|
13
|
+
from . import error
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Action(Enum):
|
|
17
|
+
created = "created"
|
|
18
|
+
updated = "updated"
|
|
19
|
+
unchanged = "unchanged"
|
|
20
|
+
failed = "failed"
|
|
21
|
+
deleted = "deleted"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Creative(AdCPBaseModel):
|
|
25
|
+
model_config = ConfigDict(
|
|
26
|
+
extra="forbid",
|
|
27
|
+
)
|
|
28
|
+
action: Annotated[Action, Field(description="Action taken for this creative")]
|
|
29
|
+
assigned_to: Annotated[
|
|
30
|
+
list[str] | None,
|
|
31
|
+
Field(
|
|
32
|
+
description="Package IDs this creative was successfully assigned to (only present when assignments were requested)"
|
|
33
|
+
),
|
|
34
|
+
] = None
|
|
35
|
+
assignment_errors: Annotated[
|
|
36
|
+
dict[str, str] | None,
|
|
37
|
+
Field(
|
|
38
|
+
description="Assignment errors by package ID (only present when assignment failures occurred)"
|
|
39
|
+
),
|
|
40
|
+
] = None
|
|
41
|
+
changes: Annotated[
|
|
42
|
+
list[str] | None,
|
|
43
|
+
Field(description="Field names that were modified (only present when action='updated')"),
|
|
44
|
+
] = None
|
|
45
|
+
creative_id: Annotated[str, Field(description="Creative ID from the request")]
|
|
46
|
+
errors: Annotated[
|
|
47
|
+
list[str] | None,
|
|
48
|
+
Field(description="Validation or processing errors (only present when action='failed')"),
|
|
49
|
+
] = None
|
|
50
|
+
expires_at: Annotated[
|
|
51
|
+
AwareDatetime | None,
|
|
52
|
+
Field(
|
|
53
|
+
description="ISO 8601 timestamp when preview link expires (only present when preview_url exists)"
|
|
54
|
+
),
|
|
55
|
+
] = None
|
|
56
|
+
platform_id: Annotated[
|
|
57
|
+
str | None, Field(description="Platform-specific ID assigned to the creative")
|
|
58
|
+
] = None
|
|
59
|
+
preview_url: Annotated[
|
|
60
|
+
AnyUrl | None,
|
|
61
|
+
Field(
|
|
62
|
+
description="Preview URL for generative creatives (only present for generative formats)"
|
|
63
|
+
),
|
|
64
|
+
] = None
|
|
65
|
+
warnings: Annotated[
|
|
66
|
+
list[str] | None, Field(description="Non-fatal warnings about this creative")
|
|
67
|
+
] = None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class SyncCreativesResponse1(AdCPBaseModel):
|
|
71
|
+
model_config = ConfigDict(
|
|
72
|
+
extra="forbid",
|
|
73
|
+
)
|
|
74
|
+
context: Annotated[
|
|
75
|
+
dict[str, Any] | None,
|
|
76
|
+
Field(
|
|
77
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
78
|
+
),
|
|
79
|
+
] = None
|
|
80
|
+
creatives: Annotated[
|
|
81
|
+
list[Creative],
|
|
82
|
+
Field(
|
|
83
|
+
description="Results for each creative processed. Items with action='failed' indicate per-item validation/processing failures, not operation-level failures."
|
|
84
|
+
),
|
|
85
|
+
]
|
|
86
|
+
dry_run: Annotated[
|
|
87
|
+
bool | None, Field(description="Whether this was a dry run (no actual changes made)")
|
|
88
|
+
] = None
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class SyncCreativesResponse2(AdCPBaseModel):
|
|
92
|
+
model_config = ConfigDict(
|
|
93
|
+
extra="forbid",
|
|
94
|
+
)
|
|
95
|
+
context: Annotated[
|
|
96
|
+
dict[str, Any] | None,
|
|
97
|
+
Field(
|
|
98
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
99
|
+
),
|
|
100
|
+
] = None
|
|
101
|
+
errors: Annotated[
|
|
102
|
+
list[error.Error],
|
|
103
|
+
Field(
|
|
104
|
+
description="Operation-level errors that prevented processing any creatives (e.g., authentication failure, service unavailable, invalid request format)",
|
|
105
|
+
min_length=1,
|
|
106
|
+
),
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class SyncCreativesResponse(RootModel[SyncCreativesResponse1 | SyncCreativesResponse2]):
|
|
111
|
+
root: Annotated[
|
|
112
|
+
SyncCreativesResponse1 | SyncCreativesResponse2,
|
|
113
|
+
Field(
|
|
114
|
+
description="Response from creative sync operation. Returns either per-creative results (best-effort processing) OR operation-level errors (complete failure). This enforces atomic semantics at the operation level while allowing per-item failures within successful operations.",
|
|
115
|
+
title="Sync Creatives Response",
|
|
116
|
+
),
|
|
117
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: targeting.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from . import frequency_cap as frequency_cap_1
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeoCountryAnyOfItem(RootModel[str]):
|
|
16
|
+
root: Annotated[str, Field(pattern="^[A-Z]{2}$")]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TargetingOverlay(AdCPBaseModel):
|
|
20
|
+
model_config = ConfigDict(
|
|
21
|
+
extra="forbid",
|
|
22
|
+
)
|
|
23
|
+
axe_exclude_segment: Annotated[
|
|
24
|
+
str | None, Field(description="AXE segment ID to exclude from targeting")
|
|
25
|
+
] = None
|
|
26
|
+
axe_include_segment: Annotated[
|
|
27
|
+
str | None, Field(description="AXE segment ID to include for targeting")
|
|
28
|
+
] = None
|
|
29
|
+
frequency_cap: frequency_cap_1.FrequencyCap | None = None
|
|
30
|
+
geo_country_any_of: Annotated[
|
|
31
|
+
list[GeoCountryAnyOfItem] | None,
|
|
32
|
+
Field(
|
|
33
|
+
description="Restrict delivery to specific countries (ISO codes). Use for regulatory compliance or RCT testing."
|
|
34
|
+
),
|
|
35
|
+
] = None
|
|
36
|
+
geo_metro_any_of: Annotated[
|
|
37
|
+
list[str] | None,
|
|
38
|
+
Field(
|
|
39
|
+
description="Restrict delivery to specific metro areas (DMA codes). Use for regulatory compliance or RCT testing."
|
|
40
|
+
),
|
|
41
|
+
] = None
|
|
42
|
+
geo_postal_code_any_of: Annotated[
|
|
43
|
+
list[str] | None,
|
|
44
|
+
Field(
|
|
45
|
+
description="Restrict delivery to specific postal/ZIP codes. Use for regulatory compliance or RCT testing."
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
geo_region_any_of: Annotated[
|
|
49
|
+
list[str] | None,
|
|
50
|
+
Field(
|
|
51
|
+
description="Restrict delivery to specific regions/states. Use for regulatory compliance or RCT testing."
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: task-status.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TaskStatus(Enum):
|
|
11
|
+
submitted = "submitted"
|
|
12
|
+
working = "working"
|
|
13
|
+
input_required = "input-required"
|
|
14
|
+
completed = "completed"
|
|
15
|
+
canceled = "canceled"
|
|
16
|
+
failed = "failed"
|
|
17
|
+
rejected = "rejected"
|
|
18
|
+
auth_required = "auth-required"
|
|
19
|
+
unknown = "unknown"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: task-type.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TaskType(Enum):
|
|
11
|
+
create_media_buy = "create_media_buy"
|
|
12
|
+
update_media_buy = "update_media_buy"
|
|
13
|
+
sync_creatives = "sync_creatives"
|
|
14
|
+
activate_signal = "activate_signal"
|
|
15
|
+
get_signals = "get_signals"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: tasks-get-request.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TasksGetRequest(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
context: Annotated[
|
|
18
|
+
dict[str, Any] | None,
|
|
19
|
+
Field(
|
|
20
|
+
description="Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
|
|
21
|
+
),
|
|
22
|
+
] = None
|
|
23
|
+
include_history: Annotated[
|
|
24
|
+
bool | None,
|
|
25
|
+
Field(
|
|
26
|
+
description="Include full conversation history for this task (may increase response size)"
|
|
27
|
+
),
|
|
28
|
+
] = False
|
|
29
|
+
task_id: Annotated[str, Field(description="Unique identifier of the task to retrieve")]
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: tasks-get-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import task_status
|
|
14
|
+
from . import task_type as task_type_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Domain(Enum):
|
|
18
|
+
media_buy = "media-buy"
|
|
19
|
+
signals = "signals"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Details(AdCPBaseModel):
|
|
23
|
+
model_config = ConfigDict(
|
|
24
|
+
extra="allow",
|
|
25
|
+
)
|
|
26
|
+
domain: Annotated[Domain | None, Field(description="AdCP domain where error occurred")] = None
|
|
27
|
+
operation: Annotated[str | None, Field(description="Specific operation that failed")] = None
|
|
28
|
+
specific_context: Annotated[
|
|
29
|
+
dict[str, Any] | None, Field(description="Domain-specific error context")
|
|
30
|
+
] = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Error(AdCPBaseModel):
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
extra="forbid",
|
|
36
|
+
)
|
|
37
|
+
code: Annotated[str, Field(description="Error code for programmatic handling")]
|
|
38
|
+
details: Annotated[Details | None, Field(description="Additional error context")] = None
|
|
39
|
+
message: Annotated[str, Field(description="Detailed error message")]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Type(Enum):
|
|
43
|
+
request = "request"
|
|
44
|
+
response = "response"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class HistoryItem(AdCPBaseModel):
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
extra="forbid",
|
|
50
|
+
)
|
|
51
|
+
data: Annotated[dict[str, Any], Field(description="The full request or response payload")]
|
|
52
|
+
timestamp: Annotated[AwareDatetime, Field(description="When this exchange occurred (ISO 8601)")]
|
|
53
|
+
type: Annotated[
|
|
54
|
+
Type, Field(description="Whether this was a request from client or response from server")
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class Progress(AdCPBaseModel):
|
|
59
|
+
model_config = ConfigDict(
|
|
60
|
+
extra="forbid",
|
|
61
|
+
)
|
|
62
|
+
current_step: Annotated[
|
|
63
|
+
str | None, Field(description="Current step or phase of the operation")
|
|
64
|
+
] = None
|
|
65
|
+
percentage: Annotated[
|
|
66
|
+
float | None, Field(description="Completion percentage (0-100)", ge=0.0, le=100.0)
|
|
67
|
+
] = None
|
|
68
|
+
step_number: Annotated[int | None, Field(description="Current step number", ge=1)] = None
|
|
69
|
+
total_steps: Annotated[
|
|
70
|
+
int | None, Field(description="Total number of steps in the operation", ge=1)
|
|
71
|
+
] = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class TasksGetResponse(AdCPBaseModel):
|
|
75
|
+
model_config = ConfigDict(
|
|
76
|
+
extra="forbid",
|
|
77
|
+
)
|
|
78
|
+
completed_at: Annotated[
|
|
79
|
+
AwareDatetime | None,
|
|
80
|
+
Field(
|
|
81
|
+
description="When the task completed (ISO 8601, only for completed/failed/canceled tasks)"
|
|
82
|
+
),
|
|
83
|
+
] = None
|
|
84
|
+
context: Annotated[
|
|
85
|
+
dict[str, Any] | None,
|
|
86
|
+
Field(
|
|
87
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
88
|
+
),
|
|
89
|
+
] = None
|
|
90
|
+
created_at: Annotated[
|
|
91
|
+
AwareDatetime, Field(description="When the task was initially created (ISO 8601)")
|
|
92
|
+
]
|
|
93
|
+
domain: Annotated[Domain, Field(description="AdCP domain this task belongs to")]
|
|
94
|
+
error: Annotated[Error | None, Field(description="Error details for failed tasks")] = None
|
|
95
|
+
has_webhook: Annotated[
|
|
96
|
+
bool | None, Field(description="Whether this task has webhook configuration")
|
|
97
|
+
] = None
|
|
98
|
+
history: Annotated[
|
|
99
|
+
list[HistoryItem] | None,
|
|
100
|
+
Field(
|
|
101
|
+
description="Complete conversation history for this task (only included if include_history was true in request)"
|
|
102
|
+
),
|
|
103
|
+
] = None
|
|
104
|
+
progress: Annotated[
|
|
105
|
+
Progress | None, Field(description="Progress information for long-running tasks")
|
|
106
|
+
] = None
|
|
107
|
+
status: Annotated[task_status.TaskStatus, Field(description="Current task status")]
|
|
108
|
+
task_id: Annotated[str, Field(description="Unique identifier for this task")]
|
|
109
|
+
task_type: Annotated[task_type_1.TaskType, Field(description="Type of AdCP operation")]
|
|
110
|
+
updated_at: Annotated[
|
|
111
|
+
AwareDatetime, Field(description="When the task was last updated (ISO 8601)")
|
|
112
|
+
]
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: tasks-list-request.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import task_status
|
|
14
|
+
from . import task_type as task_type_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Domain(Enum):
|
|
18
|
+
media_buy = "media-buy"
|
|
19
|
+
signals = "signals"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Filters(AdCPBaseModel):
|
|
23
|
+
model_config = ConfigDict(
|
|
24
|
+
extra="forbid",
|
|
25
|
+
)
|
|
26
|
+
context_contains: Annotated[
|
|
27
|
+
str | None,
|
|
28
|
+
Field(
|
|
29
|
+
description="Filter tasks where context contains this text (searches buyer_ref, media_buy_id, signal_id, etc.)"
|
|
30
|
+
),
|
|
31
|
+
] = None
|
|
32
|
+
created_after: Annotated[
|
|
33
|
+
AwareDatetime | None, Field(description="Filter tasks created after this date (ISO 8601)")
|
|
34
|
+
] = None
|
|
35
|
+
created_before: Annotated[
|
|
36
|
+
AwareDatetime | None, Field(description="Filter tasks created before this date (ISO 8601)")
|
|
37
|
+
] = None
|
|
38
|
+
domain: Annotated[Domain | None, Field(description="Filter by single AdCP domain")] = None
|
|
39
|
+
domains: Annotated[
|
|
40
|
+
list[Domain] | None, Field(description="Filter by multiple AdCP domains")
|
|
41
|
+
] = None
|
|
42
|
+
has_webhook: Annotated[
|
|
43
|
+
bool | None, Field(description="Filter tasks that have webhook configuration when true")
|
|
44
|
+
] = None
|
|
45
|
+
status: Annotated[
|
|
46
|
+
task_status.TaskStatus | None, Field(description="Filter by single task status")
|
|
47
|
+
] = None
|
|
48
|
+
statuses: Annotated[
|
|
49
|
+
list[task_status.TaskStatus] | None, Field(description="Filter by multiple task statuses")
|
|
50
|
+
] = None
|
|
51
|
+
task_ids: Annotated[
|
|
52
|
+
list[str] | None, Field(description="Filter by specific task IDs", max_length=100)
|
|
53
|
+
] = None
|
|
54
|
+
task_type: Annotated[
|
|
55
|
+
task_type_1.TaskType | None, Field(description="Filter by single task type")
|
|
56
|
+
] = None
|
|
57
|
+
task_types: Annotated[
|
|
58
|
+
list[task_type_1.TaskType] | None, Field(description="Filter by multiple task types")
|
|
59
|
+
] = None
|
|
60
|
+
updated_after: Annotated[
|
|
61
|
+
AwareDatetime | None,
|
|
62
|
+
Field(description="Filter tasks last updated after this date (ISO 8601)"),
|
|
63
|
+
] = None
|
|
64
|
+
updated_before: Annotated[
|
|
65
|
+
AwareDatetime | None,
|
|
66
|
+
Field(description="Filter tasks last updated before this date (ISO 8601)"),
|
|
67
|
+
] = None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class Pagination(AdCPBaseModel):
|
|
71
|
+
model_config = ConfigDict(
|
|
72
|
+
extra="forbid",
|
|
73
|
+
)
|
|
74
|
+
limit: Annotated[
|
|
75
|
+
int | None, Field(description="Maximum number of tasks to return", ge=1, le=100)
|
|
76
|
+
] = 50
|
|
77
|
+
offset: Annotated[int | None, Field(description="Number of tasks to skip", ge=0)] = 0
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class Direction(Enum):
|
|
81
|
+
asc = "asc"
|
|
82
|
+
desc = "desc"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class Field1(Enum):
|
|
86
|
+
created_at = "created_at"
|
|
87
|
+
updated_at = "updated_at"
|
|
88
|
+
status = "status"
|
|
89
|
+
task_type = "task_type"
|
|
90
|
+
domain = "domain"
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class Sort(AdCPBaseModel):
|
|
94
|
+
model_config = ConfigDict(
|
|
95
|
+
extra="forbid",
|
|
96
|
+
)
|
|
97
|
+
direction: Annotated[Direction | None, Field(description="Sort direction")] = Direction.desc
|
|
98
|
+
field: Annotated[Field1 | None, Field(description="Field to sort by")] = Field1.created_at
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class TasksListRequest(AdCPBaseModel):
|
|
102
|
+
model_config = ConfigDict(
|
|
103
|
+
extra="forbid",
|
|
104
|
+
)
|
|
105
|
+
context: Annotated[
|
|
106
|
+
dict[str, Any] | None,
|
|
107
|
+
Field(
|
|
108
|
+
description="Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
|
|
109
|
+
),
|
|
110
|
+
] = None
|
|
111
|
+
filters: Annotated[Filters | None, Field(description="Filter criteria for querying tasks")] = (
|
|
112
|
+
None
|
|
113
|
+
)
|
|
114
|
+
include_history: Annotated[
|
|
115
|
+
bool | None,
|
|
116
|
+
Field(
|
|
117
|
+
description="Include full conversation history for each task (may significantly increase response size)"
|
|
118
|
+
),
|
|
119
|
+
] = False
|
|
120
|
+
pagination: Annotated[Pagination | None, Field(description="Pagination parameters")] = None
|
|
121
|
+
sort: Annotated[Sort | None, Field(description="Sorting parameters")] = None
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: tasks-list-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import task_status
|
|
14
|
+
from . import task_type as task_type_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Pagination(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra="forbid",
|
|
20
|
+
)
|
|
21
|
+
has_more: Annotated[bool, Field(description="Whether there are more tasks beyond this page")]
|
|
22
|
+
limit: Annotated[int, Field(description="Limit that was applied to this query", ge=1)]
|
|
23
|
+
next_offset: Annotated[
|
|
24
|
+
int | None,
|
|
25
|
+
Field(description="Offset to use for next page (only present if has_more is true)", ge=0),
|
|
26
|
+
] = None
|
|
27
|
+
offset: Annotated[int, Field(description="Offset that was applied to this query", ge=0)]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DomainBreakdown(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra="forbid",
|
|
33
|
+
)
|
|
34
|
+
media_buy: Annotated[
|
|
35
|
+
int | None,
|
|
36
|
+
Field(alias="media-buy", description="Number of media-buy tasks in results", ge=0),
|
|
37
|
+
] = None
|
|
38
|
+
signals: Annotated[
|
|
39
|
+
int | None, Field(description="Number of signals tasks in results", ge=0)
|
|
40
|
+
] = None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Direction(Enum):
|
|
44
|
+
asc = "asc"
|
|
45
|
+
desc = "desc"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class SortApplied(AdCPBaseModel):
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
extra="forbid",
|
|
51
|
+
)
|
|
52
|
+
direction: Direction
|
|
53
|
+
field: str
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class QuerySummary(AdCPBaseModel):
|
|
57
|
+
model_config = ConfigDict(
|
|
58
|
+
extra="forbid",
|
|
59
|
+
)
|
|
60
|
+
domain_breakdown: Annotated[
|
|
61
|
+
DomainBreakdown | None, Field(description="Count of tasks by domain")
|
|
62
|
+
] = None
|
|
63
|
+
filters_applied: Annotated[
|
|
64
|
+
list[str] | None, Field(description="List of filters that were applied to the query")
|
|
65
|
+
] = None
|
|
66
|
+
returned: Annotated[int, Field(description="Number of tasks returned in this response", ge=0)]
|
|
67
|
+
sort_applied: Annotated[
|
|
68
|
+
SortApplied | None, Field(description="Sort order that was applied")
|
|
69
|
+
] = None
|
|
70
|
+
status_breakdown: Annotated[
|
|
71
|
+
dict[str, int] | None, Field(description="Count of tasks by status")
|
|
72
|
+
] = None
|
|
73
|
+
total_matching: Annotated[
|
|
74
|
+
int, Field(description="Total number of tasks matching filters (across all pages)", ge=0)
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Domain(Enum):
|
|
79
|
+
media_buy = "media-buy"
|
|
80
|
+
signals = "signals"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class Task(AdCPBaseModel):
|
|
84
|
+
model_config = ConfigDict(
|
|
85
|
+
extra="forbid",
|
|
86
|
+
)
|
|
87
|
+
completed_at: Annotated[
|
|
88
|
+
AwareDatetime | None,
|
|
89
|
+
Field(
|
|
90
|
+
description="When the task completed (ISO 8601, only for completed/failed/canceled tasks)"
|
|
91
|
+
),
|
|
92
|
+
] = None
|
|
93
|
+
created_at: Annotated[
|
|
94
|
+
AwareDatetime, Field(description="When the task was initially created (ISO 8601)")
|
|
95
|
+
]
|
|
96
|
+
domain: Annotated[Domain, Field(description="AdCP domain this task belongs to")]
|
|
97
|
+
has_webhook: Annotated[
|
|
98
|
+
bool | None, Field(description="Whether this task has webhook configuration")
|
|
99
|
+
] = None
|
|
100
|
+
status: Annotated[task_status.TaskStatus, Field(description="Current task status")]
|
|
101
|
+
task_id: Annotated[str, Field(description="Unique identifier for this task")]
|
|
102
|
+
task_type: Annotated[task_type_1.TaskType, Field(description="Type of AdCP operation")]
|
|
103
|
+
updated_at: Annotated[
|
|
104
|
+
AwareDatetime, Field(description="When the task was last updated (ISO 8601)")
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class TasksListResponse(AdCPBaseModel):
|
|
109
|
+
model_config = ConfigDict(
|
|
110
|
+
extra="forbid",
|
|
111
|
+
)
|
|
112
|
+
context: Annotated[
|
|
113
|
+
dict[str, Any] | None,
|
|
114
|
+
Field(
|
|
115
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
116
|
+
),
|
|
117
|
+
] = None
|
|
118
|
+
pagination: Annotated[Pagination, Field(description="Pagination information")]
|
|
119
|
+
query_summary: Annotated[
|
|
120
|
+
QuerySummary, Field(description="Summary of the query that was executed")
|
|
121
|
+
]
|
|
122
|
+
tasks: Annotated[list[Task], Field(description="Array of tasks matching the query criteria")]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: text-asset.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TextAsset(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
content: Annotated[str, Field(description="Text content")]
|
|
18
|
+
language: Annotated[str | None, Field(description="Language code (e.g., 'en', 'es', 'fr')")] = (
|
|
19
|
+
None
|
|
20
|
+
)
|