Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PackageRequest = dict[str, Any]

**Stable Public API Layer - Import Architecture**

**CRITICAL**: Both `generated_poc/` and `_generated.py` are internal implementation. Source code must ONLY import from `stable.py` or `aliases.py`.
**CRITICAL**: Both `generated_poc/` and `_generated.py` are internal implementation. Source code must ONLY import from `types/__init__.py` or `aliases.py`.

### Import Architecture

Expand All @@ -30,17 +30,17 @@ generated_poc/*.py (internal, auto-generated from schemas)
_generated.py (internal consolidation, handles name collisions)
stable.py (public API for base types) + aliases.py (public API for discriminated unions)
types/__init__.py (public API for base types) + aliases.py (public API for discriminated unions)
__init__.py (user-facing exports)
adcp/__init__.py (user-facing convenience exports)
```

### Import Rules for Source Code

**✅ CORRECT - Public API only:**
```python
# For base types (requests, responses, domain models)
from adcp.types.stable import (
from adcp.types import (
GetProductsRequest,
GetProductsResponse,
Product,
Expand Down Expand Up @@ -83,18 +83,18 @@ from adcp.types._generated import CreateMediaBuyResponse1
- Internal consolidation logic
- Changes when collision handling evolves

3. **`stable.py` and `aliases.py`** provide:
3. **`types/__init__.py` and `aliases.py`** provide:
- Clean, semantic names
- Stability guarantees within major versions
- Explicit public API

### Special Cases

**Only `stable.py` and `aliases.py` may import from `_generated.py`:**
- `stable.py`: Imports base types and re-exports with clean names
**Only `types/__init__.py` and `aliases.py` may import from `_generated.py`:**
- `types/__init__.py`: Imports base types and re-exports with clean names
- `aliases.py`: Imports numbered discriminated union types and creates semantic aliases

**All other source files must import from `stable.py` or `aliases.py`.**
**All other source files must import from `types/__init__.py` or `aliases.py`.**

**NEVER Modify Generated Files Directly**

Expand Down
88 changes: 61 additions & 27 deletions schemas/cache/.hashes.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions schemas/cache/1.0.0/adcp-domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "/schemas/v1/enums/adcp-domain.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "AdCP protocol domains for task categorization",
"enum": [
"media-buy",
"signals"
],
"title": "AdCP Domain",
"type": "string"
}
11 changes: 11 additions & 0 deletions schemas/cache/1.0.0/auth-scheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "/schemas/v1/enums/auth-scheme.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Authentication schemes for push notification endpoints",
"enum": [
"Bearer",
"HMAC-SHA256"
],
"title": "Authentication Scheme",
"type": "string"
}
18 changes: 18 additions & 0 deletions schemas/cache/1.0.0/available-metric.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$id": "/schemas/v1/enums/available-metric.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Standard delivery and performance metrics available for reporting",
"enum": [
"impressions",
"spend",
"clicks",
"ctr",
"video_completions",
"completion_rate",
"conversions",
"viewability",
"engagement_rate"
],
"title": "Available Metric",
"type": "string"
}
12 changes: 12 additions & 0 deletions schemas/cache/1.0.0/co-branding-requirement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$id": "/schemas/v1/enums/co-branding-requirement.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Co-branding policy for creatives (retailer/publisher brand inclusion)",
"enum": [
"required",
"optional",
"none"
],
"title": "Co-Branding Requirement",
"type": "string"
}
14 changes: 14 additions & 0 deletions schemas/cache/1.0.0/creative-action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$id": "/schemas/v1/enums/creative-action.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Action taken on a creative during sync operation",
"enum": [
"created",
"updated",
"unchanged",
"failed",
"deleted"
],
"title": "Creative Action",
"type": "string"
}
13 changes: 13 additions & 0 deletions schemas/cache/1.0.0/creative-agent-capability.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$id": "/schemas/v1/enums/creative-agent-capability.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Capabilities supported by creative agents for format handling",
"enum": [
"validation",
"assembly",
"generation",
"preview"
],
"title": "Creative Agent Capability",
"type": "string"
}
97 changes: 97 additions & 0 deletions schemas/cache/1.0.0/creative-filters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$id": "/schemas/v1/core/creative-filters.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "Filter criteria for querying creative assets from the centralized library",
"properties": {
"assigned_to_package": {
"description": "Filter creatives assigned to this specific package",
"type": "string"
},
"assigned_to_packages": {
"description": "Filter creatives assigned to any of these packages",
"items": {
"type": "string"
},
"type": "array"
},
"created_after": {
"description": "Filter creatives created after this date (ISO 8601)",
"format": "date-time",
"type": "string"
},
"created_before": {
"description": "Filter creatives created before this date (ISO 8601)",
"format": "date-time",
"type": "string"
},
"creative_ids": {
"description": "Filter by specific creative IDs",
"items": {
"type": "string"
},
"maxItems": 100,
"type": "array"
},
"format": {
"description": "Filter by creative format type (e.g., video, audio, display)",
"type": "string"
},
"formats": {
"description": "Filter by multiple creative format types",
"items": {
"type": "string"
},
"type": "array"
},
"has_performance_data": {
"description": "Filter creatives that have performance data when true",
"type": "boolean"
},
"name_contains": {
"description": "Filter by creative names containing this text (case-insensitive)",
"type": "string"
},
"status": {
"$ref": "/schemas/v1/enums/creative-status.json",
"description": "Filter by creative approval status"
},
"statuses": {
"description": "Filter by multiple creative statuses",
"items": {
"$ref": "/schemas/v1/enums/creative-status.json"
},
"type": "array"
},
"tags": {
"description": "Filter by creative tags (all tags must match)",
"items": {
"type": "string"
},
"type": "array"
},
"tags_any": {
"description": "Filter by creative tags (any tag must match)",
"items": {
"type": "string"
},
"type": "array"
},
"unassigned": {
"description": "Filter for unassigned creatives when true, assigned creatives when false",
"type": "boolean"
},
"updated_after": {
"description": "Filter creatives last updated after this date (ISO 8601)",
"format": "date-time",
"type": "string"
},
"updated_before": {
"description": "Filter creatives last updated before this date (ISO 8601)",
"format": "date-time",
"type": "string"
}
},
"title": "Creative Filters",
"type": "object"
}
18 changes: 4 additions & 14 deletions schemas/cache/1.0.0/creative-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,12 @@
"description": "Creative requirements and restrictions for a product",
"properties": {
"co_branding": {
"description": "Co-branding requirement",
"enum": [
"required",
"optional",
"none"
],
"type": "string"
"$ref": "/schemas/v1/enums/co-branding-requirement.json",
"description": "Co-branding requirement"
},
"landing_page": {
"description": "Landing page requirements",
"enum": [
"any",
"retailer_site_only",
"must_include_retailer"
],
"type": "string"
"$ref": "/schemas/v1/enums/landing-page-requirement.json",
"description": "Landing page requirements"
},
"templates_available": {
"description": "Whether creative templates are provided",
Expand Down
15 changes: 15 additions & 0 deletions schemas/cache/1.0.0/creative-sort-field.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$id": "/schemas/v1/enums/creative-sort-field.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Fields available for sorting creative library listings",
"enum": [
"created_date",
"updated_date",
"name",
"status",
"assignment_count",
"performance_score"
],
"title": "Creative Sort Field",
"type": "string"
}
46 changes: 6 additions & 40 deletions schemas/cache/1.0.0/daast-asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
"type": "boolean"
},
"daast_version": {
"description": "DAAST specification version",
"enum": [
"1.0",
"1.1"
],
"type": "string"
"$ref": "/schemas/v1/enums/daast-version.json",
"description": "DAAST specification version"
},
"delivery_type": {
"const": "url",
Expand All @@ -31,20 +27,7 @@
"tracking_events": {
"description": "Tracking events supported by this DAAST tag",
"items": {
"enum": [
"start",
"firstQuartile",
"midpoint",
"thirdQuartile",
"complete",
"impression",
"pause",
"resume",
"skip",
"mute",
"unmute"
],
"type": "string"
"$ref": "/schemas/v1/enums/daast-tracking-event.json"
},
"type": "array"
},
Expand Down Expand Up @@ -72,12 +55,8 @@
"type": "string"
},
"daast_version": {
"description": "DAAST specification version",
"enum": [
"1.0",
"1.1"
],
"type": "string"
"$ref": "/schemas/v1/enums/daast-version.json",
"description": "DAAST specification version"
},
"delivery_type": {
"const": "inline",
Expand All @@ -92,20 +71,7 @@
"tracking_events": {
"description": "Tracking events supported by this DAAST tag",
"items": {
"enum": [
"start",
"firstQuartile",
"midpoint",
"thirdQuartile",
"complete",
"impression",
"pause",
"resume",
"skip",
"mute",
"unmute"
],
"type": "string"
"$ref": "/schemas/v1/enums/daast-tracking-event.json"
},
"type": "array"
}
Expand Down
20 changes: 20 additions & 0 deletions schemas/cache/1.0.0/daast-tracking-event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$id": "/schemas/v1/enums/daast-tracking-event.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Standard DAAST tracking events for audio ad playback and interaction",
"enum": [
"start",
"firstQuartile",
"midpoint",
"thirdQuartile",
"complete",
"impression",
"pause",
"resume",
"skip",
"mute",
"unmute"
],
"title": "DAAST Tracking Event",
"type": "string"
}
11 changes: 11 additions & 0 deletions schemas/cache/1.0.0/daast-version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "/schemas/v1/enums/daast-version.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Supported DAAST (Digital Audio Ad Serving Template) specification versions",
"enum": [
"1.0",
"1.1"
],
"title": "DAAST Version",
"type": "string"
}
Loading