@adcp/client 3.0.3 → 3.2.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 (72) hide show
  1. package/README.md +3 -0
  2. package/dist/lib/agents/index.generated.d.ts +27 -50
  3. package/dist/lib/agents/index.generated.d.ts.map +1 -1
  4. package/dist/lib/agents/index.generated.js +12 -24
  5. package/dist/lib/agents/index.generated.js.map +1 -1
  6. package/dist/lib/auth/index.d.ts +8 -3
  7. package/dist/lib/auth/index.d.ts.map +1 -1
  8. package/dist/lib/auth/index.js +32 -6
  9. package/dist/lib/auth/index.js.map +1 -1
  10. package/dist/lib/core/ADCPMultiAgentClient.d.ts +150 -41
  11. package/dist/lib/core/ADCPMultiAgentClient.d.ts.map +1 -1
  12. package/dist/lib/core/ADCPMultiAgentClient.js +150 -41
  13. package/dist/lib/core/ADCPMultiAgentClient.js.map +1 -1
  14. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  15. package/dist/lib/core/ConfigurationManager.d.ts.map +1 -1
  16. package/dist/lib/core/ConfigurationManager.js +14 -1
  17. package/dist/lib/core/ConfigurationManager.js.map +1 -1
  18. package/dist/lib/core/CreativeAgentClient.d.ts.map +1 -1
  19. package/dist/lib/core/CreativeAgentClient.js +6 -1
  20. package/dist/lib/core/CreativeAgentClient.js.map +1 -1
  21. package/dist/lib/core/ResponseValidator.d.ts.map +1 -1
  22. package/dist/lib/core/ResponseValidator.js +5 -6
  23. package/dist/lib/core/ResponseValidator.js.map +1 -1
  24. package/dist/lib/core/SingleAgentClient.d.ts +6 -0
  25. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  26. package/dist/lib/core/SingleAgentClient.js +15 -7
  27. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  28. package/dist/lib/core/TaskExecutor.d.ts +1 -1
  29. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  30. package/dist/lib/core/TaskExecutor.js +60 -61
  31. package/dist/lib/core/TaskExecutor.js.map +1 -1
  32. package/dist/lib/index.d.ts +30 -15
  33. package/dist/lib/index.d.ts.map +1 -1
  34. package/dist/lib/index.js +86 -26
  35. package/dist/lib/index.js.map +1 -1
  36. package/dist/lib/protocols/a2a.d.ts +2 -1
  37. package/dist/lib/protocols/a2a.d.ts.map +1 -1
  38. package/dist/lib/protocols/a2a.js +12 -4
  39. package/dist/lib/protocols/a2a.js.map +1 -1
  40. package/dist/lib/protocols/index.d.ts +12 -1
  41. package/dist/lib/protocols/index.d.ts.map +1 -1
  42. package/dist/lib/protocols/index.js +29 -14
  43. package/dist/lib/protocols/index.js.map +1 -1
  44. package/dist/lib/types/adcp.d.ts +3 -58
  45. package/dist/lib/types/adcp.d.ts.map +1 -1
  46. package/dist/lib/types/core.generated.d.ts +268 -211
  47. package/dist/lib/types/core.generated.d.ts.map +1 -1
  48. package/dist/lib/types/core.generated.js +2 -2
  49. package/dist/lib/types/schemas.generated.d.ts +3191 -2687
  50. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  51. package/dist/lib/types/schemas.generated.js +562 -480
  52. package/dist/lib/types/schemas.generated.js.map +1 -1
  53. package/dist/lib/types/tools.generated.d.ts +790 -654
  54. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  55. package/dist/lib/types/tools.generated.js +1 -1
  56. package/dist/lib/types/tools.generated.js.map +1 -1
  57. package/dist/lib/utils/index.d.ts +3 -0
  58. package/dist/lib/utils/index.d.ts.map +1 -1
  59. package/dist/lib/utils/index.js +10 -1
  60. package/dist/lib/utils/index.js.map +1 -1
  61. package/dist/lib/utils/preview-utils.d.ts.map +1 -1
  62. package/dist/lib/utils/preview-utils.js +2 -0
  63. package/dist/lib/utils/preview-utils.js.map +1 -1
  64. package/dist/lib/utils/response-unwrapper.d.ts +36 -0
  65. package/dist/lib/utils/response-unwrapper.d.ts.map +1 -0
  66. package/dist/lib/utils/response-unwrapper.js +331 -0
  67. package/dist/lib/utils/response-unwrapper.js.map +1 -0
  68. package/dist/lib/version.d.ts +13 -5
  69. package/dist/lib/version.d.ts.map +1 -1
  70. package/dist/lib/version.js +19 -5
  71. package/dist/lib/version.js.map +1 -1
  72. package/package.json +6 -7
@@ -6,10 +6,6 @@ export type MediaBuyStatus = 'pending_activation' | 'active' | 'paused' | 'compl
6
6
  * Budget pacing strategy
