@adcp/client 4.9.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/bin/adcp.js +232 -0
  2. package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts +10 -0
  3. package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts.map +1 -1
  4. package/dist/lib/auth/oauth/MCPOAuthProvider.js +19 -0
  5. package/dist/lib/auth/oauth/MCPOAuthProvider.js.map +1 -1
  6. package/dist/lib/core/AgentClient.d.ts +92 -1
  7. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  8. package/dist/lib/core/AgentClient.js +237 -0
  9. package/dist/lib/core/AgentClient.js.map +1 -1
  10. package/dist/lib/core/AsyncHandler.d.ts +18 -1
  11. package/dist/lib/core/AsyncHandler.d.ts.map +1 -1
  12. package/dist/lib/core/AsyncHandler.js.map +1 -1
  13. package/dist/lib/core/SingleAgentClient.d.ts +70 -2
  14. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  15. package/dist/lib/core/SingleAgentClient.js +106 -0
  16. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  17. package/dist/lib/registry/types.generated.d.ts +12 -12
  18. package/dist/lib/registry/types.generated.js +1 -1
  19. package/dist/lib/testing/agent-tester.d.ts.map +1 -1
  20. package/dist/lib/testing/agent-tester.js.map +1 -1
  21. package/dist/lib/testing/client.d.ts +6 -1
  22. package/dist/lib/testing/client.d.ts.map +1 -1
  23. package/dist/lib/testing/client.js +36 -19
  24. package/dist/lib/testing/client.js.map +1 -1
  25. package/dist/lib/testing/compliance/briefs.d.ts +11 -0
  26. package/dist/lib/testing/compliance/briefs.d.ts.map +1 -0
  27. package/dist/lib/testing/compliance/briefs.js +156 -0
  28. package/dist/lib/testing/compliance/briefs.js.map +1 -0
  29. package/dist/lib/testing/compliance/comply.d.ts +28 -0
  30. package/dist/lib/testing/compliance/comply.d.ts.map +1 -0
  31. package/dist/lib/testing/compliance/comply.js +617 -0
  32. package/dist/lib/testing/compliance/comply.js.map +1 -0
  33. package/dist/lib/testing/compliance/index.d.ts +12 -0
  34. package/dist/lib/testing/compliance/index.d.ts.map +1 -0
  35. package/dist/lib/testing/compliance/index.js +20 -0
  36. package/dist/lib/testing/compliance/index.js.map +1 -0
  37. package/dist/lib/testing/compliance/profiles.d.ts +30 -0
  38. package/dist/lib/testing/compliance/profiles.d.ts.map +1 -0
  39. package/dist/lib/testing/compliance/profiles.js +388 -0
  40. package/dist/lib/testing/compliance/profiles.js.map +1 -0
  41. package/dist/lib/testing/compliance/types.d.ts +121 -0
  42. package/dist/lib/testing/compliance/types.d.ts.map +1 -0
  43. package/dist/lib/testing/compliance/types.js +6 -0
  44. package/dist/lib/testing/compliance/types.js.map +1 -0
  45. package/dist/lib/testing/index.d.ts +1 -0
  46. package/dist/lib/testing/index.d.ts.map +1 -1
  47. package/dist/lib/testing/index.js +13 -1
  48. package/dist/lib/testing/index.js.map +1 -1
  49. package/dist/lib/testing/scenarios/capabilities.d.ts.map +1 -1
  50. package/dist/lib/testing/scenarios/capabilities.js +14 -13
  51. package/dist/lib/testing/scenarios/capabilities.js.map +1 -1
  52. package/dist/lib/testing/scenarios/creative.d.ts.map +1 -1
  53. package/dist/lib/testing/scenarios/creative.js +21 -14
  54. package/dist/lib/testing/scenarios/creative.js.map +1 -1
  55. package/dist/lib/testing/scenarios/discovery.d.ts.map +1 -1
  56. package/dist/lib/testing/scenarios/discovery.js +7 -5
  57. package/dist/lib/testing/scenarios/discovery.js.map +1 -1
  58. package/dist/lib/testing/scenarios/edge-cases.d.ts.map +1 -1
  59. package/dist/lib/testing/scenarios/edge-cases.js +90 -112
  60. package/dist/lib/testing/scenarios/edge-cases.js.map +1 -1
  61. package/dist/lib/testing/scenarios/governance.d.ts.map +1 -1
  62. package/dist/lib/testing/scenarios/governance.js +50 -39
  63. package/dist/lib/testing/scenarios/governance.js.map +1 -1
  64. package/dist/lib/testing/scenarios/media-buy.d.ts +6 -5
  65. package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
  66. package/dist/lib/testing/scenarios/media-buy.js +141 -51
  67. package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
  68. package/dist/lib/testing/scenarios/schema-compliance.d.ts.map +1 -1
  69. package/dist/lib/testing/scenarios/schema-compliance.js +26 -22
  70. package/dist/lib/testing/scenarios/schema-compliance.js.map +1 -1
  71. package/dist/lib/testing/scenarios/signals.d.ts +4 -8
  72. package/dist/lib/testing/scenarios/signals.d.ts.map +1 -1
  73. package/dist/lib/testing/scenarios/signals.js +17 -59
  74. package/dist/lib/testing/scenarios/signals.js.map +1 -1
  75. package/dist/lib/testing/scenarios/sponsored-intelligence.d.ts.map +1 -1
  76. package/dist/lib/testing/scenarios/sponsored-intelligence.js +23 -19
  77. package/dist/lib/testing/scenarios/sponsored-intelligence.js.map +1 -1
  78. package/dist/lib/testing/types.d.ts +2 -1
  79. package/dist/lib/testing/types.d.ts.map +1 -1
  80. package/dist/lib/types/core.generated.d.ts +22 -104
  81. package/dist/lib/types/core.generated.d.ts.map +1 -1
  82. package/dist/lib/types/core.generated.js +1 -1
  83. package/dist/lib/types/schemas.generated.d.ts +75 -187
  84. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  85. package/dist/lib/types/schemas.generated.js +16 -44
  86. package/dist/lib/types/schemas.generated.js.map +1 -1
  87. package/dist/lib/types/tools.generated.d.ts +23 -105
  88. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  89. package/dist/lib/utils/capabilities.d.ts +1 -1
  90. package/dist/lib/utils/capabilities.d.ts.map +1 -1
  91. package/dist/lib/utils/capabilities.js +6 -6
  92. package/dist/lib/utils/capabilities.js.map +1 -1
  93. package/dist/lib/utils/request-normalizer.d.ts.map +1 -1
  94. package/dist/lib/utils/request-normalizer.js +12 -0
  95. package/dist/lib/utils/request-normalizer.js.map +1 -1
  96. package/dist/lib/version.d.ts +3 -3
  97. package/dist/lib/version.d.ts.map +1 -1
  98. package/dist/lib/version.js +3 -3
  99. package/dist/lib/version.js.map +1 -1
  100. package/package.json +5 -2
