diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7da2e3..fc4bf78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,7 +113,7 @@ jobs: run: python scripts/fix_schema_refs.py - name: Generate models - run: python scripts/generate_models_simple.py + run: python scripts/generate_types.py - name: Validate generated code syntax run: | diff --git a/.gitignore b/.gitignore index 42ba7b3..68ca1bc 100644 --- a/.gitignore +++ b/.gitignore @@ -145,3 +145,6 @@ Thumbs.db # Environment variables .env uv.lock + +# Temporary schema processing directory +.schema_temp/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ab9cc2..75c9589 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ # Pre-commit hooks for AdCP Python client # See https://pre-commit.com for more information -# Installation: pip install pre-commit && pre-commit install +# Installation: uv add --dev pre-commit && uv run pre-commit install repos: # Black code formatting @@ -8,28 +8,27 @@ repos: rev: 24.10.0 hooks: - id: black - language_version: python3.10 + language_version: python3.11 args: [--line-length=100] - # Ruff linting + # Ruff linting (ignoring line-length for now - black handles it) - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.9.2 hooks: - id: ruff - args: [--fix, --exit-non-zero-on-fix] - exclude: ^src/adcp/types/generated\.py$ + args: [--fix, --exit-non-zero-on-fix, --ignore=E501] + exclude: ^src/adcp/types/generated_poc/ - # Mypy type checking - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.0 + # Mypy type checking (local hook to use project dependencies) + - repo: local hooks: - id: mypy - additional_dependencies: - - pydantic>=2.0.0 - - types-requests - args: [--config-file=pyproject.toml] - files: ^src/adcp/ - exclude: ^src/adcp/types/generated\.py$ + name: mypy + entry: uv run mypy + language: system + types: [python] + pass_filenames: false + args: [src/adcp] # Basic file checks - repo: https://github.com/pre-commit/pre-commit-hooks @@ -48,28 +47,9 @@ repos: - id: check-case-conflict - id: detect-private-key - # Validate generated code after schema changes - - repo: local - hooks: - - id: validate-generated-code - name: Validate generated Pydantic models - entry: python -m py_compile - language: system - files: ^src/adcp/types/generated\.py$ - pass_filenames: true - description: Ensures generated code is syntactically valid Python - - - id: test-code-generation - name: Test code generator - entry: pytest tests/test_code_generation.py -v --tb=short - language: system - files: ^scripts/generate_models_simple\.py$ - pass_filenames: false - description: Run code generation tests when generator changes - # Configuration default_language_version: - python: python3.10 + python: python3.11 # Run hooks on all files during manual runs fail_fast: false diff --git a/CLAUDE.md b/CLAUDE.md index 4c60da6..960aa89 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,6 +17,53 @@ FormatId = str PackageRequest = dict[str, Any] ``` +**NEVER Modify Generated Files Directly** + +Files in `src/adcp/types/generated_poc/` are auto-generated by `scripts/generate_types.py`. Any manual edits will be lost on regeneration. + +**Post-Generation Fix System:** + +We use `scripts/post_generate_fixes.py` which runs automatically after type generation to apply necessary modifications that can't be generated. + +**Type Name Collisions:** + +The upstream AdCP schemas define multiple types with the same name (e.g., `Contact`, `Asset`, `Status`) in different schema files. These are **genuinely different types** with different fields, not duplicates. + +When consolidating exports in `generated.py`, we use a "first wins" strategy (alphabetical by module name) and warn about collisions. Users can still access all versions via module-qualified imports: + +```python +# Access the "winning" version +from adcp.types.generated import Asset + +# Access specific versions +from adcp.types.generated_poc.brand_manifest import Asset as BrandAsset +from adcp.types.generated_poc.format import Asset as FormatAsset +``` + +**Upstream Issue:** This should ideally be fixed in the AdCP schema definitions by either: +- Using unique names (e.g., `BrandAsset` vs `FormatAsset`) +- Sharing common types via `$ref` +- Using discriminated unions where appropriate + +**Current fixes applied:** +1. **Model validators** - Injects `@model_validator` decorators into: + - `PublisherProperty.validate_mutual_exclusivity()` - enforces property_ids/property_tags mutual exclusivity + - `Product.validate_publisher_properties_items()` - validates all publisher_properties items + +2. **Self-referential types** - Fixes `preview_render.py` if it contains module-qualified self-references + +3. **Forward references** - Fixes BrandManifest imports in: + - `promoted_offerings.py` + - `create_media_buy_request.py` + - `get_products_request.py` + +**To add new post-generation fixes:** +Edit `scripts/post_generate_fixes.py` and add a new function. The script: +- Runs automatically via `generate_types.py` +- Is idempotent (safe to run multiple times) +- Validates fixes were successfully applied +- Fails loudly if schema changes break the fix patterns + **Type Checking Best Practices** - Use `TYPE_CHECKING` for optional dependencies to avoid runtime import errors - Use `cast()` for JSON deserialization to satisfy mypy's `no-any-return` checks diff --git a/examples/adagents_validation.py b/examples/adagents_validation.py index efe3a4c..3fc97fd 100644 --- a/examples/adagents_validation.py +++ b/examples/adagents_validation.py @@ -140,7 +140,10 @@ def example_manual_verification(): print("\nScenario 4: Agent with empty properties = authorized for all") result = verify_agent_authorization( - adagents_data, "https://another-agent.com", "website", [{"type": "domain", "value": "any.com"}] + adagents_data, + "https://another-agent.com", + "website", + [{"type": "domain", "value": "any.com"}], ) print(f" Result: {result}") @@ -225,7 +228,9 @@ def example_domain_matching(): print(f" example.com == example.com: {domain_matches('example.com', 'example.com')}") print("\n2. Common subdomains (www, m) match bare domain:") - print(f" www.example.com matches example.com: {domain_matches('www.example.com', 'example.com')}") + print( + f" www.example.com matches example.com: {domain_matches('www.example.com', 'example.com')}" + ) print(f" m.example.com matches example.com: {domain_matches('m.example.com', 'example.com')}") print("\n3. Other subdomains DON'T match bare domain:") @@ -262,7 +267,8 @@ async def main(): print("\n\n" + "=" * 60) print("Summary") print("=" * 60) - print(""" + print( + """ Key Functions: 1. fetch_adagents(domain) - Fetch and validate adagents.json 2. verify_agent_authorization(data, agent_url, ...) - Check authorization @@ -279,7 +285,8 @@ async def main(): - Developer tools: Build validators and testing utilities See the full API documentation for more details. - """) + """ + ) if __name__ == "__main__": diff --git a/examples/basic_usage.py b/examples/basic_usage.py index fedb97d..505a97c 100644 --- a/examples/basic_usage.py +++ b/examples/basic_usage.py @@ -8,6 +8,7 @@ """ import asyncio + from adcp import ADCPClient from adcp.types import AgentConfig, Protocol diff --git a/examples/fetch_preview_urls.py b/examples/fetch_preview_urls.py index f3f6cc3..231b8b2 100644 --- a/examples/fetch_preview_urls.py +++ b/examples/fetch_preview_urls.py @@ -62,13 +62,15 @@ async def main(): print(f" Expires: {preview.get('expires_at', 'N/A')}") print() - preview_data.append({ - "format_id": format_id, - "name": name, - "preview_url": preview_url, - "width": 300, - "height": 400, - }) + preview_data.append( + { + "format_id": format_id, + "name": name, + "preview_url": preview_url, + "width": 300, + "height": 400, + } + ) # Save to JSON for the web component demo output_file = Path(__file__).parent / "preview_urls.json" @@ -76,7 +78,7 @@ async def main(): json.dump(preview_data, f, indent=2) print(f"💾 Saved preview URLs to: {output_file}") - print(f"\n🌐 Open examples/web_component_demo.html in a browser to see the previews!") + print("\n🌐 Open examples/web_component_demo.html in a browser to see the previews!") except Exception as e: print(f"❌ Error: {e}") diff --git a/examples/multi_agent.py b/examples/multi_agent.py index f4f96af..d3e8b56 100644 --- a/examples/multi_agent.py +++ b/examples/multi_agent.py @@ -8,6 +8,7 @@ """ import asyncio + from adcp import ADCPMultiAgentClient from adcp.types import AgentConfig, Protocol @@ -53,7 +54,7 @@ async def main(): sync_count = sum(1 for r in results if r.status == "completed") async_count = sum(1 for r in results if r.status == "submitted") - print(f"\n📊 Results:") + print("\n📊 Results:") print(f" ✅ Sync completions: {sync_count}") print(f" ⏳ Async (webhooks pending): {async_count}") diff --git a/examples/preview_urls.json b/examples/preview_urls.json index 206b3e2..6b384a4 100644 --- a/examples/preview_urls.json +++ b/examples/preview_urls.json @@ -20,4 +20,4 @@ "width": 160, "height": 600 } -] \ No newline at end of file +] diff --git a/examples/test_helpers_demo.py b/examples/test_helpers_demo.py index 2b38082..047ec9f 100755 --- a/examples/test_helpers_demo.py +++ b/examples/test_helpers_demo.py @@ -13,7 +13,6 @@ create_test_agent, test_agent, test_agent_a2a, - test_agent_a2a_no_auth, test_agent_client, test_agent_no_auth, ) @@ -219,9 +218,7 @@ async def various_operations() -> None: # List creative formats print("2. Listing creative formats...") - formats = await test_agent.list_creative_formats( - ListCreativeFormatsRequest() - ) + formats = await test_agent.list_creative_formats(ListCreativeFormatsRequest()) success = "✅" if formats.success else "❌" count = len(formats.data.formats) if formats.data else 0 print(f" {success} Formats: {count}") diff --git a/pyproject.toml b/pyproject.toml index 07acd75..46e734f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,8 @@ dev = [ "mypy>=1.0.0", "black>=23.0.0", "ruff>=0.1.0", + "datamodel-code-generator[http]>=0.35.0", + "email-validator>=2.0.0", ] [project.urls] @@ -63,7 +65,11 @@ extend-exclude = "/(generated|tasks)\\.py$" [tool.ruff] line-length = 100 target-version = "py310" -extend-exclude = ["src/adcp/types/generated.py", "src/adcp/types/tasks.py"] +extend-exclude = [ + "src/adcp/types/generated.py", + "src/adcp/types/tasks.py", + "src/adcp/types/generated_poc/", +] [tool.ruff.lint] select = ["E", "F", "I", "N", "W", "UP"] @@ -86,3 +92,9 @@ ignore_errors = true [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" + +[dependency-groups] +dev = [ + "datamodel-code-generator>=0.35.0", + "pre-commit>=4.4.0", +] diff --git a/schemas/cache/.hashes.json b/schemas/cache/.hashes.json new file mode 100644 index 0000000..301f673 --- /dev/null +++ b/schemas/cache/.hashes.json @@ -0,0 +1,106 @@ +{ + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/index.json": "eed524f6ca3b7b8981035a74f3eaf339da6fadab85e4af9196c1c7c4d5150095", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/adagents.json": "bd0e7cd9189b191d827a3ab7fb9d4f9ef4913377c816c5aa27af30bfd20d3451", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/activation-key.json": "bb9c20c6200b651ce6db89f7160be60b9845dbbb4390a13363ea5b82c1c3c786", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/asset-type.json": "a61ac8e14a61adef64d10d6ab39c204d703c087f29efa45c69c527988c93cd3d", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/audio-asset.json": "e25d688d22c8b130d9d1a2a09f9aa462cb7a5c83db6eea6f328cd937f8625a3f", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/css-asset.json": "e0a3e3b668f564cf804d0b893833188203b8992cd5d118e4fd3d19c85cb501a1", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/daast-asset.json": "9a4e469cf7d60b6ed31d250f669e5383161c55f5235b14fced4382c9374877b6", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/html-asset.json": "699902d22714940d9ae1e2fdbf079c7b83fff436f122cf6301bab48ead58bacc", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/image-asset.json": "c2cd83306d071cf83bacf0c62479b262f247d089facba5480bf1fad571ab61b7", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/javascript-asset.json": "09ec2b05977d7300c7b99416d295c3d6dfac064d50f03a639cd21d2e1df2420d", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/markdown-asset.json": "430a7177a8c98ecc6d7fb133b9afd4dcc88dc347e49638495207383b6e86e1f8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/text-asset.json": "62f7fdd0cff2800da53e73298cbd5394d4a332dd402ad354e49cfc95fd73d171", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/url-asset.json": "b1c3fccdc649777a9eaf0383c256009b434ea21e0a6868583c4062e7203e83f4", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/vast-asset.json": "d521be0b264a03e482bc432a42f8bef91cef0dc6302854e2f12ffad090116bd4", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/video-asset.json": "24e2e69c25e67ce48e5aaf9e3367b37796d0969530f1dfea93c36ff8194ebe6c", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/assets/webhook-asset.json": "ee8fe23b17b4150f02c13f5461b8d4618a041a345c48a356904c666078caf72d", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/brand-manifest-ref.json": "bf564ec2a537f7c931d52244a20549c493f151eda264de7487aa2d8bc25e184c", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/brand-manifest.json": "7285b2f6048dc20b983ac5eddc66c465309dac4bc9c4dd75c224d33d75c2e796", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/creative-asset.json": "f49b85b1fc82878e3d0227eda735fba3a4eb39008070a6ab2b9ceacea1c2c0db", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/creative-assignment.json": "1319ea89aedd48b5d354fa4b18668e2bb16a6e7e0ce640cdea63e55d3abf7941", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/creative-manifest.json": "160d56152c35f56dc9a26b6906e7e1f9d0e80826d25a006aba56487fa627e1eb", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/creative-policy.json": "f65903eae4ccf16b8c738be36b74edb31101698c30bf7e167a9c73c2a7417444", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/delivery-metrics.json": "4a2c3c6b684668d47eb954132ecc522dde989cec5e74bd9acaa10306b9e72d68", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/deployment.json": "ed9081ab01fa591d64d84fcb85e6fec796668e7c5c84cbf41394ca8c0120b231", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/destination.json": "6288199198075a827b4669a2964dc3c2cf3228195503506ab3bf5f637baee76f", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/error.json": "8ef7f825f398f28f63c3ec6a1631e49cd1fe08034d2e4c24b5153cad3e75e389", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/format-id.json": "13811721d182f84d2bfd28670c4ecc85cd15c0392a57ababd9d87fe7befd6b13", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/format.json": "04812788375e4f1af4ec3feb9766869cd3bc77381e51c8ab8ecc26a1cc19e870", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/frequency-cap.json": "143c0cd68fec7247d9633c13fb1f6edf2f18756694e8a29f60a6c5c672e918c9", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/measurement.json": "c3cf5e4026cf1ef93ea3a145ebfa11a945927a556266d1ca9a78a0b53bbcdac1", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/media-buy.json": "20d4cb99b9f290856769cfe1e0ec2d198f68cace214fe3e6e6ea7f84d8b74780", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/package.json": "d99262f119d9f3bfebc91be7286c54ae1c7a0217b7fa8ef5c1de086c2c307dd0", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/performance-feedback.json": "80384474042b6cda08b1128859143ec5822d6dcc907ba1fa3ecf81719e7644a7", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/placement.json": "ea814df6d878232bfdb1249fe199a1e32ec18598b7d3e3c57324d6e6120d9cf8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/pricing-option.json": "cfaeff3d4fc49e0d3ae76364e246b3b7a772ef12cbda65b1cff400ab1f841bfa", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/product.json": "c9c172106fbd0146aa4f4648a49cf17c01db4e8165076f02269ca0709239e2b8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/promoted-offerings.json": "cbe6953416b60391150c064d1735e70397814b96c03660e5a870ea9861a29123", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/promoted-products.json": "77773b1dce91b219ec5043c091eb2977a82ba301e03aead3868ba704e625379e", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/property.json": "510458c96a93deb90d9fa3a4dfc11b63c113755dbec3de386690f6838213bc84", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/protocol-envelope.json": "c6096b4ed4330c5e2045989bfd5cdc64fa6587cf8b0d1d2c19e33c7434cdacb8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/push-notification-config.json": "be2af5dbf7d398c958e59c70ab61a845e4a7d1f1e076412589d06d53454b64b0", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/reporting-capabilities.json": "c463c8d512c17b8ac7afde34d782b5e5f700ed9cf73a52992a328f85ad24d568", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/response.json": "0ac624a30da08e1aa90d2a9379f8c1ed29b704c3f5399224b9684672d3df9723", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/start-timing.json": "dd3a8f60032781a0f8b5448f91bcf19d10e94658a76196cc2823704ab195fdc4", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/sub-asset.json": "c12c522dc4117bbcc831b58ab7fc3f3a8f2c17fc1e727de733d1df46a10add8a", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/targeting.json": "6abe40b7455c90b44d048a09d5b11b1c431a3bd25f74b4f7ee26e5f80c4997d8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/tasks-get-request.json": "59521d574173660d53e8b3161a1879e29d47029d184c01d3fec2f0cee9b253d0", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/tasks-get-response.json": "551f9478f725d7a98f48a49be9c6a3088cc6e06fa1585aeb30e3085d85f9cfc5", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/tasks-list-request.json": "94048fb5a7eecdef061898a5a12c4a17bc794da2b4423d66c86ddeb6c3abf6c0", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/tasks-list-response.json": "529f093524948dc020fcfa3b6aaf9bf3f3fd5f4bec707e286350f86f4caea052", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/core/webhook-payload.json": "2bac25b40f5ea1f36d5f1adbbba4f5bac3b86e9ec5687426d5e10ad2b212ffc7", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/asset-types/index.json": "6bdcf5d78558ab1ff75759ed7b0b1271daab828e2cd92e0e51154b7759e72fd9", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/list-creative-formats-request.json": "0bc06b927aa7c1c48e49391232153a6dcdc978eb1df42f86837e1ce31e3ff9c2", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/list-creative-formats-response.json": "f897a1358b0b0ac61d6bb3c99323f9b25f473278a79ee0ac10f382c031be4ff4", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/preview-creative-request.json": "db8553c8c7f7194b87981a538b1f62a7b91e12bef732b34d6817cb05a523ca4b", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/preview-creative-response.json": "361d824a0abe6c42c21bc1778ebc35dabf68dcb99b5b0e1e6ff8dfae4b319b05", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/creative/preview-render.json": "d9312c330425552f6f8aff32e9fb3d792face83141b9b62dbf79a4efac712c41", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/channels.json": "e3f7d6ca073a48ed156fe1a00a0f2772415743823aee877dedf7b0db183c58a7", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/creative-status.json": "193e3ab2d6c6271c83bf48f19b39574600407767aac3e9b71dc6c5ef49c99f95", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/delivery-type.json": "4af6c09902eb7c74727a60ca28cdd2f5aec10c3b59d2c5b864fe8f6f83f07752", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/frequency-cap-scope.json": "a243a31fa69803d6a6c2680f5465969f0d14ec79b6c0ac4ed89c55379a0d782e", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/identifier-types.json": "e9fedddebf8d09857b77094c36de32c619b7e47c667791a5d8ec837c2e672500", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/media-buy-status.json": "a459b9007750a4ce2151a09c82478179311543e17c3aef49d15c3b7b77c5029c", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/pacing.json": "b8b12c9441fcde9a5e9f8a1fd2cae43bba8a2fda72de9f7f8ae0b34764ace965", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/package-status.json": "4806fa2598c8132cd2ea5167d67cfc663ad84a43771593ac022bdb34815cef44", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/pricing-model.json": "a254d66bdc46cd32f24b4b0e320c1c3609fbf51c2635199125051b46295a4394", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/publisher-identifier-types.json": "c0bae035c3700c8687885a28f4ca0e89558dec715a061258018521cd1c5294be", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/standard-format-ids.json": "848073552c20e2a837492835c200dc11c1a4a776502256aaf51a9903b0839cd3", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/task-status.json": "cf90da4dffe36693078a2e4d73971af4db550de2b92fa926f5b8edc2722eaf22", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/enums/task-type.json": "73ecd6267c94cf4eafb7168bf50131cf0b1d5cdbf7e66a39f78fb380a5b83968", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/build-creative-request.json": "1356a721f29a5e82e144640183c57df24c4c68eab35f7f4e6e8c6e93a8c10499", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/build-creative-response.json": "89258fb28bedf6b95c9f6ee8810b0674965f1c49746376823c6fedc9b2634ad2", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/create-media-buy-request.json": "69abc79214995c77c590b24fe6ad7cd9c322b7651aa9e3c065c9c39cdeeac656", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/create-media-buy-response.json": "5f00b2f6554188cec7c5feb47674aa2ff1fddfb44162c5fb84f75368b1faebe7", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/get-media-buy-delivery-request.json": "20464f0fa84ce3bed82ff18eeb8b5b3b46745a51e11e2393df58c0f309bf2cc6", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/get-media-buy-delivery-response.json": "89f62b754d9d626ec9068a7b030808dc3eba316cbb9c86369a4a68a5b40d38f3", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/get-products-request.json": "5d01c326361c21ed0735ffaada036e3017ac75c318832d8607cd935ecaaa4698", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/get-products-response.json": "ddc64c84fa4d4aec43981927bf5d2d36130ed9ae5aa97bda48924f63e17752f4", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-authorized-properties-request.json": "b9b8bfbd7d549506f11cf46781f269402cdb72d19562f53643fd612fccd8dc16", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-authorized-properties-response.json": "0f4ec18c9e3fe5b3a9288177134df58deab44bdc5fcc61a0838e93ceefebbcd8", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-creative-formats-request.json": "8d48f0391f3d6a359aca61cbb0389bb127be3d745dd7a9aabdac1853a6233a0f", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-creative-formats-response.json": "30ec1737d5b51f3d6920af5cc0a081efe09ba7b4e635eda26a45ca6be218e18d", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-creatives-request.json": "949b713c4b2a11f3230f1696694542b020547dfa1841a36ed46f009bd5559d5b", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/list-creatives-response.json": "6ae792791b90a3fb8f8a6a4d914bc597aee651e9b62ddccc591d2fec9fabe698", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/package-request.json": "22360197b0cb6f1a29aa5dc27a0001d4dae3d38d6b5028464ce33855a16fff49", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/provide-performance-feedback-request.json": "1b9b6eb46237e6c13aef37afd9fe53387f3b6bf082546b6c3437801689883233", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/provide-performance-feedback-response.json": "027956a411298fe8e6b4b9e7ddf07b9879bc9d03621946f98a91a06e4e3938cf", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/sync-creatives-request.json": "42ad6402161e0528b4ea1b6e75083437f200ce064ac2acef2adb57c0867fc658", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/sync-creatives-response.json": "c06c1296e4ddea110b8dee1b0e40289fea32f52c56ebf123512319008dfcc615", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/update-media-buy-request.json": "e907faefc302a58870554f8a1ac84de5529e4806c4da04879f153cade2372747", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/media-buy/update-media-buy-response.json": "b4214297b1f975c8c7f2f18149ffa41e599237d8619b82796a9d7a36bb3c4593", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpc-option.json": "da12700396dc58a3703767a565d5a4d34e49735b11a62700c5f526d035e34f96", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpcv-option.json": "89c7792ff3f269eb5539260deb50e547ca93ce2bf942e6798a77b6a2244aaf49", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpm-auction-option.json": "c49080b6f07441933b825334929cfd961d4d0865b257072d0c06dcfb59775d72", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpm-fixed-option.json": "d73c4177ae7455b5214338c8ecb50ea21ba35004cb95d82bf340d6c3d863ab7b", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpp-option.json": "f2e69bd56476841f858546e8ffb0be192e8c654bb6a0a614f1a65f83d2bbf38a", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/cpv-option.json": "e69547037ecd1d0ec2788b1d9daa17bc934bd682a07c9cebe7a23b2874048663", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/flat-rate-option.json": "133ebe6814dacb72989d79da945437321baabdf85a3e5b14c2a3b695ee471bee", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/vcpm-auction-option.json": "a69127626afec1168fd85cde9605618980531874aae221115fd6d918684e3d1e", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/pricing-options/vcpm-fixed-option.json": "94925835a296eb43e4cea75f10b674902489e5393db538ccb1b1b623877dfaef", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/signals/activate-signal-request.json": "6d60816d28aa28d188b9180c909e089954eca6b3dc734bd315d639ff345a9679", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/signals/activate-signal-response.json": "90e3b5875040b3ba3d7d0f2a1279cf9c7ab5015d0dfa2fd0849cf38f734bd5b3", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/signals/get-signals-request.json": "38f802f555aa3df77ebbb0e48f2bd93ae15571a2bbb3982bd2ee7e73a19451d5", + "https://raw.githubusercontent.com/adcontextprotocol/adcp/main/static/schemas/v1/signals/get-signals-response.json": "e23e1fcfeff0edef4b8a1d47d594b206acb51b9377d30e77fb2d190992638076" +} \ No newline at end of file diff --git a/schemas/cache/1.0.0/activate-signal-request.json b/schemas/cache/1.0.0/activate-signal-request.json index 114287d..fb57a85 100644 --- a/schemas/cache/1.0.0/activate-signal-request.json +++ b/schemas/cache/1.0.0/activate-signal-request.json @@ -1,31 +1,31 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/signals/activate-signal-request.json", - "title": "Activate Signal Request", + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "Request parameters for activating a signal on a specific destination", - "type": "object", "properties": { - "signal_agent_segment_id": { - "type": "string", - "description": "The universal identifier for the signal to activate" + "context": { + "additionalProperties": true, + "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.", + "type": "object" }, "destinations": { - "type": "array", "description": "Target destination(s) for activation. If the authenticated caller matches one of these destinations, activation keys will be included in the response.", "items": { "$ref": "destination.json" }, - "minItems": 1 + "minItems": 1, + "type": "array" }, - "context": { - "type": "object", - "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.", - "additionalProperties": true + "signal_agent_segment_id": { + "description": "The universal identifier for the signal to activate", + "type": "string" } }, "required": [ "signal_agent_segment_id", "destinations" ], - "additionalProperties": false + "title": "Activate Signal Request", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/activate-signal-response.json b/schemas/cache/1.0.0/activate-signal-response.json index d68db54..ef19709 100644 --- a/schemas/cache/1.0.0/activate-signal-response.json +++ b/schemas/cache/1.0.0/activate-signal-response.json @@ -1,64 +1,64 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/signals/activate-signal-response.json", - "title": "Activate Signal Response", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "Response payload for activate_signal task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the signal is either fully activated or not activated at all.", - "type": "object", "oneOf": [ { + "additionalProperties": false, "description": "Success response - signal activated successfully to one or more destinations", - "type": "object", + "not": { + "required": [ + "errors" + ] + }, "properties": { + "context": { + "additionalProperties": true, + "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", + "type": "object" + }, "deployments": { - "type": "array", "description": "Array of deployment results for each destination", "items": { "$ref": "deployment.json" - } - }, - "context": { - "type": "object", - "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", - "additionalProperties": true + }, + "type": "array" } }, "required": [ "deployments" ], + "type": "object" + }, + { "additionalProperties": false, + "description": "Error response - operation failed, signal not activated", "not": { "required": [ - "errors" + "deployments" ] - } - }, - { - "description": "Error response - operation failed, signal not activated", - "type": "object", + }, "properties": { + "context": { + "additionalProperties": true, + "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", + "type": "object" + }, "errors": { - "type": "array", "description": "Array of errors explaining why activation failed (e.g., platform connectivity issues, signal definition problems, authentication failures)", "items": { "$ref": "error.json" }, - "minItems": 1 - }, - "context": { - "type": "object", - "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", - "additionalProperties": true + "minItems": 1, + "type": "array" } }, "required": [ "errors" ], - "additionalProperties": false, - "not": { - "required": [ - "deployments" - ] - } + "type": "object" } - ] + ], + "title": "Activate Signal Response", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/activation-key.json b/schemas/cache/1.0.0/activation-key.json index e33e90a..62c58f5 100644 --- a/schemas/cache/1.0.0/activation-key.json +++ b/schemas/cache/1.0.0/activation-key.json @@ -1,50 +1,50 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/core/activation-key.json", - "title": "Activation Key", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "Universal identifier for using a signal on a destination platform. Can be either a segment ID or a key-value pair depending on the platform's targeting mechanism.", - "type": "object", "oneOf": [ { + "additionalProperties": false, "properties": { + "segment_id": { + "description": "The platform-specific segment identifier to use in campaign targeting", + "type": "string" + }, "type": { - "type": "string", "const": "segment_id", - "description": "Segment ID based targeting" - }, - "segment_id": { - "type": "string", - "description": "The platform-specific segment identifier to use in campaign targeting" + "description": "Segment ID based targeting", + "type": "string" } }, "required": [ "type", "segment_id" - ], - "additionalProperties": false + ] }, { + "additionalProperties": false, "properties": { + "key": { + "description": "The targeting parameter key", + "type": "string" + }, "type": { - "type": "string", "const": "key_value", - "description": "Key-value pair based targeting" - }, - "key": { - "type": "string", - "description": "The targeting parameter key" + "description": "Key-value pair based targeting", + "type": "string" }, "value": { - "type": "string", - "description": "The targeting parameter value" + "description": "The targeting parameter value", + "type": "string" } }, "required": [ "type", "key", "value" - ], - "additionalProperties": false + ] } - ] + ], + "title": "Activation Key", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/adagents.json b/schemas/cache/1.0.0/adagents.json index 0a5ca73..7e142ba 100644 --- a/schemas/cache/1.0.0/adagents.json +++ b/schemas/cache/1.0.0/adagents.json @@ -1,208 +1,64 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/adagents.json", - "title": "Authorized Sales Agents", - "description": "Declaration of authorized sales agents for advertising inventory. Hosted at /.well-known/adagents.json on publisher domains.", - "type": "object", - "properties": { - "$schema": { - "type": "string", - "description": "JSON Schema identifier for this adagents.json file", - "default": "https://adcontextprotocol.org/schemas/v1/adagents.json" - }, - "contact": { - "type": "object", - "description": "Contact information for the entity managing this adagents.json file (may be publisher or third-party operator)", - "properties": { - "name": { - "type": "string", - "description": "Name of the entity managing this file (e.g., 'Meta Advertising Operations', 'Clear Channel Digital')", - "minLength": 1, - "maxLength": 255 - }, - "email": { - "type": "string", - "format": "email", - "description": "Contact email for questions or issues with this authorization file", - "minLength": 1, - "maxLength": 255 - }, - "domain": { - "type": "string", - "description": "Primary domain of the entity managing this file", - "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$" - }, - "seller_id": { - "type": "string", - "description": "Seller ID from IAB Tech Lab sellers.json (if applicable)", - "minLength": 1, - "maxLength": 255 - }, - "tag_id": { - "type": "string", - "description": "TAG Certified Against Fraud ID for verification (if applicable)", - "minLength": 1, - "maxLength": 100 - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "properties": { - "type": "array", - "description": "Array of all properties covered by this adagents.json file. Same structure as list_authorized_properties response.", - "items": { - "$ref": "property.json" - }, - "minItems": 1 - }, - "tags": { - "type": "object", - "description": "Metadata for each tag referenced by properties. Same structure as list_authorized_properties response.", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Human-readable name for this tag" - }, - "description": { - "type": "string", - "description": "Description of what this tag represents" - } - }, - "required": [ - "name", - "description" - ], - "additionalProperties": false - } - }, - "authorized_agents": { - "type": "array", - "description": "Array of sales agents authorized to sell inventory for properties in this file", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "The authorized agent's API endpoint URL" - }, - "authorized_for": { - "type": "string", - "description": "Human-readable description of what this agent is authorized to sell", - "minLength": 1, - "maxLength": 500 - }, - "property_ids": { - "type": "array", - "description": "Property IDs this agent is authorized for. Resolved against the top-level properties array in this file. Mutually exclusive with property_tags and properties fields.", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "minItems": 1 - }, - "property_tags": { - "type": "array", - "description": "Tags identifying which properties this agent is authorized for. Resolved against the top-level properties array in this file using tag matching. Mutually exclusive with property_ids and properties fields.", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "minItems": 1 - }, - "properties": { - "type": "array", - "description": "Specific properties this agent is authorized for (alternative to property_ids/property_tags). Mutually exclusive with property_ids and property_tags fields.", - "items": { - "$ref": "property.json" - }, - "minItems": 1 - }, - "publisher_properties": { - "type": "array", - "description": "Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell (by property_id or property_tags). Mutually exclusive with property_ids, property_tags, and properties fields.", - "items": { - "type": "object", - "properties": { - "publisher_domain": { - "type": "string", - "description": "Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')", - "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$" - }, - "property_ids": { - "type": "array", - "description": "Specific property IDs from the publisher's adagents.json properties array. Mutually exclusive with property_tags.", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "minItems": 1 - }, - "property_tags": { - "type": "array", - "description": "Property tags from the publisher's adagents.json tags. Agent is authorized for all properties with these tags. Mutually exclusive with property_ids.", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "minItems": 1 - } - }, - "required": [ - "publisher_domain" - ], - "additionalProperties": false - }, - "minItems": 1 - } - }, - "required": [ - "url", - "authorized_for" - ], - "additionalProperties": false - }, - "minItems": 1 - }, - "last_updated": { - "type": "string", - "format": "date-time", - "description": "ISO 8601 timestamp indicating when this file was last updated" - } - }, - "required": [ - "authorized_agents" - ], + "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, + "description": "Declaration of authorized sales agents for advertising inventory. Hosted at /.well-known/adagents.json on publisher domains.", "examples": [ { "$schema": "https://adcontextprotocol.org/schemas/v1/adagents.json", "authorized_agents": [ { - "url": "https://agent.example.com", - "authorized_for": "Official sales agent" + "authorization_type": "property_tags", + "authorized_for": "Official sales agent", + "property_tags": [ + "all" + ], + "url": "https://agent.example.com" } ], - "last_updated": "2025-01-10T12:00:00Z" + "last_updated": "2025-01-10T12:00:00Z", + "properties": [ + { + "identifiers": [ + { + "type": "domain", + "value": "example.com" + } + ], + "name": "Example Site", + "property_type": "website", + "publisher_domain": "example.com" + } + ], + "tags": { + "all": { + "description": "All properties in this file", + "name": "All Properties" + } + } }, { "$schema": "https://adcontextprotocol.org/schemas/v1/adagents.json", + "authorized_agents": [ + { + "authorization_type": "property_tags", + "authorized_for": "All Meta properties", + "property_tags": [ + "meta_network" + ], + "url": "https://meta-ads.com" + } + ], "contact": { - "name": "Meta Advertising Operations", - "email": "adops@meta.com", "domain": "meta.com", + "email": "adops@meta.com", + "name": "Meta Advertising Operations", "seller_id": "pub-meta-12345", "tag_id": "12345" }, + "last_updated": "2025-01-10T15:30:00Z", "properties": [ { - "property_type": "mobile_app", - "name": "Instagram", "identifiers": [ { "type": "ios_bundle", @@ -213,15 +69,15 @@ "value": "com.instagram.android" } ], + "name": "Instagram", + "property_type": "mobile_app", + "publisher_domain": "instagram.com", "tags": [ "meta_network", "social_media" - ], - "publisher_domain": "instagram.com" + ] }, { - "property_type": "mobile_app", - "name": "Facebook", "identifiers": [ { "type": "ios_bundle", @@ -232,15 +88,15 @@ "value": "com.facebook.katana" } ], + "name": "Facebook", + "property_type": "mobile_app", + "publisher_domain": "facebook.com", "tags": [ "meta_network", "social_media" - ], - "publisher_domain": "facebook.com" + ] }, { - "property_type": "mobile_app", - "name": "WhatsApp", "identifiers": [ { "type": "ios_bundle", @@ -251,116 +107,417 @@ "value": "com.whatsapp" } ], + "name": "WhatsApp", + "property_type": "mobile_app", + "publisher_domain": "whatsapp.com", "tags": [ "meta_network", "messaging" - ], - "publisher_domain": "whatsapp.com" + ] } ], "tags": { + "messaging": { + "description": "Messaging and communication apps", + "name": "Messaging Apps" + }, "meta_network": { - "name": "Meta Network", - "description": "All Meta-owned properties" + "description": "All Meta-owned properties", + "name": "Meta Network" }, "social_media": { - "name": "Social Media Apps", - "description": "Social networking applications" - }, - "messaging": { - "name": "Messaging Apps", - "description": "Messaging and communication apps" + "description": "Social networking applications", + "name": "Social Media Apps" } - }, + } + }, + { + "$schema": "https://adcontextprotocol.org/schemas/v1/adagents.json", "authorized_agents": [ { - "url": "https://meta-ads.com", - "authorized_for": "All Meta properties", + "authorization_type": "property_tags", + "authorized_for": "Tumblr corporate properties only", "property_tags": [ - "meta_network" - ] + "corporate" + ], + "url": "https://tumblr-sales.com" } ], - "last_updated": "2025-01-10T15:30:00Z" - }, - { - "$schema": "https://adcontextprotocol.org/schemas/v1/adagents.json", "contact": { "name": "Tumblr Advertising" }, + "last_updated": "2025-01-10T16:00:00Z", "properties": [ { - "property_type": "website", - "name": "Tumblr Corporate", "identifiers": [ { "type": "domain", "value": "tumblr.com" } ], + "name": "Tumblr Corporate", + "property_type": "website", + "publisher_domain": "tumblr.com", "tags": [ "corporate" - ], - "publisher_domain": "tumblr.com" + ] } ], "tags": { "corporate": { - "name": "Corporate Properties", - "description": "Tumblr-owned corporate properties (not user blogs)" + "description": "Tumblr-owned corporate properties (not user blogs)", + "name": "Corporate Properties" } - }, - "authorized_agents": [ - { - "url": "https://tumblr-sales.com", - "authorized_for": "Tumblr corporate properties only", - "property_tags": [ - "corporate" - ] - } - ], - "last_updated": "2025-01-10T16:00:00Z" + } }, { "$schema": "https://adcontextprotocol.org/schemas/v1/adagents.json", - "contact": { - "name": "Example Third-Party Sales Agent", - "email": "sales@agent.example", - "domain": "agent.example" - }, "authorized_agents": [ { - "url": "https://agent.example/api", + "authorization_type": "publisher_properties", "authorized_for": "CNN CTV properties via publisher authorization", "publisher_properties": [ { - "publisher_domain": "cnn.com", "property_ids": [ "cnn_ctv_app" - ] + ], + "publisher_domain": "cnn.com", + "selection_type": "by_id" } - ] + ], + "url": "https://agent.example/api" }, { - "url": "https://agent.example/api", + "authorization_type": "publisher_properties", "authorized_for": "All CTV properties from multiple publishers", "publisher_properties": [ { - "publisher_domain": "cnn.com", "property_tags": [ "ctv" - ] + ], + "publisher_domain": "cnn.com", + "selection_type": "by_tag" }, { - "publisher_domain": "espn.com", "property_tags": [ "ctv" - ] + ], + "publisher_domain": "espn.com", + "selection_type": "by_tag" } - ] + ], + "url": "https://agent.example/api" } ], + "contact": { + "domain": "agent.example", + "email": "sales@agent.example", + "name": "Example Third-Party Sales Agent" + }, "last_updated": "2025-01-10T17:00:00Z" } - ] + ], + "properties": { + "$schema": { + "default": "https://adcontextprotocol.org/schemas/v1/adagents.json", + "description": "JSON Schema identifier for this adagents.json file", + "type": "string" + }, + "authorized_agents": { + "description": "Array of sales agents authorized to sell inventory for properties in this file", + "items": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "authorization_type": { + "const": "property_ids", + "description": "Discriminator indicating authorization by specific property IDs", + "type": "string" + }, + "authorized_for": { + "description": "Human-readable description of what this agent is authorized to sell", + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "property_ids": { + "description": "Property IDs this agent is authorized for. Resolved against the top-level properties array in this file", + "items": { + "pattern": "^[a-z0-9_]+$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "url": { + "description": "The authorized agent's API endpoint URL", + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "authorized_for", + "authorization_type", + "property_ids" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "authorization_type": { + "const": "property_tags", + "description": "Discriminator indicating authorization by property tags", + "type": "string" + }, + "authorized_for": { + "description": "Human-readable description of what this agent is authorized to sell", + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "property_tags": { + "description": "Tags identifying which properties this agent is authorized for. Resolved against the top-level properties array in this file using tag matching", + "items": { + "pattern": "^[a-z0-9_]+$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "url": { + "description": "The authorized agent's API endpoint URL", + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "authorized_for", + "authorization_type", + "property_tags" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "authorization_type": { + "const": "inline_properties", + "description": "Discriminator indicating authorization by inline property definitions", + "type": "string" + }, + "authorized_for": { + "description": "Human-readable description of what this agent is authorized to sell", + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "properties": { + "description": "Specific properties this agent is authorized for (alternative to property_ids/property_tags)", + "items": { + "$ref": "property.json" + }, + "minItems": 1, + "type": "array" + }, + "url": { + "description": "The authorized agent's API endpoint URL", + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "authorized_for", + "authorization_type", + "properties" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "authorization_type": { + "const": "publisher_properties", + "description": "Discriminator indicating authorization for properties from other publisher domains", + "type": "string" + }, + "authorized_for": { + "description": "Human-readable description of what this agent is authorized to sell", + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "publisher_properties": { + "description": "Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell", + "items": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "property_ids": { + "description": "Specific property IDs from the publisher's adagents.json properties array", + "items": { + "pattern": "^[a-z0-9_]+$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "publisher_domain": { + "description": "Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')", + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$", + "type": "string" + }, + "selection_type": { + "const": "by_id", + "description": "Discriminator indicating selection by specific property IDs", + "type": "string" + } + }, + "required": [ + "publisher_domain", + "selection_type", + "property_ids" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "property_tags": { + "description": "Property tags from the publisher's adagents.json tags. Agent is authorized for all properties with these tags", + "items": { + "pattern": "^[a-z0-9_]+$", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "publisher_domain": { + "description": "Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')", + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$", + "type": "string" + }, + "selection_type": { + "const": "by_tag", + "description": "Discriminator indicating selection by property tags", + "type": "string" + } + }, + "required": [ + "publisher_domain", + "selection_type", + "property_tags" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + "url": { + "description": "The authorized agent's API endpoint URL", + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "authorized_for", + "authorization_type", + "publisher_properties" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + "contact": { + "additionalProperties": false, + "description": "Contact information for the entity managing this adagents.json file (may be publisher or third-party operator)", + "properties": { + "domain": { + "description": "Primary domain of the entity managing this file", + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$", + "type": "string" + }, + "email": { + "description": "Contact email for questions or issues with this authorization file", + "format": "email", + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "name": { + "description": "Name of the entity managing this file (e.g., 'Meta Advertising Operations', 'Clear Channel Digital')", + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "seller_id": { + "description": "Seller ID from IAB Tech Lab sellers.json (if applicable)", + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "tag_id": { + "description": "TAG Certified Against Fraud ID for verification (if applicable)", + "maxLength": 100, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "last_updated": { + "description": "ISO 8601 timestamp indicating when this file was last updated", + "format": "date-time", + "type": "string" + }, + "properties": { + "description": "Array of all properties covered by this adagents.json file. Same structure as list_authorized_properties response.", + "items": { + "$ref": "property.json" + }, + "minItems": 1, + "type": "array" + }, + "tags": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "description": { + "description": "Description of what this tag represents", + "type": "string" + }, + "name": { + "description": "Human-readable name for this tag", + "type": "string" + } + }, + "required": [ + "name", + "description" + ], + "type": "object" + }, + "description": "Metadata for each tag referenced by properties. Same structure as list_authorized_properties response.", + "type": "object" + } + }, + "required": [ + "authorized_agents" + ], + "title": "Authorized Sales Agents", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/asset-type.json b/schemas/cache/1.0.0/asset-type.json index eb2ecc6..5508ec8 100644 --- a/schemas/cache/1.0.0/asset-type.json +++ b/schemas/cache/1.0.0/asset-type.json @@ -1,168 +1,168 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/core/asset-type.json", - "title": "Asset Type Schema", + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "Schema for describing asset requirements in creative formats", - "type": "object", "properties": { "asset_role": { - "type": "string", - "description": "Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')" + "description": "Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')", + "type": "string" }, - "type": { - "type": "string", - "enum": [ - "image", - "video", - "audio", - "text", - "html", - "css", - "javascript", - "vast", - "daast", - "promoted_offerings", - "url" - ], - "description": "Type of asset" + "constraints": { + "description": "Additional constraints or requirements (human-readable)", + "items": { + "type": "string" + }, + "type": "array" + }, + "examples": { + "description": "Example values or descriptions for this asset", + "items": { + "type": "string" + }, + "type": "array" }, "required": { - "type": "boolean", "default": true, - "description": "Whether this asset is mandatory for the format" + "description": "Whether this asset is mandatory for the format", + "type": "boolean" }, "requirements": { - "type": "object", + "additionalProperties": false, "description": "Technical requirements for this asset type", "properties": { - "dimensions": { - "type": "object", + "content_length": { "properties": { - "width": { - "type": "integer", - "minimum": 1 + "max_characters": { + "minimum": 1, + "type": "integer" }, - "height": { - "type": "integer", - "minimum": 1 + "max_words": { + "minimum": 1, + "type": "integer" }, + "min_characters": { + "minimum": 0, + "type": "integer" + }, + "min_words": { + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "dimensions": { + "properties": { "aspect_ratio": { "type": "string" }, - "min_width": { - "type": "integer", - "minimum": 1 + "height": { + "minimum": 1, + "type": "integer" + }, + "max_height": { + "minimum": 1, + "type": "integer" }, "max_width": { - "type": "integer", - "minimum": 1 + "minimum": 1, + "type": "integer" }, "min_height": { - "type": "integer", - "minimum": 1 + "minimum": 1, + "type": "integer" }, - "max_height": { - "type": "integer", - "minimum": 1 + "min_width": { + "minimum": 1, + "type": "integer" + }, + "width": { + "minimum": 1, + "type": "integer" } - } + }, + "type": "object" }, "duration": { - "type": "object", "properties": { - "min_seconds": { - "type": "number", - "minimum": 0 + "exact_seconds": { + "minimum": 0, + "type": "number" }, "max_seconds": { - "type": "number", - "minimum": 0 + "minimum": 0, + "type": "number" }, - "exact_seconds": { - "type": "number", - "minimum": 0 - } - } - }, - "file_size": { - "type": "object", - "properties": { - "min_bytes": { - "type": "integer", - "minimum": 0 - }, - "max_bytes": { - "type": "integer", - "minimum": 1 + "min_seconds": { + "minimum": 0, + "type": "number" } - } + }, + "type": "object" }, "file_formats": { - "type": "array", + "description": "Acceptable file formats (e.g., ['jpg', 'png'] for images)", "items": { "type": "string" }, - "description": "Acceptable file formats (e.g., ['jpg', 'png'] for images)" + "type": "array" }, - "content_length": { - "type": "object", + "file_size": { "properties": { - "min_characters": { - "type": "integer", - "minimum": 0 - }, - "max_characters": { - "type": "integer", - "minimum": 1 - }, - "min_words": { - "type": "integer", - "minimum": 0 + "max_bytes": { + "minimum": 1, + "type": "integer" }, - "max_words": { - "type": "integer", - "minimum": 1 + "min_bytes": { + "minimum": 0, + "type": "integer" } - } + }, + "type": "object" }, "quality": { - "type": "object", "properties": { - "min_bitrate_kbps": { - "type": "integer", - "minimum": 1 - }, "max_bitrate_kbps": { - "type": "integer", - "minimum": 1 + "minimum": 1, + "type": "integer" + }, + "min_bitrate_kbps": { + "minimum": 1, + "type": "integer" }, "min_resolution_dpi": { - "type": "integer", - "minimum": 72 + "minimum": 72, + "type": "integer" } - } + }, + "type": "object" } }, - "additionalProperties": false + "type": "object" }, - "constraints": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Additional constraints or requirements (human-readable)" - }, - "examples": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Example values or descriptions for this asset" + "type": { + "description": "Type of asset", + "enum": [ + "image", + "video", + "audio", + "text", + "html", + "css", + "javascript", + "vast", + "daast", + "promoted_offerings", + "url" + ], + "type": "string" } }, "required": [ "asset_role", "type" ], - "additionalProperties": false + "title": "Asset Type Schema", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/audio-asset.json b/schemas/cache/1.0.0/audio-asset.json index cebcb57..a1fb251 100644 --- a/schemas/cache/1.0.0/audio-asset.json +++ b/schemas/cache/1.0.0/audio-asset.json @@ -1,32 +1,32 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/core/assets/audio-asset.json", - "title": "Audio Asset", + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "Audio asset with URL and specifications", - "type": "object", "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "URL to the audio asset" + "bitrate_kbps": { + "description": "Audio bitrate in kilobits per second", + "minimum": 1, + "type": "integer" }, "duration_ms": { - "type": "integer", "description": "Audio duration in milliseconds", - "minimum": 0 + "minimum": 0, + "type": "integer" }, "format": { - "type": "string", - "description": "Audio file format (mp3, wav, aac, etc.)" + "description": "Audio file format (mp3, wav, aac, etc.)", + "type": "string" }, - "bitrate_kbps": { - "type": "integer", - "description": "Audio bitrate in kilobits per second", - "minimum": 1 + "url": { + "description": "URL to the audio asset", + "format": "uri", + "type": "string" } }, "required": [ "url" ], - "additionalProperties": false + "title": "Audio Asset", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/brand-manifest-ref.json b/schemas/cache/1.0.0/brand-manifest-ref.json index 960ecce..e98757a 100644 --- a/schemas/cache/1.0.0/brand-manifest-ref.json +++ b/schemas/cache/1.0.0/brand-manifest-ref.json @@ -1,33 +1,33 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/core/brand-manifest-ref.json", - "title": "Brand Manifest Reference", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "Brand manifest provided either as an inline object or a URL string pointing to a hosted manifest", - "oneOf": [ + "examples": [ { - "$ref": "brand-manifest.json", - "description": "Inline brand manifest object" + "data": { + "colors": { + "primary": "#FF6B35" + }, + "name": "ACME Corporation", + "url": "https://acmecorp.com" + }, + "description": "Inline brand manifest" }, { - "type": "string", - "format": "uri", - "description": "URL to a hosted brand manifest JSON file. The manifest at this URL must conform to the brand-manifest.json schema." + "data": "https://cdn.acmecorp.com/brand-manifest.json", + "description": "URL string reference to hosted manifest" } ], - "examples": [ + "oneOf": [ { - "description": "Inline brand manifest", - "data": { - "url": "https://acmecorp.com", - "name": "ACME Corporation", - "colors": { - "primary": "#FF6B35" - } - } + "$ref": "brand-manifest.json", + "description": "Inline brand manifest object" }, { - "description": "URL string reference to hosted manifest", - "data": "https://cdn.acmecorp.com/brand-manifest.json" + "description": "URL to a hosted brand manifest JSON file. The manifest at this URL must conform to the brand-manifest.json schema.", + "format": "uri", + "type": "string" } - ] + ], + "title": "Brand Manifest Reference" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/brand-manifest.json b/schemas/cache/1.0.0/brand-manifest.json index b641205..60500b6 100644 --- a/schemas/cache/1.0.0/brand-manifest.json +++ b/schemas/cache/1.0.0/brand-manifest.json @@ -1,424 +1,424 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/core/brand-manifest.json", - "title": "Brand Manifest", + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "url" + ] + }, + { + "required": [ + "name" + ] + } + ], "description": "Standardized brand information manifest for creative generation and media buying. Enables low-friction creative workflows by providing brand context that can be easily cached and shared across requests.", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL." + "examples": [ + { + "data": { + "name": "Bob's Fun Burgers", + "url": "https://bobsfunburgers.com" + }, + "description": "Example with both URL and name" }, - "name": { - "type": "string", - "description": "Brand or business name" + { + "data": { + "colors": { + "primary": "#0071CE", + "secondary": "#FFC220" + }, + "name": "Great Value", + "tone": "affordable and trustworthy" + }, + "description": "Example: white-label brand without dedicated URL" }, - "logos": { - "type": "array", - "description": "Brand logo assets with semantic tags for different use cases", + { + "data": { + "assets": [ + { + "asset_id": "hero_winter_2024", + "asset_type": "image", + "format": "jpg", + "height": 1080, + "name": "Winter Campaign Hero", + "tags": [ + "hero", + "winter", + "holiday", + "lifestyle" + ], + "url": "https://cdn.acmecorp.com/hero-winter-2024.jpg", + "width": 1920 + }, + { + "asset_id": "product_video_30s", + "asset_type": "video", + "duration_seconds": 30, + "format": "mp4", + "height": 1080, + "name": "Product Demo 30 Second", + "tags": [ + "product", + "demo", + "30s" + ], + "url": "https://cdn.acmecorp.com/product-demo-30s.mp4", + "width": 1920 + } + ], + "colors": { + "accent": "#F7931E", + "background": "#FFFFFF", + "primary": "#FF6B35", + "secondary": "#004E89", + "text": "#1A1A1A" + }, + "disclaimers": [ + { + "context": "health_claims", + "required": true, + "text": "Results may vary. Consult a professional before use." + } + ], + "fonts": { + "primary": "Helvetica Neue", + "secondary": "Georgia" + }, + "industry": "technology", + "logos": [ + { + "height": 512, + "tags": [ + "dark", + "square" + ], + "url": "https://cdn.acmecorp.com/logo-square-dark.png", + "width": 512 + }, + { + "height": 400, + "tags": [ + "light", + "horizontal" + ], + "url": "https://cdn.acmecorp.com/logo-horizontal-light.png", + "width": 1200 + } + ], + "name": "ACME Corporation", + "product_catalog": { + "categories": [ + "electronics/computers", + "electronics/accessories" + ], + "feed_format": "google_merchant_center", + "feed_url": "https://acmecorp.com/products.xml", + "last_updated": "2024-03-15T10:00:00Z", + "update_frequency": "hourly" + }, + "tagline": "Innovation You Can Trust", + "target_audience": "business decision-makers aged 35-55", + "tone": "professional and trustworthy", + "url": "https://acmecorp.com" + }, + "description": "Full brand manifest with all fields" + } + ], + "properties": { + "assets": { + "description": "Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files.", "items": { - "type": "object", + "additionalProperties": false, "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "URL to the logo asset" + "asset_id": { + "description": "Unique identifier for this asset", + "type": "string" + }, + "asset_type": { + "description": "Type of asset", + "enum": [ + "image", + "video", + "audio", + "text" + ], + "type": "string" + }, + "description": { + "description": "Asset description or usage notes", + "type": "string" + }, + "duration_seconds": { + "description": "Video/audio duration in seconds", + "type": "number" + }, + "file_size_bytes": { + "description": "File size in bytes", + "type": "integer" + }, + "format": { + "description": "File format (e.g., 'jpg', 'mp4', 'mp3')", + "type": "string" + }, + "height": { + "description": "Image/video height in pixels", + "type": "integer" + }, + "metadata": { + "additionalProperties": true, + "description": "Additional asset-specific metadata", + "type": "object" + }, + "name": { + "description": "Human-readable asset name", + "type": "string" }, "tags": { - "type": "array", - "description": "Semantic tags describing the logo variant (e.g., 'dark', 'light', 'square', 'horizontal', 'icon')", + "description": "Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')", "items": { "type": "string" - } + }, + "type": "array" }, - "width": { - "type": "integer", - "description": "Logo width in pixels" + "url": { + "description": "URL to CDN-hosted asset file", + "format": "uri", + "type": "string" }, - "height": { - "type": "integer", - "description": "Logo height in pixels" + "width": { + "description": "Image/video width in pixels", + "type": "integer" } }, "required": [ + "asset_id", + "asset_type", "url" - ] - } + ], + "type": "object" + }, + "type": "array" }, "colors": { - "type": "object", "description": "Brand color palette", "properties": { - "primary": { - "type": "string", + "accent": { + "description": "Accent color (hex format)", "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Primary brand color (hex format)" + "type": "string" }, - "secondary": { - "type": "string", + "background": { + "description": "Background color (hex format)", "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Secondary brand color (hex format)" + "type": "string" }, - "accent": { - "type": "string", + "primary": { + "description": "Primary brand color (hex format)", "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Accent color (hex format)" + "type": "string" }, - "background": { - "type": "string", + "secondary": { + "description": "Secondary brand color (hex format)", "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Background color (hex format)" + "type": "string" }, "text": { - "type": "string", + "description": "Text color (hex format)", "pattern": "^#[0-9A-Fa-f]{6}$", - "description": "Text color (hex format)" + "type": "string" } - } + }, + "type": "object" }, - "fonts": { - "type": "object", - "description": "Brand typography guidelines", + "contact": { + "description": "Brand contact information", "properties": { - "primary": { - "type": "string", - "description": "Primary font family name" + "email": { + "description": "Contact email", + "format": "email", + "type": "string" }, - "secondary": { - "type": "string", - "description": "Secondary font family name" + "phone": { + "description": "Contact phone number", + "type": "string" + } + }, + "type": "object" + }, + "disclaimers": { + "description": "Legal disclaimers or required text that must appear in creatives", + "items": { + "properties": { + "context": { + "description": "When this disclaimer applies (e.g., 'financial_products', 'health_claims', 'all')", + "type": "string" + }, + "required": { + "default": true, + "description": "Whether this disclaimer must appear", + "type": "boolean" + }, + "text": { + "description": "Disclaimer text", + "type": "string" + } }, + "required": [ + "text" + ], + "type": "object" + }, + "type": "array" + }, + "fonts": { + "description": "Brand typography guidelines", + "properties": { "font_urls": { - "type": "array", "description": "URLs to web font files if using custom fonts", "items": { - "type": "string", - "format": "uri" - } + "format": "uri", + "type": "string" + }, + "type": "array" + }, + "primary": { + "description": "Primary font family name", + "type": "string" + }, + "secondary": { + "description": "Secondary font family name", + "type": "string" } - } - }, - "tone": { - "type": "string", - "description": "Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')" + }, + "type": "object" }, - "tagline": { - "type": "string", - "description": "Brand tagline or slogan" + "industry": { + "description": "Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')", + "type": "string" }, - "assets": { - "type": "array", - "description": "Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files.", + "logos": { + "description": "Brand logo assets with semantic tags for different use cases", "items": { - "type": "object", "properties": { - "asset_id": { - "type": "string", - "description": "Unique identifier for this asset" - }, - "asset_type": { - "type": "string", - "enum": [ - "image", - "video", - "audio", - "text" - ], - "description": "Type of asset" - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL to CDN-hosted asset file" + "height": { + "description": "Logo height in pixels", + "type": "integer" }, "tags": { - "type": "array", - "description": "Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')", + "description": "Semantic tags describing the logo variant (e.g., 'dark', 'light', 'square', 'horizontal', 'icon')", "items": { "type": "string" - } + }, + "type": "array" }, - "name": { - "type": "string", - "description": "Human-readable asset name" - }, - "description": { - "type": "string", - "description": "Asset description or usage notes" + "url": { + "description": "URL to the logo asset", + "format": "uri", + "type": "string" }, "width": { - "type": "integer", - "description": "Image/video width in pixels" - }, - "height": { - "type": "integer", - "description": "Image/video height in pixels" - }, - "duration_seconds": { - "type": "number", - "description": "Video/audio duration in seconds" - }, - "file_size_bytes": { - "type": "integer", - "description": "File size in bytes" - }, - "format": { - "type": "string", - "description": "File format (e.g., 'jpg', 'mp4', 'mp3')" - }, - "metadata": { - "type": "object", - "description": "Additional asset-specific metadata", - "additionalProperties": true + "description": "Logo width in pixels", + "type": "integer" } }, "required": [ - "asset_id", - "asset_type", "url" ], - "additionalProperties": false - } + "type": "object" + }, + "type": "array" + }, + "metadata": { + "description": "Additional brand metadata", + "properties": { + "created_date": { + "description": "When this brand manifest was created", + "format": "date-time", + "type": "string" + }, + "updated_date": { + "description": "When this brand manifest was last updated", + "format": "date-time", + "type": "string" + }, + "version": { + "description": "Brand card version number", + "type": "string" + } + }, + "type": "object" + }, + "name": { + "description": "Brand or business name", + "type": "string" }, "product_catalog": { - "type": "object", + "additionalProperties": false, "description": "Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection.", "properties": { - "feed_url": { - "type": "string", - "format": "uri", - "description": "URL to product catalog feed" + "categories": { + "description": "Product categories available in the catalog (for filtering)", + "items": { + "type": "string" + }, + "type": "array" }, "feed_format": { - "type": "string", + "default": "google_merchant_center", + "description": "Format of the product feed", "enum": [ "google_merchant_center", "facebook_catalog", "custom" ], - "default": "google_merchant_center", - "description": "Format of the product feed" + "type": "string" }, - "categories": { - "type": "array", - "description": "Product categories available in the catalog (for filtering)", - "items": { - "type": "string" - } + "feed_url": { + "description": "URL to product catalog feed", + "format": "uri", + "type": "string" }, "last_updated": { - "type": "string", + "description": "When the product catalog was last updated", "format": "date-time", - "description": "When the product catalog was last updated" + "type": "string" }, "update_frequency": { - "type": "string", + "description": "How frequently the product catalog is updated", "enum": [ "realtime", "hourly", "daily", "weekly" ], - "description": "How frequently the product catalog is updated" + "type": "string" } }, "required": [ "feed_url" ], - "additionalProperties": false + "type": "object" }, - "disclaimers": { - "type": "array", - "description": "Legal disclaimers or required text that must appear in creatives", - "items": { - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "Disclaimer text" - }, - "context": { - "type": "string", - "description": "When this disclaimer applies (e.g., 'financial_products', 'health_claims', 'all')" - }, - "required": { - "type": "boolean", - "description": "Whether this disclaimer must appear", - "default": true - } - }, - "required": [ - "text" - ] - } - }, - "industry": { - "type": "string", - "description": "Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')" + "tagline": { + "description": "Brand tagline or slogan", + "type": "string" }, "target_audience": { - "type": "string", - "description": "Primary target audience description" + "description": "Primary target audience description", + "type": "string" }, - "contact": { - "type": "object", - "description": "Brand contact information", - "properties": { - "email": { - "type": "string", - "format": "email", - "description": "Contact email" - }, - "phone": { - "type": "string", - "description": "Contact phone number" - } - } + "tone": { + "description": "Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')", + "type": "string" }, - "metadata": { - "type": "object", - "description": "Additional brand metadata", - "properties": { - "created_date": { - "type": "string", - "format": "date-time", - "description": "When this brand manifest was created" - }, - "updated_date": { - "type": "string", - "format": "date-time", - "description": "When this brand manifest was last updated" - }, - "version": { - "type": "string", - "description": "Brand card version number" - } - } + "url": { + "description": "Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL.", + "format": "uri", + "type": "string" } }, - "anyOf": [ - { - "required": [ - "url" - ] - }, - { - "required": [ - "name" - ] - } - ], - "additionalProperties": false, - "examples": [ - { - "description": "Example with both URL and name", - "data": { - "url": "https://bobsfunburgers.com", - "name": "Bob's Fun Burgers" - } - }, - { - "description": "Example: white-label brand without dedicated URL", - "data": { - "name": "Great Value", - "colors": { - "primary": "#0071CE", - "secondary": "#FFC220" - }, - "tone": "affordable and trustworthy" - } - }, - { - "description": "Full brand manifest with all fields", - "data": { - "url": "https://acmecorp.com", - "name": "ACME Corporation", - "logos": [ - { - "url": "https://cdn.acmecorp.com/logo-square-dark.png", - "tags": [ - "dark", - "square" - ], - "width": 512, - "height": 512 - }, - { - "url": "https://cdn.acmecorp.com/logo-horizontal-light.png", - "tags": [ - "light", - "horizontal" - ], - "width": 1200, - "height": 400 - } - ], - "colors": { - "primary": "#FF6B35", - "secondary": "#004E89", - "accent": "#F7931E", - "background": "#FFFFFF", - "text": "#1A1A1A" - }, - "fonts": { - "primary": "Helvetica Neue", - "secondary": "Georgia" - }, - "tone": "professional and trustworthy", - "tagline": "Innovation You Can Trust", - "assets": [ - { - "asset_id": "hero_winter_2024", - "asset_type": "image", - "url": "https://cdn.acmecorp.com/hero-winter-2024.jpg", - "tags": [ - "hero", - "winter", - "holiday", - "lifestyle" - ], - "name": "Winter Campaign Hero", - "width": 1920, - "height": 1080, - "format": "jpg" - }, - { - "asset_id": "product_video_30s", - "asset_type": "video", - "url": "https://cdn.acmecorp.com/product-demo-30s.mp4", - "tags": [ - "product", - "demo", - "30s" - ], - "name": "Product Demo 30 Second", - "width": 1920, - "height": 1080, - "duration_seconds": 30, - "format": "mp4" - } - ], - "product_catalog": { - "feed_url": "https://acmecorp.com/products.xml", - "feed_format": "google_merchant_center", - "categories": [ - "electronics/computers", - "electronics/accessories" - ], - "last_updated": "2024-03-15T10:00:00Z", - "update_frequency": "hourly" - }, - "disclaimers": [ - { - "text": "Results may vary. Consult a professional before use.", - "context": "health_claims", - "required": true - } - ], - "industry": "technology", - "target_audience": "business decision-makers aged 35-55" - } - } - ] + "title": "Brand Manifest", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/build-creative-request.json b/schemas/cache/1.0.0/build-creative-request.json index 13886df..c044d54 100644 --- a/schemas/cache/1.0.0/build-creative-request.json +++ b/schemas/cache/1.0.0/build-creative-request.json @@ -1,30 +1,30 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/media-buy/build-creative-request.json", - "title": "Build Creative Request", + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "Request to transform or generate a creative manifest. Takes a source manifest (which may be minimal for pure generation) and produces a target manifest in the specified format. The source manifest should include all assets required by the target format (e.g., promoted_offerings for generative formats).", - "type": "object", "properties": { - "message": { - "type": "string", - "description": "Natural language instructions for the transformation or generation. For pure generation, this is the creative brief. For transformation, this provides guidance on how to adapt the creative." + "context": { + "additionalProperties": true, + "description": "Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.", + "type": "object" }, "creative_manifest": { "$ref": "creative-manifest.json", "description": "Creative manifest to transform or generate from. For pure generation, this should include the target format_id and any required input assets (e.g., promoted_offerings for generative formats). For transformation (e.g., resizing, reformatting), this is the complete creative to adapt." }, + "message": { + "description": "Natural language instructions for the transformation or generation. For pure generation, this is the creative brief. For transformation, this provides guidance on how to adapt the creative.", + "type": "string" + }, "target_format_id": { "$ref": "format-id.json", "description": "Format ID to generate. The format definition specifies required input assets and output structure." - }, - "context": { - "type": "object", - "description": "Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.", - "additionalProperties": true } }, "required": [ "target_format_id" ], - "additionalProperties": false + "title": "Build Creative Request", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/build-creative-response.json b/schemas/cache/1.0.0/build-creative-response.json index 49c7f55..6f62f71 100644 --- a/schemas/cache/1.0.0/build-creative-response.json +++ b/schemas/cache/1.0.0/build-creative-response.json @@ -1,61 +1,61 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/media-buy/build-creative-response.json", - "title": "Build Creative Response", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "Response containing the transformed or generated creative manifest, ready for use with preview_creative or sync_creatives. Returns either the complete creative manifest OR error information, never both.", - "type": "object", "oneOf": [ { + "additionalProperties": false, "description": "Success response - creative manifest generated successfully", - "type": "object", + "not": { + "required": [ + "errors" + ] + }, "properties": { + "context": { + "additionalProperties": true, + "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", + "type": "object" + }, "creative_manifest": { "$ref": "creative-manifest.json", "description": "The generated or transformed creative manifest" - }, - "context": { - "type": "object", - "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", - "additionalProperties": true } }, "required": [ "creative_manifest" ], + "type": "object" + }, + { "additionalProperties": false, + "description": "Error response - creative generation failed", "not": { "required": [ - "errors" + "creative_manifest" ] - } - }, - { - "description": "Error response - creative generation failed", - "type": "object", + }, "properties": { + "context": { + "additionalProperties": true, + "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", + "type": "object" + }, "errors": { - "type": "array", "description": "Array of errors explaining why creative generation failed", "items": { "$ref": "error.json" }, - "minItems": 1 - }, - "context": { - "type": "object", - "description": "Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.", - "additionalProperties": true + "minItems": 1, + "type": "array" } }, "required": [ "errors" ], - "additionalProperties": false, - "not": { - "required": [ - "creative_manifest" - ] - } + "type": "object" } - ] + ], + "title": "Build Creative Response", + "type": "object" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/channels.json b/schemas/cache/1.0.0/channels.json index ffbafca..2245aab 100644 --- a/schemas/cache/1.0.0/channels.json +++ b/schemas/cache/1.0.0/channels.json @@ -1,9 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", "$id": "/schemas/v1/enums/channels.json", - "title": "Advertising Channels", + "$schema": "http://json-schema.org/draft-07/schema#", "description": "Standard advertising channels supported by AdCP", - "type": "string", "enum": [ "display", "video", @@ -14,5 +12,7 @@ "podcast", "retail", "social" - ] + ], + "title": "Advertising Channels", + "type": "string" } \ No newline at end of file diff --git a/schemas/cache/1.0.0/core/activation-key.json b/schemas/cache/1.0.0/core/activation-key.json new file mode 100644 index 0000000..61133e0 --- /dev/null +++ b/schemas/cache/1.0.0/core/activation-key.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/activation-key.json", + "title": "Activation Key", + "description": "Universal identifier for using a signal on a destination platform. Can be either a segment ID or a key-value pair depending on the platform's targeting mechanism.", + "type": "object", + "oneOf": [ + { + "properties": { + "type": { + "type": "string", + "const": "segment_id", + "description": "Segment ID based targeting" + }, + "segment_id": { + "type": "string", + "description": "The platform-specific segment identifier to use in campaign targeting" + } + }, + "required": ["type", "segment_id"], + "additionalProperties": false + }, + { + "properties": { + "type": { + "type": "string", + "const": "key_value", + "description": "Key-value pair based targeting" + }, + "key": { + "type": "string", + "description": "The targeting parameter key" + }, + "value": { + "type": "string", + "description": "The targeting parameter value" + } + }, + "required": ["type", "key", "value"], + "additionalProperties": false + } + ] +} diff --git a/schemas/cache/1.0.0/core/asset-type.json b/schemas/cache/1.0.0/core/asset-type.json new file mode 100644 index 0000000..ca35b0e --- /dev/null +++ b/schemas/cache/1.0.0/core/asset-type.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/asset-type.json", + "title": "Asset Type Schema", + "description": "Schema for describing asset requirements in creative formats", + "type": "object", + "properties": { + "asset_role": { + "type": "string", + "description": "Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')" + }, + "type": { + "type": "string", + "enum": ["image", "video", "audio", "text", "html", "css", "javascript", "vast", "daast", "promoted_offerings", "url"], + "description": "Type of asset" + }, + "required": { + "type": "boolean", + "default": true, + "description": "Whether this asset is mandatory for the format" + }, + "requirements": { + "type": "object", + "description": "Technical requirements for this asset type", + "properties": { + "dimensions": { + "type": "object", + "properties": { + "width": {"type": "integer", "minimum": 1}, + "height": {"type": "integer", "minimum": 1}, + "aspect_ratio": {"type": "string"}, + "min_width": {"type": "integer", "minimum": 1}, + "max_width": {"type": "integer", "minimum": 1}, + "min_height": {"type": "integer", "minimum": 1}, + "max_height": {"type": "integer", "minimum": 1} + } + }, + "duration": { + "type": "object", + "properties": { + "min_seconds": {"type": "number", "minimum": 0}, + "max_seconds": {"type": "number", "minimum": 0}, + "exact_seconds": {"type": "number", "minimum": 0} + } + }, + "file_size": { + "type": "object", + "properties": { + "min_bytes": {"type": "integer", "minimum": 0}, + "max_bytes": {"type": "integer", "minimum": 1} + } + }, + "file_formats": { + "type": "array", + "items": {"type": "string"}, + "description": "Acceptable file formats (e.g., ['jpg', 'png'] for images)" + }, + "content_length": { + "type": "object", + "properties": { + "min_characters": {"type": "integer", "minimum": 0}, + "max_characters": {"type": "integer", "minimum": 1}, + "min_words": {"type": "integer", "minimum": 0}, + "max_words": {"type": "integer", "minimum": 1} + } + }, + "quality": { + "type": "object", + "properties": { + "min_bitrate_kbps": {"type": "integer", "minimum": 1}, + "max_bitrate_kbps": {"type": "integer", "minimum": 1}, + "min_resolution_dpi": {"type": "integer", "minimum": 72} + } + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "array", + "items": {"type": "string"}, + "description": "Additional constraints or requirements (human-readable)" + }, + "examples": { + "type": "array", + "items": {"type": "string"}, + "description": "Example values or descriptions for this asset" + } + }, + "required": ["asset_role", "type"], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/cache/1.0.0/core/assets/audio-asset.json b/schemas/cache/1.0.0/core/assets/audio-asset.json new file mode 100644 index 0000000..1e68417 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/audio-asset.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/audio-asset.json", + "title": "Audio Asset", + "description": "Audio asset with URL and specifications", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "URL to the audio asset" + }, + "duration_ms": { + "type": "integer", + "description": "Audio duration in milliseconds", + "minimum": 0 + }, + "format": { + "type": "string", + "description": "Audio file format (mp3, wav, aac, etc.)" + }, + "bitrate_kbps": { + "type": "integer", + "description": "Audio bitrate in kilobits per second", + "minimum": 1 + } + }, + "required": ["url"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/css-asset.json b/schemas/cache/1.0.0/core/assets/css-asset.json new file mode 100644 index 0000000..99979c5 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/css-asset.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/css-asset.json", + "title": "CSS Asset", + "description": "CSS stylesheet asset", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "CSS content" + }, + "media": { + "type": "string", + "description": "CSS media query context (e.g., 'screen', 'print')" + } + }, + "required": ["content"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/daast-asset.json b/schemas/cache/1.0.0/core/assets/daast-asset.json new file mode 100644 index 0000000..d5c1cbe --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/daast-asset.json @@ -0,0 +1,109 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/daast-asset.json", + "title": "DAAST Asset", + "description": "DAAST (Digital Audio Ad Serving Template) tag for third-party audio ad serving", + "oneOf": [ + { + "type": "object", + "properties": { + "delivery_type": { + "type": "string", + "const": "url", + "description": "Discriminator indicating DAAST is delivered via URL endpoint" + }, + "url": { + "type": "string", + "format": "uri", + "description": "URL endpoint that returns DAAST XML" + }, + "daast_version": { + "type": "string", + "enum": ["1.0", "1.1"], + "description": "DAAST specification version" + }, + "duration_ms": { + "type": "integer", + "description": "Expected audio duration in milliseconds (if known)", + "minimum": 0 + }, + "tracking_events": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "start", + "firstQuartile", + "midpoint", + "thirdQuartile", + "complete", + "impression", + "pause", + "resume", + "skip", + "mute", + "unmute" + ] + }, + "description": "Tracking events supported by this DAAST tag" + }, + "companion_ads": { + "type": "boolean", + "description": "Whether companion display ads are included" + } + }, + "required": ["delivery_type", "url"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "delivery_type": { + "type": "string", + "const": "inline", + "description": "Discriminator indicating DAAST is delivered as inline XML content" + }, + "content": { + "type": "string", + "description": "Inline DAAST XML content" + }, + "daast_version": { + "type": "string", + "enum": ["1.0", "1.1"], + "description": "DAAST specification version" + }, + "duration_ms": { + "type": "integer", + "description": "Expected audio duration in milliseconds (if known)", + "minimum": 0 + }, + "tracking_events": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "start", + "firstQuartile", + "midpoint", + "thirdQuartile", + "complete", + "impression", + "pause", + "resume", + "skip", + "mute", + "unmute" + ] + }, + "description": "Tracking events supported by this DAAST tag" + }, + "companion_ads": { + "type": "boolean", + "description": "Whether companion display ads are included" + } + }, + "required": ["delivery_type", "content"], + "additionalProperties": false + } + ] +} diff --git a/schemas/cache/1.0.0/core/assets/html-asset.json b/schemas/cache/1.0.0/core/assets/html-asset.json new file mode 100644 index 0000000..1e4854a --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/html-asset.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/html-asset.json", + "title": "HTML Asset", + "description": "HTML content asset", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "HTML content" + }, + "version": { + "type": "string", + "description": "HTML version (e.g., 'HTML5')" + } + }, + "required": ["content"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/image-asset.json b/schemas/cache/1.0.0/core/assets/image-asset.json new file mode 100644 index 0000000..f1fcc33 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/image-asset.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/image-asset.json", + "title": "Image Asset", + "description": "Image asset with URL and dimensions", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "URL to the image asset" + }, + "width": { + "type": "integer", + "description": "Image width in pixels", + "minimum": 1 + }, + "height": { + "type": "integer", + "description": "Image height in pixels", + "minimum": 1 + }, + "format": { + "type": "string", + "description": "Image file format (jpg, png, gif, webp, etc.)" + }, + "alt_text": { + "type": "string", + "description": "Alternative text for accessibility" + } + }, + "required": ["url"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/javascript-asset.json b/schemas/cache/1.0.0/core/assets/javascript-asset.json new file mode 100644 index 0000000..c56bbef --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/javascript-asset.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/javascript-asset.json", + "title": "JavaScript Asset", + "description": "JavaScript code asset", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "JavaScript content" + }, + "module_type": { + "type": "string", + "enum": ["esm", "commonjs", "script"], + "description": "JavaScript module type" + } + }, + "required": ["content"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/markdown-asset.json b/schemas/cache/1.0.0/core/assets/markdown-asset.json new file mode 100644 index 0000000..687bdd7 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/markdown-asset.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/markdown-asset.json", + "title": "Markdown Asset", + "description": "Markdown-formatted text content following CommonMark specification", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Markdown content following CommonMark spec with optional GitHub Flavored Markdown extensions" + }, + "language": { + "type": "string", + "description": "Language code (e.g., 'en', 'es', 'fr')" + }, + "markdown_flavor": { + "type": "string", + "enum": ["commonmark", "gfm"], + "default": "commonmark", + "description": "Markdown flavor used. CommonMark for strict compatibility, GFM for tables/task lists/strikethrough." + }, + "allow_raw_html": { + "type": "boolean", + "default": false, + "description": "Whether raw HTML blocks are allowed in the markdown. False recommended for security." + } + }, + "required": ["content"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/text-asset.json b/schemas/cache/1.0.0/core/assets/text-asset.json new file mode 100644 index 0000000..8680a85 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/text-asset.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/text-asset.json", + "title": "Text Asset", + "description": "Text content asset", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Text content" + }, + "language": { + "type": "string", + "description": "Language code (e.g., 'en', 'es', 'fr')" + } + }, + "required": ["content"], + "additionalProperties": false +} diff --git a/schemas/cache/1.0.0/core/assets/url-asset.json b/schemas/cache/1.0.0/core/assets/url-asset.json new file mode 100644 index 0000000..b1b1922 --- /dev/null +++ b/schemas/cache/1.0.0/core/assets/url-asset.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "/schemas/v1/core/assets/url-asset.json", + "title": "URL Asset", + "description": "URL reference asset", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "URL reference" + }, + "url_type": { + "type": "string", + "enum": [ + "clickthrough", + "tracker_pixel", + "tracker_script" + ], + "description": "Type of URL asset: 'clickthrough' for user click destination (landing page), 'tracker_pixel' for impression/event tracking via HTTP request (fires GET, expects pixel/204 response), 'tracker_script' for measurement SDKs that must load as