7
7
  */
8
8
  export type Pacing = 'even' | 'asap' | 'front_loaded';
9
- /**
10
- * Status of a package
11
- */
12
- export type PackageStatus = 'draft' | 'active' | 'paused' | 'completed';
13
9
  /**
14
10
  * Represents a purchased advertising campaign
15
11
  */
@@ -47,6 +43,7 @@ export interface MediaBuy {
47
43
  * Last update timestamp
48
44
  */
49
45
  updated_at?: string;
46
+ ext?: ExtensionObject;
50
47
  }
51
48
  /**
52
49
  * A specific product within a media buy (line item)
@@ -90,7 +87,11 @@ export interface Package {
90
87
  * Format IDs that creative assets will be provided for this package
91
88
  */
92
89
  format_ids_to_provide?: FormatID[];
93
- status: PackageStatus;
90
+ /**
91
+ * Whether this package is paused by the buyer. Paused packages do not deliver impressions. Defaults to false.
92
+ */
93
+ paused?: boolean;
94
+ ext?: ExtensionObject;
94
95
  }
95
96
  /**
96
97
  * Optional geographic refinements for media buys. Most targeting should be expressed in the brief and handled by the publisher. These fields are primarily for geographic restrictions (RCT testing, regulatory compliance).
@@ -151,7 +152,7 @@ export interface CreativeAssignment {
151
152
  placement_ids?: [string, ...string[]];
152
153
  }
153
154
  /**
154
- * Structured format identifier with agent URL and format name
155
+ * Structured format identifier with agent URL and format name. Can reference: (1) a concrete format with fixed dimensions (id only), (2) a template format without parameters (id only), or (3) a template format with parameters (id + dimensions/duration). Template formats accept parameters in format_id while concrete formats have fixed dimensions in their definition. Parameterized format IDs create unique, specific format variants.
155
156
  */
156
157
  export interface FormatID {
157
158
  /**
@@ -159,10 +160,70 @@ export interface FormatID {
159
160
  */
160
161
  agent_url: string;
161
162
  /**
162
- * Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')
163
+ * Format identifier within the agent's namespace (e.g., 'display_static', 'video_hosted', 'audio_standard'). When used alone, references a template format. When combined with dimension/duration fields, creates a parameterized format ID for a specific variant.
163
164
  */
164
165
  id: string;
166
+ /**
167
+ * Width in pixels for visual formats. When specified, height must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
168
+ */
169
+ width?: number;
170
+ /**
171
+ * Height in pixels for visual formats. When specified, width must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
172
+ */
173
+ height?: number;
174
+ /**
175
+ * Duration in milliseconds for time-based formats (video, audio). When specified, creates a parameterized format ID. Omit to reference a template format without parameters.
176
+ */
177
+ duration_ms?: number;
165
178
  }
179
+ /**
180
+ * Extension object for platform-specific, vendor-namespaced parameters. Extensions are always optional and must be namespaced under a vendor/platform key (e.g., ext.gam, ext.roku). Used for custom capabilities, partner-specific configuration, and features being proposed for standardization.
181
+ */
182
+ export interface ExtensionObject {
183
+ [k: string]: unknown;
184
+ }
185
+ /**
186
+ * Image asset with URL and dimensions
187
+ */
188
+ export type ImageAsset = Dimensions & {
189
+ /**
190
+ * URL to the image asset
191
+ */
192
+ url: string;
193
+ /**
194
+ * Image file format (jpg, png, gif, webp, etc.)
195
+ */
196
+ format?: string;
197
+ /**
198
+ * Alternative text for accessibility
199
+ */
200
+ alt_text?: string;
201
+ };
202
+ /**
203
+ * Video asset with URL and specifications
204
+ */
205
+ export type VideoAsset = Dimensions & {
206
+ /**
207
+ * URL to the video asset
208
+ */
209
+ url: string;
210
+ /**
211
+ * Video duration in milliseconds
212
+ */
213
+ duration_ms?: number;
214
+ /**
215
+ * Video file format (mp4, webm, mov, etc.)
216
+ */
217
+ format?: string;
218
+ /**
219
+ * Video bitrate in kilobits per second
220
+ */
221
+ bitrate_kbps?: number;
222
+ };
223
+ /**
224
+ * JavaScript module type
225
+ */
226
+ export type JavaScriptModuleType = 'esm' | 'commonjs' | 'script';
166
227
  /**
167
228
  * VAST (Video Ad Serving Template) tag for third-party video ad serving
168
229
  */