@@ -73,7 +73,7 @@ export type GetProductsRequest = {
73
73
  /**
74
74
  * Specific product fields to include in the response. When omitted, all fields are returned. Use for lightweight discovery calls where only a subset of product data is needed (e.g., just IDs and pricing for comparison). Required fields (product_id, name) are always included regardless of selection.
75
75
  */
76
- fields?: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'format_ids' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'outcome_measurement' | 'delivery_measurement' | 'reporting_capabilities' | 'creative_policy' | 'catalog_types' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'max_optimization_goals' | 'catalog_match' | 'show_ids' | 'episodes' | 'brief_relevance' | 'expires_at' | 'product_card' | 'product_card_detailed')[];
76
+ fields?: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'format_ids' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'outcome_measurement' | 'delivery_measurement' | 'reporting_capabilities' | 'creative_policy' | 'catalog_types' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'max_optimization_goals' | 'catalog_match' | 'shows' | 'show_targeting_allowed' | 'episodes' | 'brief_relevance' | 'expires_at' | 'product_card' | 'product_card_detailed' | 'enforced_policies')[];
77
77
  /**
78
78
  * Maximum time the buyer will commit to this request. The seller returns the best results achievable within this budget and does not start processes (human approvals, expensive external queries) that cannot complete in time. When omitted, the seller decides timing.
79
79
  */
@@ -158,7 +158,7 @@ export type MetroAreaSystem = 'nielsen_dma' | 'uk_itl1' | 'uk_itl2' | 'eurostat_
158
158
  /**
159
159
  * Standardized advertising media channels describing how buyers allocate budget. Channels are planning abstractions, not technical substrates. See the Media Channel Taxonomy specification for detailed definitions.
160
160
  */
161
- export type MediaChannel = 'display' | 'olv' | 'social' | 'search' | 'ctv' | 'linear_tv' | 'radio' | 'streaming_audio' | 'podcast' | 'dooh' | 'ooh' | 'print' | 'cinema' | 'email' | 'gaming' | 'retail_media' | 'influencer' | 'affiliate' | 'product_placement' | 'ai_media';
161
+ export type MediaChannel = 'display' | 'olv' | 'social' | 'search' | 'ctv' | 'linear_tv' | 'radio' | 'streaming_audio' | 'podcast' | 'dooh' | 'ooh' | 'print' | 'cinema' | 'email' | 'gaming' | 'retail_media' | 'influencer' | 'affiliate' | 'product_placement' | 'sponsored_intelligence';
162
162
  /**
163
163
  * Geographic targeting level (country, region, metro, postal_area)
164
164
  */