@@ -175,10 +236,7 @@ export type VASTAsset = {
175
236
  * URL endpoint that returns VAST XML
176
237
  */
177
238
  url: string;
178
- /**
179
- * VAST specification version
180
- */
181
- vast_version?: '2.0' | '3.0' | '4.0' | '4.1' | '4.2';
239
+ vast_version?: VASTVersion;
182
240
  /**
183
241
  * Whether VPAID (Video Player-Ad Interface Definition) is supported
184
242
  */
@@ -190,7 +248,7 @@ export type VASTAsset = {
190
248
  /**
191
249
  * Tracking events supported by this VAST tag
192
250
  */
193
- tracking_events?: ('start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'click' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute' | 'fullscreen' | 'exitFullscreen' | 'playerExpand' | 'playerCollapse')[];
251
+ tracking_events?: VASTTrackingEvent[];
194
252
  } | {
195
253
  /**
196
254
  * Discriminator indicating VAST is delivered as inline XML content
@@ -200,10 +258,7 @@ export type VASTAsset = {
200
258
  * Inline VAST XML content
201
259
  */
202
260
  content: string;
203
- /**
204
- * VAST specification version
205
- */
206
- vast_version?: '2.0' | '3.0' | '4.0' | '4.1' | '4.2';
261
+ vast_version?: VASTVersion1;
207
262
  /**
208
263
  * Whether VPAID (Video Player-Ad Interface Definition) is supported
209
264
  */
@@ -215,8 +270,20 @@ export type VASTAsset = {
215
270
  /**
216
271
  * Tracking events supported by this VAST tag
217
272
  */
218
- tracking_events?: ('start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'click' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute' | 'fullscreen' | 'exitFullscreen' | 'playerExpand' | 'playerCollapse')[];
273
+ tracking_events?: VASTTrackingEvent[];
219
274
  };
275
+ /**
276
+ * VAST specification version
277
+ */
278
+ export type VASTVersion = '2.0' | '3.0' | '4.0' | '4.1' | '4.2';
279
+ /**
280
+ * Standard VAST tracking events for video ad playback and interaction
281
+ */
282
+ export type VASTTrackingEvent = 'start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'click' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute' | 'fullscreen' | 'exitFullscreen' | 'playerExpand' | 'playerCollapse';
283
+ /**
284
+ * VAST specification version
285
+ */
286
+ export type VASTVersion1 = '2.0' | '3.0' | '4.0' | '4.1' | '4.2';
220
287
  /**
221
288
  * DAAST (Digital Audio Ad Serving Template) tag for third-party audio ad serving
222
289
  */
@@ -229,10 +296,7 @@ export type DAASTAsset = {
229
296
  * URL endpoint that returns DAAST XML
230
297
  */
231
298
  url: string;
232
- /**
233
- * DAAST specification version
234
- */
235
- daast_version?: '1.0' | '1.1';
299
+ daast_version?: DAASTVersion;
236
300
  /**
237
301
  * Expected audio duration in milliseconds (if known)
238
302
  */
@@ -240,7 +304,7 @@ export type DAASTAsset = {
240
304
  /**
241
305
  * Tracking events supported by this DAAST tag
242
306
  */
243
- tracking_events?: ('start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute')[];
307
+ tracking_events?: DAASTTrackingEvent[];
244
308
  /**
245
309
  * Whether companion display ads are included
246
310
  */
@@ -254,10 +318,7 @@ export type DAASTAsset = {
254
318
  * Inline DAAST XML content
255
319
  */
256
320
  content: string;
257
- /**
258
- * DAAST specification version
259
- */
260
- daast_version?: '1.0' | '1.1';
321
+ daast_version?: DAASTVersion1;
261
322
  /**
262
323
  * Expected audio duration in milliseconds (if known)
263
324
  */
@@ -265,23 +326,36 @@ export type DAASTAsset = {
265
326
  /**
266
327
  * Tracking events supported by this DAAST tag
267
328
  */
268
- tracking_events?: ('start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute')[];
329
+ tracking_events?: DAASTTrackingEvent[];
269
330
  /**
270
331
  * Whether companion display ads are included
271
332
  */
272
333
  companion_ads?: boolean;
273
334
  };
335
+ /**
336
+ * DAAST specification version
337
+ */
338
+ export type DAASTVersion = '1.0' | '1.1';
339
+ /**
340
+ * Standard DAAST tracking events for audio ad playback and interaction
341
+ */
342
+ export type DAASTTrackingEvent = 'start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete' | 'impression' | 'pause' | 'resume' | 'skip' | 'mute' | 'unmute';
343
+ /**
344
+ * DAAST specification version
345
+ */
346
+ export type DAASTVersion1 = '1.0' | '1.1';
274
347
  /**
275
348
  * Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.
276
349
  */
277
350
  export type BrandManifestReference = BrandManifest | string;
278
351
  /**
279
- * Inline brand manifest object
352
+ * Type of asset. Note: Brand manifests typically contain basic media assets (image, video, audio, text). Code assets (html, javascript, css) and ad markup (vast, daast) are usually not part of brand asset libraries.
280
353
  */
281
- export type BrandManifest = BrandManifest1 & BrandManifest2;
282
- export type BrandManifest1 = {
283
- [k: string]: unknown;
284
- };
354
+ export type AssetContentType = 'image' | 'video' | 'audio' | 'text' | 'markdown' | 'html' | 'css' | 'javascript' | 'vast' | 'daast' | 'promoted_offerings' | 'url' | 'webhook';
355
+ /**
356
+ * 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 <script> tag (OMID verification, native event trackers using method:2)
357
+ */
358
+ export type URLAssetType = 'clickthrough' | 'tracker_pixel' | 'tracker_script';
285
359
  /**
286
360
  * Creative asset for upload to library - supports static assets, generative formats, and third-party snippets
287
361
  */
@@ -332,73 +406,29 @@ export interface CreativeAsset {
332
406
  * For generative creatives: set to true to approve and finalize, false to request regeneration with updated assets/message. Omit for non-generative creatives.
333
407
  */
334
408
  approved?: boolean;
335
- }
336
- /**
337
- * Format identifier specifying which format this creative conforms to
338
- */
339
- export interface FormatID {
340
409
  /**
341
- * URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)
410
+ * Optional delivery weight for creative rotation when uploading via create_media_buy or update_media_buy (0-100). If omitted, platform determines rotation. Only used during upload to media buy - not stored in creative library.
342
411
  */
343
- agent_url: string;
344
- /**
345
- * Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')
346
- */
347
- id: string;
348
- }
349
- /**
350
- * Image asset with URL and dimensions
351
- */
352
- export interface ImageAsset {
353
- /**
354
- * URL to the image asset
355
- */
356
- url: string;
357
- /**
358
- * Image width in pixels
359
- */
360
- width?: number;
361
- /**
362
- * Image height in pixels
363
- */
364
- height?: number;
365
- /**
366
- * Image file format (jpg, png, gif, webp, etc.)
367
- */
368
- format?: string;
412
+ weight?: number;
369
413
  /**
370
- * Alternative text for accessibility
414
+ * Optional array of placement IDs where this creative should run when uploading via create_media_buy or update_media_buy. References placement_id values from the product's placements array. If omitted, creative runs on all placements. Only used during upload to media buy - not stored in creative library.
415
+ *
416
+ * @minItems 1
371
417
  */
372
- alt_text?: string;
418
+ placement_ids?: [string, ...string[]];
373
419
  }
374
420
  /**
375
- * Video asset with URL and specifications
421
+ * Format identifier specifying which format this creative conforms to. Can be: (1) concrete format_id referencing a format with fixed dimensions, (2) template format_id referencing a template format, or (3) parameterized format_id with dimensions/duration parameters for template formats.
376
422
  */
377
- export interface VideoAsset {
378
- /**
379
- * URL to the video asset
380
- */
381
- url: string;
382
- /**
383
- * Video width in pixels
384
- */
385
- width?: number;
423
+ export interface Dimensions {
386
424
  /**
387
- * Video height in pixels
388
- */
389
- height?: number;
390
- /**
391
- * Video duration in milliseconds
392
- */
393
- duration_ms?: number;
394
- /**
395
- * Video file format (mp4, webm, mov, etc.)
425
+ * Width in pixels
396
426
  */
397
- format?: string;
427
+ width: number;
398
428
  /**
399
- * Video bitrate in kilobits per second
429
+ * Height in pixels
400
430
  */
401
- bitrate_kbps?: number;
431
+ height: number;
402
432
  }
403
433
  /**
404
434
  * Audio asset with URL and specifications
@@ -468,10 +498,7 @@ export interface JavaScriptAsset {
468
498
  * JavaScript content
469
499
  */
470
500
  content: string;
471
- /**
472
- * JavaScript module type
473
- */
474
- module_type?: 'esm' | 'commonjs' | 'script';
501
+ module_type?: JavaScriptModuleType;
475
502
  }
476
503
  /**
477
504
  * Complete offering specification combining brand manifest, product selectors, and asset filters. Provides all context needed for creative generation about what is being promoted.
@@ -516,7 +543,10 @@ export interface PromotedOfferings {
516
543
  exclude_tags?: string[];
517
544
  };
518
545
  }
519
- export interface BrandManifest2 {
546
+ /**
547
+ * Inline brand manifest object
548
+ */
549
+ export interface BrandManifest {
520
550
  /**
521
551
  * Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL.
522
552
  */
@@ -524,7 +554,7 @@ export interface BrandManifest2 {
524
554
  /**
525
555
  * Brand or business name
526
556
  */
527
- name?: string;
557
+ name: string;
528
558
  /**
529
559
  * Brand logo assets with semantic tags for different use cases
530
560
  */
@@ -604,10 +634,7 @@ export interface BrandManifest2 {
604
634
  * Unique identifier for this asset
605
635
  */
606
636
  asset_id: string;
607
- /**
608
- * Type of asset
609
- */
610
- asset_type: 'image' | 'video' | 'audio' | 'text';
637
+ asset_type: AssetContentType;
611
638
  /**
612
639
  * URL to CDN-hosted asset file
613
640
  */
@@ -761,15 +788,63 @@ export interface URLAsset {
761
788
  * URL reference
762
789
  */
763
790
  url: string;
764
- /**
765
- * 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 <script> tag (OMID verification, native event trackers using method:2)
766
- */
767
- url_type?: 'clickthrough' | 'tracker_pixel' | 'tracker_script';
791
+ url_type?: URLAssetType;
768
792
  /**
769
793
  * Description of what this URL points to
770
794
  */
771
795
  description?: string;
772
796
  }
797
+ /**
798
+ * Selects properties from a publisher's adagents.json. Used for both product definitions and agent authorization. Supports three selection patterns: all properties, specific IDs, or by tags.
799
+ */
800
+ export type PublisherPropertySelector = {
801
+ /**
802
+ * Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')
803
+ */
804
+ publisher_domain: string;
805
+ /**
806
+ * Discriminator indicating all properties from this publisher are included
807
+ */
808
+ selection_type: 'all';
809
+ } | {
810
+ /**
811
+ * Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')
812
+ */
813
+ publisher_domain: string;
814
+ /**
815
+ * Discriminator indicating selection by specific property IDs
816
+ */
817
+ selection_type: 'by_id';
818
+ /**
819
+ * Specific property IDs from the publisher's adagents.json
820
+ *
821
+ * @minItems 1
822
+ */
823
+ property_ids: [PropertyID, ...PropertyID[]];
824
+ } | {
825
+ /**
826
+ * Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')
827
+ */
828
+ publisher_domain: string;
829
+ /**
830
+ * Discriminator indicating selection by property tags
831
+ */
832
+ selection_type: 'by_tag';
833
+ /**
834
+ * Property tags from the publisher's adagents.json. Selector covers all properties with these tags
835
+ *
836
+ * @minItems 1
837
+ */
838
+ property_tags: [PropertyTag, ...PropertyTag[]];
839
+ };
840
+ /**
841
+ * Identifier for a publisher property. Must be lowercase alphanumeric with underscores only.
842
+ */
843
+ export type PropertyID = string;
844
+ /**
845
+ * Tag for categorizing publisher properties. Must be lowercase alphanumeric with underscores only.
846
+ */
847
+ export type PropertyTag = string;
773
848
  /**
774
849
  * Type of inventory delivery
775
850
  */
@@ -778,6 +853,22 @@ export type DeliveryType = 'guaranteed' | 'non_guaranteed';
778
853
  * A pricing model option offered by a publisher for a product. Each pricing model has its own schema with model-specific requirements.
779
854
  */
780
855
  export type PricingOption = CPMFixedRatePricingOption | CPMAuctionPricingOption | VCPMFixedRatePricingOption | VCPMAuctionPricingOption | CPCPricingOption | CPCVPricingOption | CPVPricingOption | CPPPricingOption | FlatRatePricingOption;
856
+ /**
857
+ * Available frequencies for delivery reports and metrics updates
858
+ */
859
+ export type ReportingFrequency = 'hourly' | 'daily' | 'monthly';
860
+ /**
861
+ * Standard delivery and performance metrics available for reporting
862
+ */
863
+ export type AvailableMetric = 'impressions' | 'spend' | 'clicks' | 'ctr' | 'video_completions' | 'completion_rate' | 'conversions' | 'viewability' | 'engagement_rate';
864
+ /**
865
+ * Co-branding requirement
866
+ */
867
+ export type CoBrandingRequirement = 'required' | 'optional' | 'none';
868
+ /**
869
+ * Landing page requirements
870
+ */
871
+ export type LandingPageRequirement = 'any' | 'retailer_site_only' | 'must_include_retailer';
781
872
  /**
782
873
  * Represents available advertising inventory
783
874
  */
@@ -795,48 +886,11 @@ export interface Product {
795
886
  */
796
887
  description: string;
797
888
  /**
798
- * Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization.
889
+ * Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization. Selection patterns mirror the authorization patterns in adagents.json for consistency.
799
890
  *
800
891
  * @minItems 1
801
892
  */
802
- publisher_properties: [
803
- {
804
- /**
805
- * Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')
806
- */
807
- publisher_domain: string;
808
- /**
809
- * Specific property IDs from the publisher's adagents.json. Mutually exclusive with property_tags.
810
- *
811
- * @minItems 1
812
- */
813
- property_ids?: [string, ...string[]];
814
- /**
815
- * Property tags from the publisher's adagents.json. Product covers all properties with these tags. Mutually exclusive with property_ids.
816
- *
817
- * @minItems 1
818
- */
819
- property_tags?: [string, ...string[]];
820
- },
821
- ...{
822
- /**
823
- * Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')
824
- */
825
- publisher_domain: string;
826
- /**
827
- * Specific property IDs from the publisher's adagents.json. Mutually exclusive with property_tags.
828
- *
829
- * @minItems 1
830
- */
831
- property_ids?: [string, ...string[]];
832
- /**
833
- * Property tags from the publisher's adagents.json. Product covers all properties with these tags. Mutually exclusive with property_ids.
834
- *
835
- * @minItems 1
836
- */
837
- property_tags?: [string, ...string[]];
838
- }[]
839
- ];
893
+ publisher_properties: [PublisherPropertySelector, ...PublisherPropertySelector[]];
840
894
  /**
841
895
  * Array of supported creative format IDs - structured format_id objects with agent_url and id
842
896
  */
@@ -906,22 +960,10 @@ export interface Product {
906
960
  */
907
961
  manifest: {};
908
962
  };
963
+ ext?: ExtensionObject;
909
964
  }
910
965
  /**
911
- * Structured format identifier with agent URL and format name
912
- */
913
- export interface FormatID {
914
- /**
915
- * URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)
916
- */
917
- agent_url: string;
918
- /**
919
- * Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')
920
- */
921
- id: string;
922
- }
923
- /**
924
- * Represents a specific ad placement within a product's inventory
966
+ * Structured format identifier with agent URL and format name. Can reference: (1) a concrete format with fixed dimensions (id only), (2) a template format without parameters (id only), or (3) a template format with parameters (id + dimensions/duration). Template formats accept parameters in format_id while concrete formats have fixed dimensions in their definition. Parameterized format IDs create unique, specific format variants.
925
967
  */
926
968
  export interface Placement {
927
969
  /**
@@ -937,7 +979,7 @@ export interface Placement {
937
979
  */
938
980
  description?: string;
939
981
  /**
940
- * Format IDs supported by this specific placement (subset of product's formats)
982
+ * Format IDs supported by this specific placement. Can include: (1) concrete format_ids (fixed dimensions), (2) template format_ids without parameters (accepts any dimensions/duration), or (3) parameterized format_ids (specific dimension/duration constraints).
941
983
  *
942
984
  * @minItems 1
943
985
  */
@@ -963,6 +1005,10 @@ export interface CPMFixedRatePricingOption {
963
1005
  * ISO 4217 currency code
964
1006
  */
965
1007
  currency: string;
1008
+ /**
1009
+ * Whether this is a fixed rate (true) or auction-based (false)
1010
+ */
1011
+ is_fixed: true;
966
1012
  /**
967
1013
  * Minimum spend requirement per package using this pricing option, in the specified currency
968
1014
  */
@@ -984,6 +1030,10 @@ export interface CPMAuctionPricingOption {
984
1030
  * ISO 4217 currency code
985
1031
  */
986
1032
  currency: string;
1033
+ /**
1034
+ * Whether this is a fixed rate (true) or auction-based (false)
1035
+ */
1036
+ is_fixed: false;
987
1037
  /**
988
1038
  * Pricing guidance for auction-based CPM bidding
989
1039
  */
@@ -1034,6 +1084,10 @@ export interface VCPMFixedRatePricingOption {
1034
1084
  * ISO 4217 currency code
1035
1085
  */
1036
1086
  currency: string;
1087
+ /**
1088
+ * Whether this is a fixed rate (true) or auction-based (false)
1089
+ */
1090
+ is_fixed: true;
1037
1091
  /**
1038
1092
  * Minimum spend requirement per package using this pricing option, in the specified currency
1039
1093
  */
@@ -1055,6 +1109,10 @@ export interface VCPMAuctionPricingOption {
1055
1109
  * ISO 4217 currency code
1056
1110
  */
1057
1111
  currency: string;
1112
+ /**
1113
+ * Whether this is a fixed rate (true) or auction-based (false)
1114
+ */
1115
+ is_fixed: false;
1058
1116
  /**
1059
1117
  * Statistical guidance for auction pricing
1060
1118
  */
@@ -1105,6 +1163,10 @@ export interface CPCPricingOption {
1105
1163
  * ISO 4217 currency code
1106
1164
  */
1107
1165
  currency: string;
1166
+ /**
1167
+ * Whether this is a fixed rate (true) or auction-based (false)
1168
+ */
1169
+ is_fixed: true;
1108
1170
  /**
1109
1171
  * Minimum spend requirement per package using this pricing option, in the specified currency
1110
1172
  */
@@ -1130,6 +1192,10 @@ export interface CPCVPricingOption {
1130
1192
  * ISO 4217 currency code
1131
1193
  */
1132
1194
  currency: string;
1195
+ /**
1196
+ * Whether this is a fixed rate (true) or auction-based (false)
1197
+ */
1198
+ is_fixed: true;
1133
1199
  /**
1134
1200
  * Minimum spend requirement per package using this pricing option, in the specified currency
1135
1201
  */
@@ -1155,6 +1221,10 @@ export interface CPVPricingOption {
1155
1221
  * ISO 4217 currency code
1156
1222
  */
1157
1223
  currency: string;
1224
+ /**
1225
+ * Whether this is a fixed rate (true) or auction-based (false)
1226
+ */
1227
+ is_fixed: true;
1158
1228
  /**
1159
1229
  * CPV-specific parameters defining the view threshold
1160
1230
  */
@@ -1191,6 +1261,10 @@ export interface CPPPricingOption {
1191
1261
  * ISO 4217 currency code
1192
1262
  */
1193
1263
  currency: string;
1264
+ /**
1265
+ * Whether this is a fixed rate (true) or auction-based (false)
1266
+ */
1267
+ is_fixed: true;
1194
1268
  /**
1195
1269
  * CPP-specific parameters for demographic targeting and GRP requirements
1196
1270
  */
@@ -1301,7 +1375,7 @@ export interface ReportingCapabilities {
1301
1375
  *
1302
1376
  * @minItems 1
1303
1377
  */
1304
- available_reporting_frequencies: ['hourly' | 'daily' | 'monthly', ...('hourly' | 'daily' | 'monthly')[]];
1378
+ available_reporting_frequencies: [ReportingFrequency, ...ReportingFrequency[]];
1305
1379
  /**
1306
1380
  * Expected delay in minutes before reporting data becomes available (e.g., 240 for 4-hour delay)
1307
1381
  */
@@ -1317,27 +1391,21 @@ export interface ReportingCapabilities {
1317
1391
  /**
1318
1392
  * Metrics available in reporting. Impressions and spend are always implicitly included.
1319
1393
  */
1320
- available_metrics: ('impressions' | 'spend' | 'clicks' | 'ctr' | 'video_completions' | 'completion_rate' | 'conversions' | 'viewability' | 'engagement_rate')[];
1394
+ available_metrics: AvailableMetric[];
1321
1395
  }
1322
1396
  /**
1323
1397
  * Creative requirements and restrictions for a product
1324
1398
  */
1325
1399
  export interface CreativePolicy {
1326
- /**
1327
- * Co-branding requirement
1328
- */
1329
- co_branding: 'required' | 'optional' | 'none';
1330
- /**
1331
- * Landing page requirements
1332
- */
1333
- landing_page: 'any' | 'retailer_site_only' | 'must_include_retailer';
1400
+ co_branding: CoBrandingRequirement;
1401
+ landing_page: LandingPageRequirement;
1334
1402
  /**
1335
1403
  * Whether creative templates are provided
1336
1404
  */
1337
1405
  templates_available: boolean;
1338
1406
  }
1339
1407
  /**
1340
- * Structured format identifier with agent URL and format name
1408
+ * Structured format identifier with agent URL and format name. Can reference: (1) a concrete format with fixed dimensions (id only), (2) a template format without parameters (id only), or (3) a template format with parameters (id + dimensions/duration). Template formats accept parameters in format_id while concrete formats have fixed dimensions in their definition. Parameterized format IDs create unique, specific format variants.
1341
1409
  */
1342
1410
  export interface FormatID1 {
1343
1411
  /**
@@ -1345,78 +1413,67 @@ export interface FormatID1 {
1345
1413
  */
1346
1414
  agent_url: string;
1347
1415
  /**
1348
- * Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')
1416
+ * Format identifier within the agent's namespace (e.g., 'display_static', 'video_hosted', 'audio_standard'). When used alone, references a template format. When combined with dimension/duration fields, creates a parameterized format ID for a specific variant.
1349
1417
  */
1350
1418
  id: string;
1351
- }
1352
- /**
1353
- * Structured format identifier with agent URL and format name
1354
- */
1355
- export interface FormatID2 {
1356
1419
  /**
1357
- * URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)
1420
+ * Width in pixels for visual formats. When specified, height must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
1358
1421
  */
1359
- agent_url: string;
1422
+ width?: number;
1360
1423
  /**
1361
- * Format identifier within the agent's namespace (e.g., 'display_300x250', 'video_standard_30s')
1424
+ * Height in pixels for visual formats. When specified, width must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
1362
1425
  */
1363
- id: string;
1426
+ height?: number;
1427
+ /**
1428
+ * Duration in milliseconds for time-based formats (video, audio). When specified, creates a parameterized format ID. Omit to reference a template format without parameters.
1429
+ */
1430
+ duration_ms?: number;
1364
1431
  }
1365
1432
  /**
1366
- * Optional geographic refinements for media buys. Most targeting should be expressed in the brief and handled by the publisher. These fields are primarily for geographic restrictions (RCT testing, regulatory compliance).
1433
+ * Structured format identifier with agent URL and format name. Can reference: (1) a concrete format with fixed dimensions (id only), (2) a template format without parameters (id only), or (3) a template format with parameters (id + dimensions/duration). Template formats accept parameters in format_id while concrete formats have fixed dimensions in their definition. Parameterized format IDs create unique, specific format variants.
1367
1434
  */
1368
- export interface TargetingOverlay {
1369
- /**
1370
- * Restrict delivery to specific countries (ISO codes). Use for regulatory compliance or RCT testing.
1371
- */
1372
- geo_country_any_of?: string[];
1435
+ export interface FormatID2 {
1373
1436
  /**
1374
- * Restrict delivery to specific regions/states. Use for regulatory compliance or RCT testing.
1437
+ * URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)
1375
1438
  */
1376
- geo_region_any_of?: string[];
1439
+ agent_url: string;
1377
1440
  /**
1378
- * Restrict delivery to specific metro areas (DMA codes). Use for regulatory compliance or RCT testing.
1441
+ * Format identifier within the agent's namespace (e.g., 'display_static', 'video_hosted', 'audio_standard'). When used alone, references a template format. When combined with dimension/duration fields, creates a parameterized format ID for a specific variant.
1379
1442
  */
1380
- geo_metro_any_of?: string[];
1443
+ id: string;
1381
1444
  /**
1382
- * Restrict delivery to specific postal/ZIP codes. Use for regulatory compliance or RCT testing.
1445
+ * Width in pixels for visual formats. When specified, height must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
1383
1446
  */
1384
- geo_postal_code_any_of?: string[];
1447
+ width?: number;
1385
1448
  /**
1386
- * AXE segment ID to include for targeting
1449
+ * Height in pixels for visual formats. When specified, width must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.
1387
1450
  */
1388
- axe_include_segment?: string;
1451
+ height?: number;
1389
1452
  /**
1390
- * AXE segment ID to exclude from targeting
1453
+ * Duration in milliseconds for time-based formats (video, audio). When specified, creates a parameterized format ID. Omit to reference a template format without parameters.
1391
1454
  */
1392
- axe_exclude_segment?: string;
1393
- frequency_cap?: FrequencyCap;
1455
+ duration_ms?: number;
1394
1456
  }
1395
1457
  /**
1396
- * Frequency capping settings for package-level application
1458
+ * Extension object for platform-specific, vendor-namespaced parameters. Extensions are always optional and must be namespaced under a vendor/platform key (e.g., ext.gam, ext.roku). Used for custom capabilities, partner-specific configuration, and features being proposed for standardization.
1459
+ */
1460
+ /**
1461
+ * Optional geographic refinements for media buys. Most targeting should be expressed in the brief and handled by the publisher. These fields are primarily for geographic restrictions (RCT testing, regulatory compliance).
1397
1462
  */
1398
- export interface FrequencyCap {
1399
- /**
1400
- * Minutes to suppress after impression
1401
- */
1402
- suppress_minutes: number;
1403
- }
1463
+ /**
1464
+ * Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects.
1465
+ */
1466
+ export type PropertyType = 'website' | 'mobile_app' | 'ctv_app' | 'dooh' | 'podcast' | 'radio' | 'streaming_audio';
1404
1467
  /**
1405
1468
  * Type of identifier for this property
1406
1469
  */
1407
1470
  export type PropertyIdentifierTypes = 'domain' | 'subdomain' | 'network_id' | 'ios_bundle' | 'android_package' | 'apple_app_store_id' | 'google_play_id' | 'roku_store_id' | 'fire_tv_asin' | 'samsung_app_id' | 'apple_tv_bundle' | 'bundle_id' | 'venue_id' | 'screen_id' | 'openooh_venue_type' | 'rss_url' | 'apple_podcast_id' | 'spotify_show_id' | 'podcast_guid';
1408
1471
  /**
1409
- * An advertising property that can be validated via adagents.json
1472
+ * Tag for categorizing publisher properties. Must be lowercase alphanumeric with underscores only.
1410
1473
  */
1411
1474
  export interface Property {
1412
- /**
1413
- * Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects. Recommended format: lowercase with underscores (e.g., 'cnn_ctv_app', 'instagram_mobile')
1414
- */
1415
- property_id?: string;
1416
- /**
1417
- * Type of advertising property
1418
- */
1419
- property_type: 'website' | 'mobile_app' | 'ctv_app' | 'dooh' | 'podcast' | 'radio' | 'streaming_audio';
1475
+ property_id?: PropertyID;
1476
+ property_type: PropertyType;
1420
1477
  /**
1421
1478
  * Human-readable property name
1422
1479
  */
@@ -1445,7 +1502,7 @@ export interface Property {
1445
1502
  /**
1446
1503
  * Tags for categorization and grouping (e.g., network membership, content categories)
1447
1504
  */
1448
- tags?: string[];
1505
+ tags?: PropertyTag[];
1449
1506
  /**
1450
1507
  * Domain where adagents.json should be checked for authorization validation. Required for list_authorized_properties response. Optional in adagents.json (file location implies domain).
1451
1508
  */