@@ -676,26 +676,6 @@ export type TalentRole = 'host' | 'guest' | 'creator' | 'cast' | 'narrator' | 'p
676
676
  * What kind of derivative content this is
677
677
  */
678
678
  export type DerivativeType = 'clip' | 'highlight' | 'recap' | 'trailer' | 'bonus';
679
- /**
680
- * How frequently the show releases new episodes
681
- */
682
- export type ShowCadence = 'daily' | 'weekly' | 'seasonal' | 'event' | 'irregular';
683
- /**
684
- * Lifecycle status of the show
685
- */
686
- export type ShowStatus = 'active' | 'hiatus' | 'ended' | 'upcoming';
687
- /**
688
- * Production quality tier. Seller-declared. Maps to OpenRTB content.prodq (professional=1, prosumer=2, ugc=3).
689
- */
690
- export type ProductionQuality = 'professional' | 'prosumer' | 'ugc';
691
- /**
692
- * Type of distribution identifier
693
- */
694
- export type DistributionIdentifierType = 'apple_podcast_id' | 'spotify_show_id' | 'rss_url' | 'podcast_guid' | 'amazon_music_id' | 'iheart_id' | 'podcast_index_id' | 'youtube_channel_id' | 'youtube_playlist_id' | 'amazon_title_id' | 'roku_channel_id' | 'pluto_channel_id' | 'tubi_id' | 'peacock_id' | 'tiktok_id' | 'twitch_channel' | 'imdb_id' | 'gracenote_id' | 'eidr_id' | 'domain' | 'substack_id';
695
- /**
696
- * How the shows are related
697
- */
698
- export type ShowRelationship = 'spinoff' | 'companion' | 'sequel' | 'prequel' | 'crossover';
699
679
  /**
700
680
  * Days of the week for daypart targeting
701
681
  */
@@ -708,10 +688,6 @@ export interface GetProductsResponse {
708
688
  * Array of matching products
709
689
  */
710
690
  products: Product[];
711
- /**
712
- * Shows referenced by products in this response. Only includes shows referenced by the returned products. Under pagination, each page includes all show objects needed for that page's products.
713
- */
714
- shows?: Show[];
715
691
  /**
716
692
  * Optional array of proposed media plans with budget allocations across products. Publishers include proposals when they can provide strategic guidance based on the brief. Proposals are actionable - buyers can refine them via follow-up get_products calls within the same session, or execute them directly via create_media_buy.
717
693
  */
@@ -941,11 +917,15 @@ export interface Product {
941
917
  manifest: {};
942
918
  };
943
919
  /**
944
- * References to shows in the response's top-level shows array. When present, the product covers inventory associated with these shows. A product can span multiple shows (e.g., a podcast network bundle).
920
+ * Shows available in this product. Each entry references shows declared in an adagents.json by domain and show ID. Buyers resolve full show objects from the referenced adagents.json.
921
+ */
922
+ shows?: ShowSelector[];
923
+ /**
924
+ * Whether buyers can target a subset of this product's shows. When false (default), the product is a bundle — buyers get all listed shows. When true, buyers can select specific shows in the media buy.
945
925
  */
946
- show_ids?: string[];
926
+ show_targeting_allowed?: boolean;
947
927
  /**
948
- * Specific episodes included in this product. Each episode references its parent show via show_id when the product spans multiple shows. When absent with show_ids present, the product covers the shows broadly (run-of-show).
928
+ * Specific episodes included in this product. Each episode references its parent show via show_id when the product spans multiple shows. When absent with shows present, the product covers the shows broadly (run-of-show).
949
929
  */
950
930
  episodes?: Episode[];
951
931
  /**
@@ -1563,6 +1543,19 @@ export interface CreativePolicy {
1563
1543
  */
1564
1544
  provenance_required?: boolean;
1565
1545
  }
1546
+ /**
1547
+ * References shows declared in an adagents.json. Buyers resolve full show objects by fetching the adagents.json at the given domain and matching show_ids against its shows array.
1548
+ */
1549
+ export interface ShowSelector {
1550
+ /**
1551
+ * Domain where the adagents.json declaring these shows is hosted (e.g., 'mrbeast.com'). The shows array in that file contains the authoritative show definitions.
1552
+ */
1553
+ publisher_domain: string;
1554
+ /**
1555
+ * Show IDs from the adagents.json shows array. Each ID must match a show_id declared in that file.
1556
+ */
1557
+ show_ids: string[];
1558
+ }
1566
1559
  /**
1567
1560
  * A specific installment of a show. Episodes inherit show-level fields they don't override: content_rating defaults to the show's baseline, guest_talent is additive to the show's recurring talent, and topics add context beyond the show's genre.
1568
1561
  */
@@ -1572,7 +1565,7 @@ export interface Episode {
1572
1565
  */
1573
1566
  episode_id: string;
1574
1567
  /**
1575
- * Parent show reference. Required when the product spans multiple shows (has multiple entries in show_ids on the product).
1568
+ * Parent show reference. Required when the product spans multiple shows. Maps to a show_id declared in one of the publishers' adagents.json files referenced by the product's shows selectors.
1576
1569
  */
1577
1570
  show_id?: string;
1578
1571
  /**
@@ -1675,81 +1668,6 @@ export interface AdInventoryConfiguration {
1675
1668
  */
1676
1669
  supported_formats?: string[];
1677
1670
  }
1678
- /**
1679
- * A persistent content program that produces episodes over time. Shows are reusable objects that products reference by show_id. The show_id is seller-scoped — use distribution identifiers for cross-seller matching.
1680
- */
1681
- export interface Show {
1682
- /**
1683
- * Seller-assigned identifier for this show. Unique within a single get_products response but not globally unique across sellers. Use distribution identifiers for cross-seller matching.
1684
- */
1685
- show_id: string;
1686
- /**
1687
- * Human-readable show name
1688
- */
1689
- name: string;
1690
- /**
1691
- * What the show is about
1692
- */
1693
- description?: string;
1694
- /**
1695
- * Genre tags. When genre_taxonomy is present, values are taxonomy IDs (e.g., IAB Content Taxonomy 3.0 codes). Otherwise free-form.
1696
- */
1697
- genre?: string[];
1698
- /**
1699
- * Taxonomy system for genre values (e.g., 'iab_content_3.0'). When present, genre values should be valid taxonomy IDs. Recommended for machine-readable brand safety evaluation.
1700
- */
1701
- genre_taxonomy?: string;
1702
- /**
1703
- * Primary language (BCP 47 tag, e.g., 'en', 'es-MX')
1704
- */
1705
- language?: string;
1706
- content_rating?: ContentRating;
1707
- cadence?: ShowCadence;
1708
- /**
1709
- * Current or most recent season identifier (e.g., '3', '2026', 'spring_2026'). A lightweight label — not a full season object.
1710
- */
1711
- season?: string;
1712
- status?: ShowStatus;
1713
- production_quality?: ProductionQuality;
1714
- /**
1715
- * Hosts, recurring cast, creators associated with the show. Each talent entry may include a brand_url linking to their brand.json identity.
1716
- */
1717
- talent?: Talent[];
1718
- /**
1719
- * Where this show is distributed. Each entry maps the show to a publisher platform with platform-specific identifiers. Shows SHOULD include at least one platform-independent identifier (imdb_id, gracenote_id, eidr_id) when available.
1720
- */
1721
- distribution?: ShowDistribution[];
1722
- /**
1723
- * Relationships to other shows (spin-offs, companion shows, etc.). Each entry references another show by show_id within the same response.
1724
- */
1725
- related_shows?: {
1726
- /**
1727
- * The related show's show_id within this seller's response
1728
- */
1729
- show_id: string;
1730
- relationship: ShowRelationship;
1731
- }[];
1732
- ext?: ExtensionObject;
1733
- }
1734
- /**
1735
- * A show's presence on a specific publisher platform, identified by platform-specific identifiers. Enables cross-seller matching when the same show is sold by different agents.
1736
- */
1737
- export interface ShowDistribution {
1738
- /**
1739
- * Domain of the publisher platform where the show is distributed (e.g., 'youtube.com', 'spotify.com')
1740
- */
1741
- publisher_domain: string;
1742
- /**
1743
- * Platform-specific identifiers for the show on this publisher
1744
- */
1745
- identifiers: {
1746
- type: DistributionIdentifierType;
1747
- /**
1748
- * The identifier value
1749
- */
1750
- value: string;
1751
- }[];
1752
- }
1753
1671
  /**
1754
1672
  * A proposed media plan with budget allocations across products. Represents the publisher's strategic recommendation for how to structure a campaign based on the brief. Proposals are actionable - buyers can execute them directly via create_media_buy by providing the proposal_id.
1755
1673
  */