@adcp/sdk 14.0.0-rc.37 → 14.0.0-rc.39

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 (622) hide show
  1. package/bin/adcp-storyboard-summary.js +286 -0
  2. package/bin/adcp.js +221 -10
  3. package/dist/lib/conformance/schemaLoader.d.mts +1 -1
  4. package/dist/lib/conformance/schemaLoader.d.ts +1 -1
  5. package/dist/lib/core/AgentClient.d.mts +6 -1
  6. package/dist/lib/core/AgentClient.d.ts +6 -1
  7. package/dist/lib/core/AgentClient.js +9 -0
  8. package/dist/lib/core/AgentClient.mjs +9 -0
  9. package/dist/lib/core/ConversationTypes.d.mts +29 -0
  10. package/dist/lib/core/ConversationTypes.d.ts +29 -0
  11. package/dist/lib/core/SingleAgentClient.d.mts +3 -1
  12. package/dist/lib/core/SingleAgentClient.d.ts +3 -1
  13. package/dist/lib/core/SingleAgentClient.js +9 -1
  14. package/dist/lib/core/SingleAgentClient.mjs +9 -1
  15. package/dist/lib/core/TaskExecutor.d.mts +13 -1
  16. package/dist/lib/core/TaskExecutor.d.ts +13 -1
  17. package/dist/lib/core/TaskExecutor.js +216 -18
  18. package/dist/lib/core/TaskExecutor.mjs +216 -19
  19. package/dist/lib/index.d.mts +5 -2
  20. package/dist/lib/index.d.ts +5 -2
  21. package/dist/lib/index.js +10 -1
  22. package/dist/lib/index.mjs +10 -1
  23. package/dist/lib/media-buy/action-assessment.d.mts +77 -0
  24. package/dist/lib/media-buy/action-assessment.d.ts +77 -0
  25. package/dist/lib/media-buy/action-assessment.js +300 -0
  26. package/dist/lib/media-buy/action-assessment.mjs +284 -0
  27. package/dist/lib/media-buy/action-constraints.d.mts +9 -0
  28. package/dist/lib/media-buy/action-constraints.d.ts +9 -0
  29. package/dist/lib/media-buy/action-constraints.js +170 -0
  30. package/dist/lib/media-buy/action-constraints.mjs +146 -0
  31. package/dist/lib/media-buy/action-contracts.d.mts +40 -0
  32. package/dist/lib/media-buy/action-contracts.d.ts +40 -0
  33. package/dist/lib/media-buy/action-contracts.js +304 -0
  34. package/dist/lib/media-buy/action-contracts.mjs +267 -0
  35. package/dist/lib/media-buy/action-metadata.generated.d.mts +37 -0
  36. package/dist/lib/media-buy/action-metadata.generated.d.ts +37 -0
  37. package/dist/lib/media-buy/action-metadata.generated.js +128 -0
  38. package/dist/lib/media-buy/action-metadata.generated.mjs +101 -0
  39. package/dist/lib/media-buy/action-types.d.mts +106 -0
  40. package/dist/lib/media-buy/action-types.d.ts +106 -0
  41. package/dist/lib/{types/v3-1-beta/tools.generated.js → media-buy/action-types.js} +2 -2
  42. package/dist/lib/media-buy/actions.d.mts +6 -0
  43. package/dist/lib/media-buy/actions.d.ts +6 -0
  44. package/dist/lib/media-buy/actions.js +38 -0
  45. package/dist/lib/media-buy/actions.mjs +9 -0
  46. package/dist/lib/media-buy/available-actions.d.mts +2 -1
  47. package/dist/lib/media-buy/available-actions.d.ts +2 -1
  48. package/dist/lib/media-buy/available-actions.js +4 -3
  49. package/dist/lib/media-buy/available-actions.mjs +4 -3
  50. package/dist/lib/media-buy/compatibility.js +3 -0
  51. package/dist/lib/media-buy/compatibility.mjs +3 -0
  52. package/dist/lib/media-buy/index.d.mts +4 -0
  53. package/dist/lib/media-buy/index.d.ts +4 -0
  54. package/dist/lib/media-buy/index.js +3 -1
  55. package/dist/lib/media-buy/index.mjs +1 -0
  56. package/dist/lib/media-buy/legacy-action-ids.d.mts +1 -0
  57. package/dist/lib/media-buy/legacy-action-ids.d.ts +1 -0
  58. package/dist/lib/media-buy/legacy-action-ids.js +50 -0
  59. package/dist/lib/media-buy/legacy-action-ids.mjs +26 -0
  60. package/dist/lib/media-buy/mutations.d.mts +70 -0
  61. package/dist/lib/media-buy/mutations.d.ts +70 -0
  62. package/dist/lib/media-buy/mutations.js +525 -0
  63. package/dist/lib/media-buy/mutations.mjs +498 -0
  64. package/dist/lib/media-buy/preflight.d.mts +20 -69
  65. package/dist/lib/media-buy/preflight.d.ts +20 -69
  66. package/dist/lib/media-buy/preflight.js +100 -336
  67. package/dist/lib/media-buy/preflight.mjs +111 -333
  68. package/dist/lib/media-buy/targeting-input.d.mts +7 -4
  69. package/dist/lib/media-buy/targeting-input.d.ts +7 -4
  70. package/dist/lib/media-buy/types.d.mts +55 -7
  71. package/dist/lib/media-buy/types.d.ts +55 -7
  72. package/dist/lib/protocols/rawResponseCapture.d.mts +12 -0
  73. package/dist/lib/protocols/rawResponseCapture.d.ts +12 -0
  74. package/dist/lib/protocols/rawResponseCapture.js +33 -3
  75. package/dist/lib/protocols/rawResponseCapture.mjs +32 -3
  76. package/dist/lib/registry/types.generated.d.mts +377 -9
  77. package/dist/lib/registry/types.generated.d.ts +377 -9
  78. package/dist/lib/reporting/content-mismatch.d.mts +126 -0
  79. package/dist/lib/reporting/content-mismatch.d.ts +126 -0
  80. package/dist/lib/reporting/content-mismatch.js +90 -0
  81. package/dist/lib/reporting/content-mismatch.mjs +66 -0
  82. package/dist/lib/reporting/evidence.d.mts +1 -0
  83. package/dist/lib/reporting/evidence.d.ts +1 -0
  84. package/dist/lib/reporting/evidence.js +32 -3
  85. package/dist/lib/reporting/evidence.mjs +31 -3
  86. package/dist/lib/reporting/index.d.mts +3 -1
  87. package/dist/lib/reporting/index.d.ts +3 -1
  88. package/dist/lib/reporting/index.js +3 -0
  89. package/dist/lib/reporting/index.mjs +2 -0
  90. package/dist/lib/reporting/ledger/handler.d.mts +51 -1
  91. package/dist/lib/reporting/ledger/handler.d.ts +51 -1
  92. package/dist/lib/reporting/ledger/handler.js +306 -38
  93. package/dist/lib/reporting/ledger/handler.mjs +304 -37
  94. package/dist/lib/reporting/ledger/health.d.mts +12 -0
  95. package/dist/lib/reporting/ledger/health.d.ts +12 -0
  96. package/dist/lib/reporting/ledger/health.js +15 -2
  97. package/dist/lib/reporting/ledger/health.mjs +13 -1
  98. package/dist/lib/reporting/ledger/index.d.mts +3 -0
  99. package/dist/lib/reporting/ledger/index.d.ts +3 -0
  100. package/dist/lib/reporting/ledger/index.js +7 -1
  101. package/dist/lib/reporting/ledger/index.mjs +3 -0
  102. package/dist/lib/reporting/ledger/lifecycle.d.mts +31 -4
  103. package/dist/lib/reporting/ledger/lifecycle.d.ts +31 -4
  104. package/dist/lib/reporting/ledger/lifecycle.js +244 -37
  105. package/dist/lib/reporting/ledger/lifecycle.mjs +244 -37
  106. package/dist/lib/reporting/ledger/managed-postgres.d.mts +231 -0
  107. package/dist/lib/reporting/ledger/managed-postgres.d.ts +231 -0
  108. package/dist/lib/reporting/ledger/managed-postgres.js +1797 -0
  109. package/dist/lib/reporting/ledger/managed-postgres.mjs +1776 -0
  110. package/dist/lib/reporting/ledger/managed.d.mts +355 -0
  111. package/dist/lib/reporting/ledger/managed.d.ts +355 -0
  112. package/dist/lib/reporting/ledger/managed.js +661 -0
  113. package/dist/lib/reporting/ledger/managed.mjs +633 -0
  114. package/dist/lib/reporting/ledger/notification-activity.d.mts +222 -0
  115. package/dist/lib/reporting/ledger/notification-activity.d.ts +222 -0
  116. package/dist/lib/reporting/ledger/notification-activity.js +1139 -0
  117. package/dist/lib/reporting/ledger/notification-activity.mjs +1110 -0
  118. package/dist/lib/reporting/ledger/postgres.d.mts +161 -1
  119. package/dist/lib/reporting/ledger/postgres.d.ts +161 -1
  120. package/dist/lib/reporting/ledger/postgres.js +1153 -21
  121. package/dist/lib/reporting/ledger/postgres.mjs +1152 -21
  122. package/dist/lib/reporting/ledger/producer.d.mts +8 -0
  123. package/dist/lib/reporting/ledger/producer.d.ts +8 -0
  124. package/dist/lib/reporting/ledger/producer.js +146 -52
  125. package/dist/lib/reporting/ledger/producer.mjs +146 -51
  126. package/dist/lib/reporting/ledger/types.d.mts +358 -1
  127. package/dist/lib/reporting/ledger/types.d.ts +358 -1
  128. package/dist/lib/reporting/ledger/types.js +3 -0
  129. package/dist/lib/reporting/ledger/types.mjs +2 -0
  130. package/dist/lib/reporting/reconciliation.d.mts +362 -2
  131. package/dist/lib/reporting/reconciliation.d.ts +362 -2
  132. package/dist/lib/reporting/reconciliation.js +1051 -7
  133. package/dist/lib/reporting/reconciliation.mjs +1053 -7
  134. package/dist/lib/reporting/service/conformance.d.mts +35 -0
  135. package/dist/lib/reporting/service/conformance.d.ts +35 -0
  136. package/dist/lib/reporting/service/conformance.js +89 -0
  137. package/dist/lib/reporting/service/conformance.mjs +68 -0
  138. package/dist/lib/reporting/service/index.d.mts +182 -0
  139. package/dist/lib/reporting/service/index.d.ts +182 -0
  140. package/dist/lib/reporting/service/index.js +793 -0
  141. package/dist/lib/reporting/service/index.mjs +787 -0
  142. package/dist/lib/reporting/source/index.d.mts +2 -1
  143. package/dist/lib/reporting/source/index.d.ts +2 -1
  144. package/dist/lib/reporting/source/index.js +16 -3
  145. package/dist/lib/reporting/source/index.mjs +12 -1
  146. package/dist/lib/reporting/source/inline.d.mts +88 -1
  147. package/dist/lib/reporting/source/inline.d.ts +88 -1
  148. package/dist/lib/reporting/source/inline.js +1161 -163
  149. package/dist/lib/reporting/source/inline.mjs +1166 -163
  150. package/dist/lib/reporting/source/manifest.js +12 -7
  151. package/dist/lib/reporting/source/manifest.mjs +12 -7
  152. package/dist/lib/reporting/source/source.d.mts +26 -0
  153. package/dist/lib/reporting/source/source.d.ts +26 -0
  154. package/dist/lib/reporting/source/source.js +71 -2
  155. package/dist/lib/reporting/source/source.mjs +65 -1
  156. package/dist/lib/schemas/index.d.mts +22 -1
  157. package/dist/lib/schemas/index.d.ts +22 -1
  158. package/dist/lib/schemas/index.js +7 -0
  159. package/dist/lib/schemas/index.mjs +7 -0
  160. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  161. package/dist/lib/server/create-adcp-server.d.mts +18 -0
  162. package/dist/lib/server/create-adcp-server.d.ts +18 -0
  163. package/dist/lib/server/create-adcp-server.js +52 -2
  164. package/dist/lib/server/create-adcp-server.mjs +52 -2
  165. package/dist/lib/server/decisioning/account.d.mts +1 -1
  166. package/dist/lib/server/decisioning/account.d.ts +1 -1
  167. package/dist/lib/server/decisioning/index.d.mts +1 -0
  168. package/dist/lib/server/decisioning/index.d.ts +1 -0
  169. package/dist/lib/server/decisioning/platform.d.mts +3 -0
  170. package/dist/lib/server/decisioning/platform.d.ts +3 -0
  171. package/dist/lib/server/decisioning/runtime/from-platform.js +88 -10
  172. package/dist/lib/server/decisioning/runtime/from-platform.mjs +88 -10
  173. package/dist/lib/server/decisioning/specialisms/reporting.d.mts +38 -0
  174. package/dist/lib/server/decisioning/specialisms/reporting.d.ts +38 -0
  175. package/dist/lib/{types/v3-1-beta/index.js → server/decisioning/specialisms/reporting.js} +2 -8
  176. package/dist/lib/server/decisioning/specialisms/reporting.mjs +0 -0
  177. package/dist/lib/server/index.d.mts +4 -2
  178. package/dist/lib/server/index.d.ts +4 -2
  179. package/dist/lib/server/index.js +5 -0
  180. package/dist/lib/server/index.mjs +4 -0
  181. package/dist/lib/server/media-buy-action-resolver.d.mts +63 -0
  182. package/dist/lib/server/media-buy-action-resolver.d.ts +63 -0
  183. package/dist/lib/server/media-buy-action-resolver.js +297 -0
  184. package/dist/lib/server/media-buy-action-resolver.mjs +285 -0
  185. package/dist/lib/server/media-buy-actions.d.mts +7 -8
  186. package/dist/lib/server/media-buy-actions.d.ts +7 -8
  187. package/dist/lib/server/media-buy-actions.js +57 -14
  188. package/dist/lib/server/media-buy-actions.mjs +63 -14
  189. package/dist/lib/server/notification-subscriptions/index.d.mts +2 -2
  190. package/dist/lib/server/notification-subscriptions/index.d.ts +2 -2
  191. package/dist/lib/server/notification-subscriptions/index.js +2 -0
  192. package/dist/lib/server/notification-subscriptions/index.mjs +2 -0
  193. package/dist/lib/server/notification-subscriptions/postgres-runtime.d.mts +3 -1
  194. package/dist/lib/server/notification-subscriptions/postgres-runtime.d.ts +3 -1
  195. package/dist/lib/server/notification-subscriptions/postgres-runtime.js +1 -0
  196. package/dist/lib/server/notification-subscriptions/postgres-runtime.mjs +1 -0
  197. package/dist/lib/server/notification-subscriptions/runtime.d.mts +12 -1
  198. package/dist/lib/server/notification-subscriptions/runtime.d.ts +12 -1
  199. package/dist/lib/server/notification-subscriptions/runtime.js +102 -16
  200. package/dist/lib/server/notification-subscriptions/runtime.mjs +101 -16
  201. package/dist/lib/server/notification-subscriptions/types.d.mts +104 -1
  202. package/dist/lib/server/notification-subscriptions/types.d.ts +104 -1
  203. package/dist/lib/server/webhook-emitter.d.mts +40 -5
  204. package/dist/lib/server/webhook-emitter.d.ts +40 -5
  205. package/dist/lib/server/webhook-emitter.js +23 -12
  206. package/dist/lib/server/webhook-emitter.mjs +23 -12
  207. package/dist/lib/storage/interfaces.d.mts +14 -2
  208. package/dist/lib/storage/interfaces.d.ts +14 -2
  209. package/dist/lib/testing/compliance/comply.d.mts +9 -3
  210. package/dist/lib/testing/compliance/comply.d.ts +9 -3
  211. package/dist/lib/testing/compliance/comply.js +158 -3
  212. package/dist/lib/testing/compliance/comply.mjs +159 -4
  213. package/dist/lib/testing/compliance/storyboard-tracks.js +7 -5
  214. package/dist/lib/testing/compliance/storyboard-tracks.mjs +7 -5
  215. package/dist/lib/testing/compliance/summary.js +10 -1
  216. package/dist/lib/testing/compliance/summary.mjs +10 -1
  217. package/dist/lib/testing/index.d.mts +1 -1
  218. package/dist/lib/testing/index.d.ts +1 -1
  219. package/dist/lib/testing/index.js +2 -0
  220. package/dist/lib/testing/index.mjs +3 -1
  221. package/dist/lib/testing/storyboard/agent-routing.d.mts +12 -43
  222. package/dist/lib/testing/storyboard/agent-routing.d.ts +12 -43
  223. package/dist/lib/testing/storyboard/agent-routing.js +75 -13
  224. package/dist/lib/testing/storyboard/agent-routing.mjs +70 -12
  225. package/dist/lib/testing/storyboard/index.d.mts +1 -0
  226. package/dist/lib/testing/storyboard/index.d.ts +1 -0
  227. package/dist/lib/testing/storyboard/index.js +3 -0
  228. package/dist/lib/testing/storyboard/index.mjs +2 -0
  229. package/dist/lib/testing/storyboard/junit.d.mts +1 -1
  230. package/dist/lib/testing/storyboard/junit.d.ts +1 -1
  231. package/dist/lib/testing/storyboard/junit.js +21 -2
  232. package/dist/lib/testing/storyboard/junit.mjs +21 -2
  233. package/dist/lib/testing/storyboard/probes.d.mts +130 -0
  234. package/dist/lib/testing/storyboard/probes.d.ts +130 -0
  235. package/dist/lib/testing/storyboard/probes.js +682 -10
  236. package/dist/lib/testing/storyboard/probes.mjs +683 -3
  237. package/dist/lib/testing/storyboard/request-signing/builder.d.mts +16 -5
  238. package/dist/lib/testing/storyboard/request-signing/builder.d.ts +16 -5
  239. package/dist/lib/testing/storyboard/request-signing/grader.d.mts +44 -1
  240. package/dist/lib/testing/storyboard/request-signing/grader.d.ts +44 -1
  241. package/dist/lib/testing/storyboard/request-signing/grader.js +46 -22
  242. package/dist/lib/testing/storyboard/request-signing/grader.mjs +43 -21
  243. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.mts +86 -11
  244. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.ts +86 -11
  245. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.js +119 -25
  246. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs +117 -26
  247. package/dist/lib/testing/storyboard/request-signing/synthesize.js +22 -2
  248. package/dist/lib/testing/storyboard/request-signing/synthesize.mjs +22 -2
  249. package/dist/lib/testing/storyboard/runner.d.mts +103 -0
  250. package/dist/lib/testing/storyboard/runner.d.ts +103 -0
  251. package/dist/lib/testing/storyboard/runner.js +1090 -268
  252. package/dist/lib/testing/storyboard/runner.mjs +1096 -261
  253. package/dist/lib/testing/storyboard/seeding.d.mts +4 -1
  254. package/dist/lib/testing/storyboard/seeding.d.ts +4 -1
  255. package/dist/lib/testing/storyboard/seeding.js +55 -24
  256. package/dist/lib/testing/storyboard/seeding.mjs +55 -24
  257. package/dist/lib/testing/storyboard/test-kit.d.mts +37 -3
  258. package/dist/lib/testing/storyboard/test-kit.d.ts +37 -3
  259. package/dist/lib/testing/storyboard/test-kit.js +8 -2
  260. package/dist/lib/testing/storyboard/test-kit.mjs +7 -2
  261. package/dist/lib/testing/storyboard/types.d.mts +132 -10
  262. package/dist/lib/testing/storyboard/types.d.ts +132 -10
  263. package/dist/lib/testing/storyboard/types.js +17 -0
  264. package/dist/lib/testing/storyboard/types.mjs +16 -0
  265. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  266. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  267. package/dist/lib/testing/storyboard/validations.js +16 -0
  268. package/dist/lib/testing/storyboard/validations.mjs +16 -0
  269. package/dist/lib/testing/test-controller.d.mts +1 -1
  270. package/dist/lib/testing/test-controller.d.ts +1 -1
  271. package/dist/lib/types/buy-products.d.ts +71 -6
  272. package/dist/lib/types/control-media-buy.d.ts +25 -11
  273. package/dist/lib/types/core.generated.d.mts +69 -10
  274. package/dist/lib/types/core.generated.d.ts +69 -10
  275. package/dist/lib/types/create-media-buy.d.ts +71 -6
  276. package/dist/lib/types/forward-compat-error-codes.d.mts +7 -6
  277. package/dist/lib/types/forward-compat-error-codes.d.ts +7 -6
  278. package/dist/lib/types/index.d.mts +2 -2
  279. package/dist/lib/types/index.d.ts +2 -2
  280. package/dist/lib/types/schemas.generated.d.ts +8040 -8116
  281. package/dist/lib/types/schemas.generated.js +1074 -309
  282. package/dist/lib/types/schemas.generated.mjs +1068 -309
  283. package/dist/lib/types/tools.generated.d.mts +65 -6
  284. package/dist/lib/types/tools.generated.d.ts +65 -6
  285. package/dist/lib/types/update-media-buy.d.ts +71 -6
  286. package/dist/lib/utils/redact-secrets.d.mts +1 -1
  287. package/dist/lib/utils/redact-secrets.d.ts +1 -1
  288. package/dist/lib/utils/redact-secrets.js +1 -1
  289. package/dist/lib/utils/redact-secrets.mjs +1 -1
  290. package/dist/lib/v2/projection/cache-versions.d.mts +0 -1
  291. package/dist/lib/v2/projection/cache-versions.d.ts +0 -1
  292. package/dist/lib/v2/projection/cache-versions.js +1 -15
  293. package/dist/lib/v2/projection/cache-versions.mjs +1 -14
  294. package/dist/lib/v2/projection/canonical-properties.js +2 -2
  295. package/dist/lib/v2/projection/canonical-properties.mjs +3 -3
  296. package/dist/lib/v2/projection/registry.d.mts +1 -1
  297. package/dist/lib/v2/projection/registry.d.ts +1 -1
  298. package/dist/lib/v2/projection/registry.js +2 -2
  299. package/dist/lib/v2/projection/registry.mjs +3 -3
  300. package/dist/lib/validation/schema-loader.d.mts +9 -1
  301. package/dist/lib/validation/schema-loader.d.ts +9 -1
  302. package/dist/lib/validation/schema-loader.js +65 -8
  303. package/dist/lib/validation/schema-loader.mjs +64 -8
  304. package/dist/lib/version.d.mts +5 -5
  305. package/dist/lib/version.d.ts +5 -5
  306. package/dist/lib/version.js +3 -8
  307. package/dist/lib/version.mjs +3 -8
  308. package/dist/lib/wholesale-feed-sync/index.d.mts +1 -0
  309. package/dist/lib/wholesale-feed-sync/index.d.ts +1 -0
  310. package/dist/lib/wholesale-feed-sync/protocol-types.d.mts +42 -0
  311. package/dist/lib/wholesale-feed-sync/protocol-types.d.ts +42 -0
  312. package/dist/lib/wholesale-feed-sync/protocol-types.js +16 -0
  313. package/dist/lib/wholesale-feed-sync/protocol-types.mjs +0 -0
  314. package/dist/lib/wholesale-feed-sync/sync.d.mts +6 -6
  315. package/dist/lib/wholesale-feed-sync/sync.d.ts +6 -6
  316. package/dist/lib/wholesale-feed-sync/sync.js +3 -1
  317. package/dist/lib/wholesale-feed-sync/sync.mjs +3 -1
  318. package/dist/lib/wholesale-feed-sync/types.d.mts +15 -14
  319. package/dist/lib/wholesale-feed-sync/types.d.ts +15 -14
  320. package/dist/lib/wholesale-feed-sync/webhook-notification.d.mts +7 -5
  321. package/dist/lib/wholesale-feed-sync/webhook-notification.d.ts +7 -5
  322. package/dist/lib/wholesale-feed-sync/webhook-notification.js +45 -0
  323. package/dist/lib/wholesale-feed-sync/webhook-notification.mjs +44 -0
  324. package/docs/CLI.md +1 -1
  325. package/docs/TYPE-SUMMARY.md +118 -4
  326. package/docs/guides/ASYNC-API-REFERENCE.md +62 -1
  327. package/docs/guides/ASYNC-DEVELOPER-GUIDE.md +25 -0
  328. package/docs/guides/ASYNC-DOCUMENTATION-INDEX.md +3 -0
  329. package/docs/guides/BUYER-QUICKSTART-3.2.md +5 -0
  330. package/docs/guides/DURABLE-BUYER-WRITES.md +337 -0
  331. package/docs/guides/EXISTING-PLATFORM.md +80 -1
  332. package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +57 -0
  333. package/docs/guides/MEDIA-BUY-ACTION-ASSESSMENT.md +300 -0
  334. package/docs/guides/REPORTING-LEDGER.md +654 -3
  335. package/docs/guides/REPORTING-RECONCILIATION.md +50 -0
  336. package/docs/guides/REPORTING-SOURCE-EXECUTOR.md +63 -1
  337. package/docs/guides/SELLER-QUICKSTART-3.2.md +2 -0
  338. package/docs/guides/VALIDATE-YOUR-AGENT.md +35 -0
  339. package/docs/guides/idempotency-crash-recovery.md +4 -0
  340. package/docs/llms.txt +4 -2
  341. package/docs/migration-14.x-rc-worksheet.md +60 -5
  342. package/docs/migration-7.9-to-7.10.md +7 -5
  343. package/examples/README.md +17 -0
  344. package/examples/durable-buyer-writes/caller.ts +745 -0
  345. package/examples/durable-buyer-writes/worker.ts +240 -0
  346. package/examples/reliable-reporting-service/README.md +100 -0
  347. package/examples/seller-3.2-starter.ts +7 -8
  348. package/examples/targeting-input-existing-platform.ts +153 -0
  349. package/package.json +41 -29
  350. package/skills/build-seller-agent/SKILL.md +2 -0
  351. package/skills/build-seller-agent/specialisms/signed-requests.md +11 -1
  352. package/skills/cross-cutting.md +28 -11
  353. package/compliance/cache/3.1.0-beta.7/domains/brand/index.yaml +0 -160
  354. package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -415
  355. package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/single_side_trust_extension.yaml +0 -454
  356. package/compliance/cache/3.1.0-beta.7/domains/creative/index.yaml +0 -339
  357. package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/billing_out_of_band.yaml +0 -153
  358. package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
  359. package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/native_in_feed.yaml +0 -543
  360. package/compliance/cache/3.1.0-beta.7/domains/governance/index.yaml +0 -682
  361. package/compliance/cache/3.1.0-beta.7/domains/media-buy/index.yaml +0 -781
  362. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -380
  363. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/available_actions.yaml +0 -565
  364. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
  365. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/canonical_formats.yaml +0 -711
  366. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
  367. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
  368. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -234
  369. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
  370. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_reception.yaml +0 -247
  371. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/delivery_reporting.yaml +0 -357
  372. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment.yaml +0 -633
  373. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
  374. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -399
  375. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
  376. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_approved.yaml +0 -214
  377. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_conditions.yaml +0 -199
  378. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied.yaml +0 -204
  379. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
  380. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/invalid_transitions.yaml +0 -289
  381. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
  382. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
  383. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_accountability.yaml +0 -244
  384. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
  385. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
  386. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
  387. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -428
  388. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
  389. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -373
  390. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize.yaml +0 -399
  391. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
  392. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
  393. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
  394. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -517
  395. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
  396. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -823
  397. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
  398. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_products.yaml +0 -148
  399. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
  400. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
  401. package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
  402. package/compliance/cache/3.1.0-beta.7/domains/media-buy/state-machine.yaml +0 -442
  403. package/compliance/cache/3.1.0-beta.7/domains/signals/index.yaml +0 -266
  404. package/compliance/cache/3.1.0-beta.7/domains/sponsored-intelligence/index.yaml +0 -256
  405. package/compliance/cache/3.1.0-beta.7/index.json +0 -356
  406. package/compliance/cache/3.1.0-beta.7/protocols/brand/index.yaml +0 -160
  407. package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -415
  408. package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -454
  409. package/compliance/cache/3.1.0-beta.7/protocols/creative/index.yaml +0 -339
  410. package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/billing_out_of_band.yaml +0 -153
  411. package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
  412. package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/native_in_feed.yaml +0 -543
  413. package/compliance/cache/3.1.0-beta.7/protocols/governance/index.yaml +0 -682
  414. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/index.yaml +0 -781
  415. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -380
  416. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/available_actions.yaml +0 -565
  417. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
  418. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/canonical_formats.yaml +0 -711
  419. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
  420. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
  421. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -234
  422. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
  423. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_reception.yaml +0 -247
  424. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -357
  425. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -633
  426. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
  427. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -399
  428. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
  429. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_approved.yaml +0 -214
  430. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_conditions.yaml +0 -199
  431. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied.yaml +0 -204
  432. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
  433. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -289
  434. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
  435. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
  436. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -244
  437. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
  438. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
  439. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
  440. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -428
  441. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
  442. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -373
  443. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -399
  444. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
  445. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
  446. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
  447. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -517
  448. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
  449. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -823
  450. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
  451. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_products.yaml +0 -148
  452. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
  453. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
  454. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
  455. package/compliance/cache/3.1.0-beta.7/protocols/media-buy/state-machine.yaml +0 -442
  456. package/compliance/cache/3.1.0-beta.7/protocols/signals/index.yaml +0 -266
  457. package/compliance/cache/3.1.0-beta.7/protocols/sponsored-intelligence/index.yaml +0 -256
  458. package/compliance/cache/3.1.0-beta.7/specialisms/audience-sync/index.yaml +0 -313
  459. package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/index.yaml +0 -350
  460. package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -226
  461. package/compliance/cache/3.1.0-beta.7/specialisms/collection-lists/index.yaml +0 -359
  462. package/compliance/cache/3.1.0-beta.7/specialisms/content-standards/index.yaml +0 -572
  463. package/compliance/cache/3.1.0-beta.7/specialisms/creative-ad-server/index.yaml +0 -409
  464. package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/generative-seller.yaml +0 -807
  465. package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/index.yaml +0 -758
  466. package/compliance/cache/3.1.0-beta.7/specialisms/creative-template/index.yaml +0 -510
  467. package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/index.yaml +0 -143
  468. package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -117
  469. package/compliance/cache/3.1.0-beta.7/specialisms/governance-delivery-monitor/index.yaml +0 -441
  470. package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/denied.yaml +0 -221
  471. package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/index.yaml +0 -330
  472. package/compliance/cache/3.1.0-beta.7/specialisms/property-lists/index.yaml +0 -482
  473. package/compliance/cache/3.1.0-beta.7/specialisms/sales-broadcast-tv/index.yaml +0 -738
  474. package/compliance/cache/3.1.0-beta.7/specialisms/sales-catalog-driven/index.yaml +0 -840
  475. package/compliance/cache/3.1.0-beta.7/specialisms/sales-guaranteed/index.yaml +0 -601
  476. package/compliance/cache/3.1.0-beta.7/specialisms/sales-non-guaranteed/index.yaml +0 -546
  477. package/compliance/cache/3.1.0-beta.7/specialisms/sales-proposal-mode/index.yaml +0 -586
  478. package/compliance/cache/3.1.0-beta.7/specialisms/sales-social/index.yaml +0 -919
  479. package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/index.yaml +0 -424
  480. package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -211
  481. package/compliance/cache/3.1.0-beta.7/specialisms/signal-owned/index.yaml +0 -317
  482. package/compliance/cache/3.1.0-beta.7/specialisms/sponsored-intelligence/index.yaml +0 -59
  483. package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor-live.yaml +0 -78
  484. package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor.yaml +0 -223
  485. package/compliance/cache/3.1.0-beta.7/test-kits/billing-gate-runner.yaml +0 -115
  486. package/compliance/cache/3.1.0-beta.7/test-kits/bistro-oranje.yaml +0 -126
  487. package/compliance/cache/3.1.0-beta.7/test-kits/distributed-brand-runner.yaml +0 -281
  488. package/compliance/cache/3.1.0-beta.7/test-kits/nova-motors.yaml +0 -262
  489. package/compliance/cache/3.1.0-beta.7/test-kits/osei-natural.yaml +0 -126
  490. package/compliance/cache/3.1.0-beta.7/test-kits/parallel-dispatch-runner.yaml +0 -196
  491. package/compliance/cache/3.1.0-beta.7/test-kits/rate-limit-trip-runner.yaml +0 -172
  492. package/compliance/cache/3.1.0-beta.7/test-kits/signed-requests-runner.yaml +0 -155
  493. package/compliance/cache/3.1.0-beta.7/test-kits/single-side-trust-runner.yaml +0 -294
  494. package/compliance/cache/3.1.0-beta.7/test-kits/substitution-observer-runner.yaml +0 -688
  495. package/compliance/cache/3.1.0-beta.7/test-kits/summit-foods.yaml +0 -125
  496. package/compliance/cache/3.1.0-beta.7/test-kits/webhook-receiver-runner.yaml +0 -265
  497. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/001-minimal-plan.json +0 -43
  498. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/002-full-plan.json +0 -217
  499. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -60
  500. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004a-human-review-omitted.json +0 -43
  501. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -49
  502. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -53
  503. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -57
  504. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -49
  505. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -53
  506. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/007-unicode-objectives.json +0 -43
  507. package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -65
  508. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/README.md +0 -220
  509. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/canonicalization.json +0 -241
  510. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/keys.json +0 -60
  511. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/001-no-signature-header.json +0 -24
  512. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/002-wrong-tag.json +0 -26
  513. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/003-expired-signature.json +0 -26
  514. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/004-window-too-long.json +0 -26
  515. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -26
  516. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -26
  517. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -26
  518. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -26
  519. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -27
  520. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -33
  521. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/011-malformed-header.json +0 -27
  522. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -26
  523. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/013-expires-le-created.json +0 -27
  524. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -27
  525. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/015-signature-invalid.json +0 -28
  526. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -35
  527. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/017-key-revoked.json +0 -38
  528. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -28
  529. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -26
  530. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/020-rate-abuse.json +0 -34
  531. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -31
  532. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -31
  533. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -32
  534. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -31
  535. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -43
  536. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -31
  537. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -25
  538. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -26
  539. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/001-basic-post.json +0 -30
  540. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -31
  541. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/003-es256-post.json +0 -30
  542. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -26
  543. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -30
  544. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -30
  545. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -30
  546. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -30
  547. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -30
  548. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -30
  549. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -30
  550. package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -30
  551. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/README.md +0 -211
  552. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/keys.json +0 -61
  553. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -26
  554. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -26
  555. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -26
  556. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -26
  557. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -26
  558. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -25
  559. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -26
  560. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -26
  561. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -26
  562. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -26
  563. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -25
  564. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -26
  565. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -26
  566. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -26
  567. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -26
  568. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -37
  569. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -32
  570. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -33
  571. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -32
  572. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -41
  573. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -26
  574. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/001-basic-post.json +0 -24
  575. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/002-es256-post.json +0 -24
  576. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -24
  577. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -24
  578. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -24
  579. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -24
  580. package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -25
  581. package/compliance/cache/3.1.0-beta.7/universal/billing-gate-dispatch.yaml +0 -450
  582. package/compliance/cache/3.1.0-beta.7/universal/canonical-format-validate-input.yaml +0 -640
  583. package/compliance/cache/3.1.0-beta.7/universal/capability-discovery.yaml +0 -125
  584. package/compliance/cache/3.1.0-beta.7/universal/collection-lists-pagination-integrity.yaml +0 -306
  585. package/compliance/cache/3.1.0-beta.7/universal/comply-controller-mode-gate.yaml +0 -141
  586. package/compliance/cache/3.1.0-beta.7/universal/content-standards-pagination-integrity.yaml +0 -326
  587. package/compliance/cache/3.1.0-beta.7/universal/deterministic-testing.yaml +0 -1430
  588. package/compliance/cache/3.1.0-beta.7/universal/error-compliance-signals.yaml +0 -377
  589. package/compliance/cache/3.1.0-beta.7/universal/error-compliance.yaml +0 -528
  590. package/compliance/cache/3.1.0-beta.7/universal/fictional-entities.yaml +0 -307
  591. package/compliance/cache/3.1.0-beta.7/universal/get-media-buys-pagination-integrity.yaml +0 -160
  592. package/compliance/cache/3.1.0-beta.7/universal/get-signals-pagination-integrity.yaml +0 -211
  593. package/compliance/cache/3.1.0-beta.7/universal/idempotency.yaml +0 -861
  594. package/compliance/cache/3.1.0-beta.7/universal/notification-config-event-scope.yaml +0 -119
  595. package/compliance/cache/3.1.0-beta.7/universal/notification-config-lifecycle.yaml +0 -337
  596. package/compliance/cache/3.1.0-beta.7/universal/notification-config-rejections.yaml +0 -107
  597. package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-creative-formats.yaml +0 -265
  598. package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-list-accounts.yaml +0 -245
  599. package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity.yaml +0 -263
  600. package/compliance/cache/3.1.0-beta.7/universal/property-lists-pagination-integrity.yaml +0 -307
  601. package/compliance/cache/3.1.0-beta.7/universal/read-tool-idempotency.yaml +0 -405
  602. package/compliance/cache/3.1.0-beta.7/universal/runner-output-contract.yaml +0 -1266
  603. package/compliance/cache/3.1.0-beta.7/universal/schema-validation-signals.yaml +0 -181
  604. package/compliance/cache/3.1.0-beta.7/universal/schema-validation.yaml +0 -548
  605. package/compliance/cache/3.1.0-beta.7/universal/security.yaml +0 -539
  606. package/compliance/cache/3.1.0-beta.7/universal/signed-requests.yaml +0 -217
  607. package/compliance/cache/3.1.0-beta.7/universal/stale-response-advisory.yaml +0 -295
  608. package/compliance/cache/3.1.0-beta.7/universal/storyboard-schema.yaml +0 -2136
  609. package/compliance/cache/3.1.0-beta.7/universal/v3-envelope-integrity.yaml +0 -117
  610. package/compliance/cache/3.1.0-beta.7/universal/version-negotiation.yaml +0 -130
  611. package/compliance/cache/3.1.0-beta.7/universal/webhook-emission.yaml +0 -411
  612. package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-bulk-webhooks.yaml +0 -82
  613. package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-product-webhooks.yaml +0 -83
  614. package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-products.yaml +0 -151
  615. package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signal-webhooks.yaml +0 -83
  616. package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signals.yaml +0 -149
  617. package/dist/lib/types/v3-1-beta/index.d.mts +0 -1
  618. package/dist/lib/types/v3-1-beta/index.d.ts +0 -1
  619. package/dist/lib/types/v3-1-beta/index.mjs +0 -1
  620. package/dist/lib/types/v3-1-beta/tools.generated.d.mts +0 -26788
  621. package/dist/lib/types/v3-1-beta/tools.generated.d.ts +0 -26788
  622. /package/dist/lib/{types/v3-1-beta/tools.generated.mjs → media-buy/action-types.mjs} +0 -0
@@ -784,7 +784,9 @@ const AgeRestrictionSchema = z.object({
784
784
  verification_required: z.boolean().optional(),
785
785
  accepted_methods: z.array(AgeVerificationMethodSchema).optional()
786
786
  }).passthrough();
787
+ const TargetingDevicePlatformsInputSchema = z.array(DevicePlatformSchema);
787
788
  const DevicePlatformExcludeSchema = z.array(DevicePlatformSchema);
789
+ const TargetingDeviceTypesInputSchema = z.array(DeviceTypeSchema);
788
790
  const DeviceTypeExcludeSchema = z.array(DeviceTypeSchema);
789
791
  const BrowserSchema = z.array(BrowserFamilySchema);
790
792
  const BrowserExcludeSchema = z.array(BrowserFamilySchema);
@@ -794,12 +796,12 @@ const StoreCatchmentsSchema = z.array(z.object({
794
796
  catchment_ids: z.array(z.string()).optional()
795
797
  }).passthrough());
796
798
  const GeoProximitySchema = z.array(z.union([z.object({}).passthrough(), z.object({}).passthrough(), z.object({}).passthrough()]));
797
- const TargetingLanguagesSchema = z.array(LanguageTagSchema);
798
- const TargetingKeywordsSchema = z.array(z.object({
799
+ const TargetingLanguagesInputSchema = z.array(LanguageTagSchema).nullable();
800
+ const TargetingKeywordsInputSchema = z.array(z.object({
799
801
  keyword: z.string(),
800
802
  match_type: MatchTypeSchema,
801
803
  bid_price: z.number().optional()
802
- }).passthrough());
804
+ }).passthrough()).nullable();
803
805
  const GeoMetroSchema = z.object({
804
806
  system: MetroAreaSystemSchema,
805
807
  values: z.array(z.string())
@@ -2531,6 +2533,12 @@ const AttestationEvaluationSchema = z.object({}).passthrough().merge(z.object({}
2531
2533
  ext: ExtensionObjectSchema.optional()
2532
2534
  }).passthrough());
2533
2535
  const TargetingGeoMetrosSchema = z.array(GeoMetroSchema);
2536
+ const TargetingLanguagesSchema = z.array(LanguageTagSchema);
2537
+ const TargetingKeywordsSchema = z.array(z.object({
2538
+ keyword: z.string(),
2539
+ match_type: MatchTypeSchema,
2540
+ bid_price: z.number().optional()
2541
+ }).passthrough());
2534
2542
  const TargetingNegativeKeywordsSchema = z.array(NegativeKeywordSchema);
2535
2543
  const DemographicPredicateSchema = z.object({
2536
2544
  age: DemographicAgeRangeSchema
@@ -7964,11 +7972,13 @@ const DeclineProposalsRequestSchema = z.object({
7964
7972
  declines: z.array(ProposalDeclineSchema).max(25),
7965
7973
  opportunity: OpportunityContextSchema.optional()
7966
7974
  }).passthrough();
7975
+ const TargetingGeoMetrosInputSchema = z.array(GeoMetroSchema).nullable();
7967
7976
  const GeoPostalAreasSchema = z.array(PostalAreaSchema);
7968
7977
  const GeoPostalAreasExcludeSchema = z.array(PostalAreaSchema);
7969
7978
  const GeoPlacesSchema = z.array(GeographicPlaceAreaSchema);
7970
7979
  const GeoPlacesExcludeSchema = z.array(GeographicPlaceAreaSchema);
7971
7980
  const DaypartTargetsSchema = z.array(DaypartTargetSchema);
7981
+ const TargetingNegativeKeywordsInputSchema = z.array(NegativeKeywordSchema).nullable();
7972
7982
  const AcceptProposalRequestSchema = z.object({
7973
7983
  adcp_version: z.string().optional(),
7974
7984
  adcp_major_version: z.number().optional(),
@@ -11853,276 +11863,642 @@ const RightsConstraintSchema = z.object({}).passthrough().merge(z.object({
11853
11863
  }).passthrough())).max(4).optional(),
11854
11864
  ext: ExtensionObjectSchema.optional()
11855
11865
  }).passthrough());
11856
- const TargetingOverlaySchema = TargetingUnknownAgeEligibilityConstraintSchema.merge(TargetingVerifiedAgeBasisConstraintSchema).merge(z.object({
11857
- geo_countries: z.array(z.string()).optional(),
11858
- geo_countries_exclude: z.array(z.string()).optional(),
11859
- geo_regions: z.array(z.string()).optional(),
11860
- geo_regions_exclude: z.array(z.string()).optional(),
11861
- geo_metros: TargetingGeoMetrosSchema.optional(),
11862
- geo_metros_exclude: z.array(z.object({
11863
- system: MetroAreaSystemSchema,
11864
- values: z.array(z.string())
11865
- }).passthrough()).optional(),
11866
- geo_postal_areas: z.array(PostalAreaSchema).optional(),
11867
- geo_postal_areas_exclude: z.array(PostalAreaSchema).optional(),
11868
- geo_places: z.array(GeographicPlaceAreaSchema).optional(),
11869
- geo_places_exclude: z.array(GeographicPlaceAreaSchema).optional(),
11870
- daypart_targets: z.array(DaypartTargetSchema).optional(),
11871
- axe_include_segment: z.string().optional(),
11872
- axe_exclude_segment: z.string().optional(),
11873
- audience_include: z.array(z.string()).optional(),
11874
- audience_exclude: z.array(z.string()).optional(),
11875
- signal_targeting_groups: TargetingSignalGroupsSchema.optional(),
11876
- signal_targeting: z.array(SignalTargetingSchema).optional(),
11877
- demographics: DemographicTargetingIntentSchema.optional(),
11878
- frequency_cap: TargetingFrequencyCapSchema.optional(),
11879
- property_list: TargetingPropertyListSchema.optional(),
11880
- property_list_exclude: PropertyListReferenceSchema.optional(),
11881
- collection_list: TargetingCollectionListSchema.optional(),
11882
- collection_list_exclude: CollectionListReferenceSchema.optional(),
11883
- placement_selection: PlacementSelectionSchema.optional(),
11884
- collection_selection: TargetingCollectionSelectionSchema.optional(),
11885
- age_restriction: z.object({
11886
- min: z.number().int().gte(13).lte(99),
11887
- verification_required: z.boolean().optional(),
11888
- accepted_methods: z.array(AgeVerificationMethodSchema).optional()
11889
- }).passthrough().optional(),
11890
- device_platform: z.array(DevicePlatformSchema).optional(),
11891
- device_platform_exclude: z.array(DevicePlatformSchema).optional(),
11892
- device_type: z.array(DeviceTypeSchema).optional(),
11893
- device_type_exclude: z.array(DeviceTypeSchema).optional(),
11894
- browser: z.array(BrowserFamilySchema).optional(),
11895
- browser_exclude: z.array(BrowserFamilySchema).optional(),
11896
- store_catchments: z.array(z.object({
11897
- catalog_id: z.string(),
11898
- store_ids: z.array(z.string()).optional(),
11899
- catchment_ids: z.array(z.string()).optional()
11900
- }).passthrough()).optional(),
11901
- geo_proximity: z.array(z.union([z.object({}).passthrough(), z.object({}).passthrough(), z.object({}).passthrough()])).optional(),
11902
- language: TargetingLanguagesSchema.optional(),
11903
- keyword_targets: TargetingKeywordsSchema.optional(),
11904
- negative_keywords: TargetingNegativeKeywordsSchema.optional()
11905
- }).passthrough());
11906
- const DeliveryForecast1Schema = DeliveryForecastSchema;
11907
- const GetProductsAsyncInputRequiredSchema = z.object({
11908
- reason: z.union([z.literal("CLARIFICATION_NEEDED"), z.literal("BUDGET_REQUIRED")]).optional(),
11909
- partial_results: z.array(ProductSchema).optional(),
11910
- suggestions: z.array(z.string()).optional(),
11911
- context: ContextObjectSchema.optional(),
11912
- ext: ExtensionObjectSchema.optional()
11913
- }).passthrough();
11914
- const ProductPurchaseSchema = z.object({
11915
- product_id: z.string().min(1),
11916
- pricing_option_id: z.string().min(1),
11917
- pricing: CanonicalPricingOptionSchema.optional(),
11918
- format_option_refs: z.array(FormatOptionReferenceSchema).optional(),
11919
- catalog_ids: z.array(z.string()).optional(),
11920
- budget: z.number().gte(0).optional(),
11921
- daily_budget_cap: z.number().gte(0).optional(),
11922
- min_spend_target: z.number().gte(0).optional(),
11923
- impressions: ProductPurchaseImpressionsSchema.optional(),
11924
- start_time: z.string().refine(adcpJsonSchemaDateTime, "Invalid date-time").optional(),
11925
- end_time: z.string().refine(adcpJsonSchemaDateTime, "Invalid date-time").optional(),
11926
- pacing: PacingSchema.optional(),
11927
- bidding: BiddingPolicySchema.optional(),
11928
- targeting_overlay: TargetingOverlaySchema.optional(),
11929
- optimization_goals: z.array(CanonicalOptimizationGoalSchema).optional(),
11930
- audience_evidence_requirements: ProductPurchaseAudienceEvidenceRequirementsSchema.optional(),
11931
- audience_evidence_pins: z.array(AudienceEvidencePinSchema).optional(),
11932
- agency_estimate_number: z.string().max(100).optional(),
11933
- context: ContextObjectSchema.optional(),
11934
- ext: ExtensionObjectSchema.optional(),
11935
- measurement_terms: ProductPurchaseMeasurementTermsSchema.optional(),
11936
- performance_standards: z.array(CanonicalPerformanceStandardSchema).optional()
11937
- }).passthrough();
11938
- const CanonicalForecastPointSchema = z.object({
11939
- label: z.string().max(128).optional(),
11940
- budget: z.number().gte(0).optional(),
11941
- product_id: z.string().optional(),
11942
- dimensions: ForecastPointDimensionsSchema.optional(),
11943
- availability_status: AvailabilityStatusSchema.optional(),
11944
- metrics: z.object({
11945
- coverage_rate: ForecastRateRangeSchema.optional()
11946
- }).passthrough().catchall(ForecastRangeSchema),
11947
- viewability: z.union([z.object({}).passthrough(), z.object({}).passthrough()]).optional(),
11948
- vendor_metric_values: z.array(CanonicalForecastVendorMetricValueSchema).optional()
11949
- }).passthrough();
11950
- const CreativeAssetValueSchema = z.unknown().superRefine((value, ctx) => {
11951
- const variants = Array.isArray(value) ? value : [value];
11952
- if (variants.length === 0 || variants.some((variant) => !AssetVariantSchema.safeParse(variant).success)) {
11953
- ctx.addIssue({
11954
- code: "custom",
11955
- message: "creative slot must contain an asset or non-empty array of assets"
11956
- });
11957
- }
11958
- });
11959
- const CreativeAssetsRuntimeSchema = z.record(z.string(), z.unknown()).superRefine((assets, ctx) => {
11960
- for (const [slotKey, assetValue] of Object.entries(assets)) {
11961
- if (/^[a-z0-9_]+$/.test(slotKey) && !CreativeAssetValueSchema.safeParse(assetValue).success) {
11962
- ctx.addIssue({
11866
+ const TargetingOverlaySchema = (() => {
11867
+ const objectSchema = z.object({ "geo_countries": z.array(z.string().regex(new RegExp("^[A-Z]{2}$"))).min(1).describe("Restrict delivery to specific countries. ISO 3166-1 alpha-2 codes (e.g., 'US', 'GB', 'DE').").optional(), "geo_countries_exclude": z.array(z.string().regex(new RegExp("^[A-Z]{2}$"))).min(1).describe("Exclude specific countries from delivery. ISO 3166-1 alpha-2 codes (e.g., 'US', 'GB', 'DE').").optional(), "geo_regions": z.array(z.string().regex(new RegExp("^[A-Z]{2}-[A-Z0-9]{1,3}$"))).min(1).describe("Restrict delivery to exact canonical ISO 3166-2 subdivisions (states, provinces, regions, departments, or other subdivision categories). Unknown identifiers are invalid. At create or update, sellers MUST reject unsupported identifiers and MUST NOT silently widen, drop, or partially apply the list. During get_products, a seller may instead return a sparse, buyer-reviewable targeting_resolution modification for a valid but unsupported requested outcome. Exact internal translation preserves accepted identifiers in package readback.").optional(), "geo_regions_exclude": z.array(z.string().regex(new RegExp("^[A-Z]{2}-[A-Z0-9]{1,3}$"))).min(1).describe("Exclude exact canonical ISO 3166-2 subdivisions. Support is independent from geo_regions inclusion support. Unknown identifiers and values also present in geo_regions are invalid. At create or update, sellers MUST reject unsupported identifiers and partial application; during get_products, a seller may instead return a sparse, buyer-reviewable targeting_resolution modification for a valid but unsupported requested outcome.").optional(), "geo_metros": z.array(z.object({ "system": z.enum(["nielsen_dma", "uk_itl1", "uk_itl2", "eurostat_nuts2", "custom"]).describe("Metro area classification system (e.g., 'nielsen_dma', 'uk_itl2')"), "values": z.array(z.string()).min(1).describe("Metro codes within the system (e.g., ['501', '602'] for Nielsen DMAs)") }).strict().describe("A targeted metro area.")).min(1).describe("Restrict delivery to specific metro areas. Each entry specifies the classification system and target values. Seller must declare supported systems in get_adcp_capabilities.").optional(), "geo_metros_exclude": z.array(z.object({ "system": z.enum(["nielsen_dma", "uk_itl1", "uk_itl2", "eurostat_nuts2", "custom"]).describe("Metro area classification system (e.g., 'nielsen_dma', 'uk_itl2')"), "values": z.array(z.string()).min(1).describe("Metro codes to exclude within the system (e.g., ['501', '602'] for Nielsen DMAs)") }).strict()).min(1).describe("Exclude specific metro areas from delivery. Each entry specifies the classification system and excluded values. Seller must declare supported systems in get_adcp_capabilities.").optional(), "geo_postal_areas": z.array(z.union([z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code for the postal values."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system (e.g., 'zip', 'outward', 'plz', 'postal_code')."), "values": z.array(z.string()).min(1).describe("Postal codes within the country and system.") }).strict().and(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system.") }).and(z.union([z.object({ "country": z.literal("US").optional(), "system": z.enum(["zip", "zip_plus_four"]).optional() }), z.object({ "country": z.literal("GB").optional(), "system": z.enum(["outward", "full"]).optional() }), z.object({ "country": z.literal("CA").optional(), "system": z.enum(["fsa", "full"]).optional() }), z.object({ "country": z.enum(["DE", "CH", "AT"]).optional(), "system": z.literal("plz").optional() }), z.object({ "country": z.literal("FR").optional(), "system": z.literal("code_postal").optional() }), z.object({ "country": z.literal("AU").optional(), "system": z.literal("postcode").optional() }), z.object({ "country": z.literal("BR").optional(), "system": z.literal("cep").optional() }), z.object({ "country": z.literal("IN").optional(), "system": z.literal("pin").optional() }), z.object({ "country": z.literal("ZA").optional(), "system": z.literal("postal_code").optional() }), z.object({ "country": z.any().refine((value) => !z.enum(["US", "GB", "CA", "DE", "CH", "AT", "FR", "AU", "BR", "IN", "ZA"]).safeParse(value).success, "Invalid input: Should NOT be valid against schema").optional(), "system": z.enum(["postal_code", "custom"]).optional() })])).describe("Valid country-local postal system pairing. Registered countries only accept their registered local systems; countries without a registered local system use postal_code or custom.")), z.object({ "system": z.enum(["us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Deprecated country-fused postal code system (e.g., 'us_zip', 'gb_outward'). Prefer country + postal-system."), "values": z.array(z.string()).min(1).describe("Postal codes within the legacy system.") }).strict()]).describe("Postal area values. Prefer the native country + postal system form. Deprecated legacy country-fused postal-system tokens remain accepted for compatibility.")).min(1).describe("Restrict delivery to specific postal areas. Prefer the native country + postal system form. The deprecated legacy country-fused postal-system tokens remain accepted for compatibility. Seller must declare supported systems in get_adcp_capabilities.").optional(), "geo_postal_areas_exclude": z.array(z.union([z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code for the postal values."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system (e.g., 'zip', 'outward', 'plz', 'postal_code')."), "values": z.array(z.string()).min(1).describe("Postal codes within the country and system.") }).strict().and(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system.") }).and(z.union([z.object({ "country": z.literal("US").optional(), "system": z.enum(["zip", "zip_plus_four"]).optional() }), z.object({ "country": z.literal("GB").optional(), "system": z.enum(["outward", "full"]).optional() }), z.object({ "country": z.literal("CA").optional(), "system": z.enum(["fsa", "full"]).optional() }), z.object({ "country": z.enum(["DE", "CH", "AT"]).optional(), "system": z.literal("plz").optional() }), z.object({ "country": z.literal("FR").optional(), "system": z.literal("code_postal").optional() }), z.object({ "country": z.literal("AU").optional(), "system": z.literal("postcode").optional() }), z.object({ "country": z.literal("BR").optional(), "system": z.literal("cep").optional() }), z.object({ "country": z.literal("IN").optional(), "system": z.literal("pin").optional() }), z.object({ "country": z.literal("ZA").optional(), "system": z.literal("postal_code").optional() }), z.object({ "country": z.any().refine((value) => !z.enum(["US", "GB", "CA", "DE", "CH", "AT", "FR", "AU", "BR", "IN", "ZA"]).safeParse(value).success, "Invalid input: Should NOT be valid against schema").optional(), "system": z.enum(["postal_code", "custom"]).optional() })])).describe("Valid country-local postal system pairing. Registered countries only accept their registered local systems; countries without a registered local system use postal_code or custom.")), z.object({ "system": z.enum(["us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Deprecated country-fused postal code system (e.g., 'us_zip', 'gb_outward'). Prefer country + postal-system."), "values": z.array(z.string()).min(1).describe("Postal codes within the legacy system.") }).strict()]).describe("Postal area values. Prefer the native country + postal system form. Deprecated legacy country-fused postal-system tokens remain accepted for compatibility.")).min(1).describe("Exclude specific postal areas from delivery. Prefer the native country + postal system form. The deprecated legacy country-fused postal-system tokens remain accepted for compatibility. Seller must declare supported systems in get_adcp_capabilities.").optional(), "geo_places": z.array(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code containing the place."), "system": z.union([z.enum(["geonames", "google_ads", "microsoft_ads"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Collision-safe identifier namespace for geographic places. Registered tokens have protocol-defined semantics. Unregistered systems MUST use an absolute HTTPS URI controlled by the catalog owner; consumers compare URI systems as exact opaque strings."), "system_version": z.string().min(1).describe("Optional exact catalog version from the seller's declared supported_versions. When omitted, the seller applies catalog.current_version and MUST echo that version on persisted package state.").optional(), "place_type": z.union([z.enum(["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Canonical place classification. Registered tokens have protocol-defined meanings. Catalog-specific classifications without a registered mapping MUST use an absolute HTTPS URI controlled by the vocabulary owner; consumers compare URI types as exact opaque strings."), "values": z.array(z.string().min(1)).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Stable place identifiers in the declared system. Display names are not valid targeting values."), "value_labels": z.record(z.string(), z.string().min(1)).describe("Optional human-readable diagnostic labels keyed by identifiers present in values. Extra keys are a conformance error. Labels are non-authoritative and MUST NOT be used to resolve or apply targeting.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict().and(z.union([z.any().refine((value) => !z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }).safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }), z.object({ "values": z.any().optional() }))])).describe("A catalog-backed named place target. Values are stable identifiers in the declared system. Entries within geo_places form a union; different geographic inclusion dimensions intersect. value_labels are diagnostic only and MUST NOT be used to resolve targeting.")).min(1).describe("Restrict delivery to catalog-backed named places. Values MUST be stable identifiers in the declared system, not display names. Sellers must declare supported systems, countries, and place types in get_adcp_capabilities and reject unsupported entries rather than silently dropping them.").optional(), "geo_places_exclude": z.array(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code containing the place."), "system": z.union([z.enum(["geonames", "google_ads", "microsoft_ads"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Collision-safe identifier namespace for geographic places. Registered tokens have protocol-defined semantics. Unregistered systems MUST use an absolute HTTPS URI controlled by the catalog owner; consumers compare URI systems as exact opaque strings."), "system_version": z.string().min(1).describe("Optional exact catalog version from the seller's declared supported_versions. When omitted, the seller applies catalog.current_version and MUST echo that version on persisted package state.").optional(), "place_type": z.union([z.enum(["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Canonical place classification. Registered tokens have protocol-defined meanings. Catalog-specific classifications without a registered mapping MUST use an absolute HTTPS URI controlled by the vocabulary owner; consumers compare URI types as exact opaque strings."), "values": z.array(z.string().min(1)).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Stable place identifiers in the declared system. Display names are not valid targeting values."), "value_labels": z.record(z.string(), z.string().min(1)).describe("Optional human-readable diagnostic labels keyed by identifiers present in values. Extra keys are a conformance error. Labels are non-authoritative and MUST NOT be used to resolve or apply targeting.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict().and(z.union([z.any().refine((value) => !z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }).safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }), z.object({ "values": z.any().optional() }))])).describe("A catalog-backed named place target. Values are stable identifiers in the declared system. Entries within geo_places form a union; different geographic inclusion dimensions intersect. value_labels are diagnostic only and MUST NOT be used to resolve targeting.")).min(1).describe("Exclude catalog-backed named places. Uses the same identifier-based shape as geo_places. Sellers MUST reject overlap with geo_places for the same country, system, place_type, and value.").optional(), "daypart_targets": z.array(z.object({ "days": z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]).describe("Days of the week for daypart targeting")).min(1).describe("Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object)."), "start_hour": z.number().int().gte(0).lte(23).describe("Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm."), "end_hour": z.number().int().gte(1).lte(24).describe("End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour."), "timezone": z.union([z.literal("inventory_local"), z.any().refine((value) => !z.literal("inventory_local").safeParse(value).success, "Invalid input: Should NOT be valid against schema").describe("Concrete timezone identifier in the implementation's supported IANA Time Zone Database, such as America/New_York, CET, or UTC.")]).describe("Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and hour with the half-open window: a skipped DST hour has no matching instants, while both occurrences of a repeated hour match. This delivery clock is independent of reporting_capabilities.timezone.").default("inventory_local"), "label": z.string().describe("Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')").optional() }).strict().describe("A time window for daypart targeting. Specifies days of week, an hour range, and the civil-time clock used to evaluate it. start_hour is inclusive, end_hour is exclusive (e.g., 6-10 = 6:00am to 10:00am). Follows the Google Ads AdScheduleInfo / DV360 DayPartTargeting pattern.")).min(1).describe("Restrict delivery to specific time windows. Each entry specifies days of week, an hour range, and an optional timezone that defaults to inventory_local. A concrete IANA zone uses one shared civil-time clock, while inventory_local evaluates each inventory unit in its seller-assigned local timezone. Entries are independent and MAY use different clocks.").optional(), "axe_include_segment": z.string().describe("Deprecated: Use TMP provider fields instead. AXE segment ID to include for targeting.").optional(), "axe_exclude_segment": z.string().describe("Deprecated: Use TMP provider fields instead. AXE segment ID to exclude from targeting.").optional(), "audience_include": z.array(z.string()).min(1).describe("Restrict delivery to members of these first-party CRM audiences. Only users present in the uploaded lists are eligible. References audience_id values from sync_audiences on the same seller account \u2014 audience IDs are not portable across sellers. Not for lookalike expansion \u2014 express that intent in the campaign brief. Seller must declare support in get_adcp_capabilities.").optional(), "audience_exclude": z.array(z.string()).min(1).describe("Suppress delivery to members of these first-party CRM audiences. Matched users are excluded regardless of other targeting. References audience_id values from sync_audiences on the same seller account \u2014 audience IDs are not portable across sellers. Seller must declare support in get_adcp_capabilities.").optional(), "signal_targeting_groups": z.object({ "operator": z.literal("all").describe("Groups-level operator. Required even though v1 only supports 'all': every child group must be satisfied."), "groups": z.array(z.object({ "operator": z.enum(["any", "none"]).describe("How to evaluate the signals in this group. 'any' is an OR include group. 'none' is an exclusion group equivalent to NOT (A OR B OR C)."), "signals": z.array(z.object({ "pricing_option_id": z.string().describe("Pricing option selected for this signal. Use the pricing_option_id from the product's signal_targeting_options entry when product-scoped pricing is present; otherwise use the seller get_signals pricing only when the product option does not override it. Required when the selected signal has pricing_options; omit only when the signal is bundled into the product price or has no incremental cost.").optional(), "signal_agent_segment_id": z.string().describe("Optional opaque resolved-segment or seller execution handle for this signal. Omit when signal_ref plus the value expression is sufficient for the seller to resolve the signal. Include when the product option exposes a separate runtime or activation handle, and pass it verbatim. Buyers SHOULD prefer an exposed segment handle over reconstructing condition identity from categorical values because the handle can carry provider namespace and methodology distinctions.").optional(), "activation_key": z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
11868
+ const schemas = [z.object({ "type": z.literal("segment_id").describe("Segment ID based targeting"), "segment_id": z.string().describe("The platform-specific segment identifier to use in campaign targeting") }).catchall(z.any()), z.object({ "type": z.literal("key_value").describe("Key-value pair based targeting"), "key": z.string().describe("The targeting parameter key"), "value": z.string().describe("The targeting parameter value") }).catchall(z.any())];
11869
+ const { errors, failed } = schemas.reduce(
11870
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
11871
+ errors: [...errors2, ...result.error.issues],
11872
+ failed: failed2 + 1
11873
+ } : { errors: errors2, failed: failed2 })(
11874
+ schema.safeParse(x)
11875
+ ),
11876
+ { errors: [], failed: 0 }
11877
+ );
11878
+ const passed = schemas.length - failed;
11879
+ if (passed !== 1) {
11880
+ ctx.addIssue(errors.length ? {
11881
+ path: [],
11882
+ code: "invalid_union",
11883
+ errors: [errors],
11884
+ message: "Invalid input: Should pass single schema. Passed " + passed
11885
+ } : {
11886
+ path: [],
11963
11887
  code: "custom",
11964
- path: [slotKey],
11965
- message: "creative slot must contain an asset or non-empty array of assets"
11888
+ errors: [errors],
11889
+ message: "Invalid input: Should pass single schema. Passed " + passed
11966
11890
  });
11967
11891
  }
11968
- }
11969
- });
11970
- const CreativeManifestSchema = z.object({}).passthrough().merge(z.object({
11971
- format_id: FormatReferenceStructuredObjectSchema.optional(),
11972
- format_kind: CanonicalFormatKindSchema.optional(),
11973
- format_option_ref: FormatOptionReferenceSchema.optional(),
11974
- representation_selection: RepresentationSelectionSchema.optional(),
11975
- assets: CreativeAssetsRuntimeSchema,
11976
- component_assets: z.record(z.string(), CreativeAssetsSchema).optional(),
11977
- brand: BrandReferenceSchema.optional(),
11978
- rights: z.array(RightsConstraintSchema).optional(),
11979
- industry_identifiers: z.array(IndustryIdentifierSchema).optional(),
11980
- provenance: ProvenanceSchema.optional(),
11981
- ext: ExtensionObjectSchema.optional()
11982
- }).passthrough()).superRefine((value, ctx) => {
11983
- const hasFormatId = value.format_id !== void 0;
11984
- const hasFormatKind = value.format_kind !== void 0;
11985
- if (hasFormatId === hasFormatKind) {
11986
- ctx.addIssue({
11987
- code: "custom",
11988
- path: [],
11989
- message: "creative identity requires exactly one of format_id or format_kind"
11990
- });
11991
- }
11992
- if ("capability_id" in value || "capability_ref" in value) {
11993
- ctx.addIssue({
11994
- code: "custom",
11995
- path: [],
11996
- message: "creative identity does not allow capability_id or capability_ref"
11997
- });
11998
- }
11999
- });
12000
- const BuildCreativeMultiSuccessSchema = z.object({
12001
- creative_manifests: z.array(CreativeManifestSchema),
12002
- sandbox: z.boolean().optional(),
12003
- expires_at: z.iso.datetime().optional(),
12004
- preview: z.object({
12005
- previews: z.array(z.object({
12006
- preview_id: z.string(),
12007
- format_id: FormatReferenceStructuredObjectSchema.optional(),
12008
- capability_id: z.string().regex(/^[a-zA-Z0-9_-]+$/).optional(),
12009
- renders: z.array(PreviewRenderSchema),
12010
- input: z.object({
12011
- name: z.string(),
12012
- macros: z.record(z.string(), z.string()).optional(),
12013
- context_description: z.string().optional()
12014
- }).passthrough()
12015
- }).passthrough()),
12016
- interactive_url: z.string().optional(),
12017
- expires_at: z.iso.datetime()
12018
- }).passthrough().optional(),
12019
- preview_error: ErrorSchema.optional(),
12020
- pricing_option_id: z.string().optional(),
12021
- vendor_cost: z.number().min(0).optional(),
12022
- currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12023
- consumption: CreativeConsumptionSchema.optional(),
12024
- context: ContextObjectSchema.optional(),
12025
- ext: ExtensionObjectSchema.optional()
12026
- }).passthrough();
12027
- const BuildCreativeVariantSuccessSchema = z.object({
12028
- creatives: z.array(z.object({
12029
- build_creative_id: z.string().optional(),
12030
- catalog_item_ref: z.object({
12031
- catalog_type: z.string().optional(),
12032
- item_id: z.string()
12033
- }).passthrough().optional(),
12034
- signal_condition: SignalTargetingSchema.optional(),
12035
- variants: z.array(z.object({
12036
- build_variant_id: z.string(),
12037
- recipe_hash: z.string().optional(),
12038
- parent_build_variant_id: z.string().optional(),
12039
- creative_manifest: CreativeManifestSchema,
12040
- variant_axis_value: z.unknown().optional(),
12041
- recommended: z.boolean().optional(),
12042
- rank: z.int().min(1).optional(),
12043
- eval: z.object({
12044
- features: z.array(CreativeFeatureResultSchema).optional(),
12045
- ranked_against: z.int().min(1).optional(),
12046
- calls_used: z.int().min(0).optional(),
12047
- seconds_used: z.number().min(0).optional(),
12048
- ext: ExtensionObjectSchema.optional()
12049
- }).passthrough().optional(),
12050
- pricing_option_id: z.string().optional(),
12051
- vendor_cost: z.number().min(0).optional(),
12052
- currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12053
- consumption: CreativeConsumptionSchema.optional()
12054
- }).passthrough()).optional(),
12055
- errors: z.array(ErrorSchema).optional()
12056
- }).passthrough()),
12057
- items_total: z.int().min(0).optional(),
12058
- items_returned: z.int().min(0).optional(),
12059
- leaves_total: z.int().min(0).optional(),
12060
- leaves_returned: z.int().min(0).optional(),
12061
- vendor_cost: z.number().min(0).optional(),
12062
- currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12063
- keep_mode_applied: z.union([z.literal("keep_all"), z.literal("keep_one"), z.literal("keep_some")]).optional(),
12064
- selection_strategy_applied: CreativeSelectionStrategySchema.optional(),
12065
- budget_status: z.union([z.literal("complete"), z.literal("capped")]).optional(),
12066
- errors: z.array(ErrorSchema).optional(),
12067
- sandbox: z.boolean().optional(),
12068
- expires_at: z.iso.datetime().optional(),
12069
- context: ContextObjectSchema.optional(),
12070
- ext: ExtensionObjectSchema.optional()
12071
- }).passthrough();
12072
- const PreviewCreativeVariantResponseSchema = z.object({
12073
- response_type: z.literal("variant"),
12074
- variant_id: z.string(),
12075
- creative_id: z.string().optional(),
12076
- previews: z.array(z.object({
12077
- preview_id: z.string(),
12078
- renders: z.array(PreviewRenderSchema)
12079
- }).passthrough()),
12080
- manifest: CreativeManifestSchema.optional(),
12081
- expires_at: z.iso.datetime().optional(),
12082
- context: ContextObjectSchema.optional(),
12083
- ext: ExtensionObjectSchema.optional()
12084
- }).passthrough();
12085
- const AAODirectoryAgentPublishersInverseLookupResponseSchema = z.object({
12086
- agent_url: z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
12087
- directory_indexed_at: z.iso.datetime().nullable(),
12088
- publishers: z.array(PublisherEntrySchema),
12089
- next_cursor: z.string().optional().nullable()
12090
- }).passthrough();
12091
- const AcquireRightsAcquiredSchema = z.object({
12092
- rights_id: z.string(),
12093
- rights_status: z.literal("acquired"),
12094
- brand_id: z.string(),
12095
- terms: RightsTermsSchema,
12096
- generation_credentials: z.array(GenerationCredentialSchema),
12097
- restrictions: z.array(z.string()).optional(),
12098
- disclosure: z.object({
12099
- required: z.boolean(),
12100
- text: z.string().optional()
12101
- }).passthrough().optional(),
12102
- approval_webhook: PushNotificationConfigSchema.optional(),
12103
- usage_reporting_url: z.string().optional(),
12104
- rights_constraint: RightsConstraintSchema.and(z.object({}).passthrough()),
12105
- context: ContextObjectSchema.optional(),
12106
- ext: ExtensionObjectSchema.optional()
12107
- }).passthrough();
12108
- const CreativeApprovalResponseSchema = z.object({
12109
- context_id: z.string().optional(),
12110
- context: ContextObjectSchema.optional(),
12111
- task_id: z.string().optional(),
12112
- status: TaskStatusSchema,
12113
- message: z.string().optional(),
12114
- timestamp: z.string().optional(),
12115
- replayed: z.boolean().optional(),
12116
- adcp_error: ErrorSchema.optional(),
12117
- push_notification_config: PushNotificationConfigSchema.optional(),
12118
- governance_context: z.string().optional(),
12119
- payload: z.object({}).passthrough().optional(),
12120
- adcp_version: z.string().optional(),
12121
- adcp_major_version: z.number().optional()
12122
- }).passthrough().and(z.union([CreativeApprovedSchema, CreativeRejectedSchema, CreativePendingReviewSchema, CreativeApprovalErrorSchema]));
12123
- const GetBrandIdentityResponseSchema = z.object({
12124
- context_id: z.string().optional(),
12125
- context: ContextObjectSchema.optional(),
11892
+ })).describe("Destination-specific activation key returned by get_signals or activate_signal. Usually omitted for seller-offered signals selected directly through the same seller; include only when the selected signal was separately activated and the seller requires the activation key to correlate the package selection.").optional() }).catchall(z.any()).and(z.any().superRefine((x, ctx) => {
11893
+ const schemas = [z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
11894
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
11895
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
11896
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
11897
+ errors: [...errors3, ...result.error.issues],
11898
+ failed: failed3 + 1
11899
+ } : { errors: errors3, failed: failed3 })(
11900
+ schema.safeParse(x2)
11901
+ ),
11902
+ { errors: [], failed: 0 }
11903
+ );
11904
+ const passed2 = schemas2.length - failed2;
11905
+ if (passed2 !== 1) {
11906
+ ctx2.addIssue(errors2.length ? {
11907
+ path: [],
11908
+ code: "invalid_union",
11909
+ errors: [errors2],
11910
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11911
+ } : {
11912
+ path: [],
11913
+ code: "custom",
11914
+ errors: [errors2],
11915
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11916
+ });
11917
+ }
11918
+ }).describe("Named signal being targeted."), "value_type": z.literal("binary").describe("Discriminator for binary signals."), "value": z.literal(true).describe("Binary package signal entries match users for whom the signal is true. Use the parent group operator for include/exclude.") }).catchall(z.any()).describe("Binary signal expression. In grouped package targeting, value is always true; use a parent group with operator 'none' for exclusion."), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
11919
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
11920
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
11921
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
11922
+ errors: [...errors3, ...result.error.issues],
11923
+ failed: failed3 + 1
11924
+ } : { errors: errors3, failed: failed3 })(
11925
+ schema.safeParse(x2)
11926
+ ),
11927
+ { errors: [], failed: 0 }
11928
+ );
11929
+ const passed2 = schemas2.length - failed2;
11930
+ if (passed2 !== 1) {
11931
+ ctx2.addIssue(errors2.length ? {
11932
+ path: [],
11933
+ code: "invalid_union",
11934
+ errors: [errors2],
11935
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11936
+ } : {
11937
+ path: [],
11938
+ code: "custom",
11939
+ errors: [errors2],
11940
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11941
+ });
11942
+ }
11943
+ }).describe("Named signal being targeted."), "value_type": z.literal("categorical").describe("Discriminator for categorical signals."), "values": z.array(z.string()).min(1).describe("Values to target. Users with any of these values match the expression.") }).catchall(z.any()).describe("Categorical signal expression - target users with one of the listed values."), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
11944
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
11945
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
11946
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
11947
+ errors: [...errors3, ...result.error.issues],
11948
+ failed: failed3 + 1
11949
+ } : { errors: errors3, failed: failed3 })(
11950
+ schema.safeParse(x2)
11951
+ ),
11952
+ { errors: [], failed: 0 }
11953
+ );
11954
+ const passed2 = schemas2.length - failed2;
11955
+ if (passed2 !== 1) {
11956
+ ctx2.addIssue(errors2.length ? {
11957
+ path: [],
11958
+ code: "invalid_union",
11959
+ errors: [errors2],
11960
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11961
+ } : {
11962
+ path: [],
11963
+ code: "custom",
11964
+ errors: [errors2],
11965
+ message: "Invalid input: Should pass single schema. Passed " + passed2
11966
+ });
11967
+ }
11968
+ }).describe("Named signal being targeted."), "value_type": z.literal("numeric").describe("Discriminator for numeric signals."), "min_value": z.number().describe("Minimum value, inclusive. Omit for no minimum. Should be within the signal definition's range when declared.").optional(), "max_value": z.number().describe("Maximum value, inclusive. Omit for no maximum. Should be within the signal definition's range when declared.").optional() }).catchall(z.any()).and(z.union([z.object({ "min_value": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max_value": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Numeric signal expression - target users within a value range. At least one of min_value or max_value is required. If both min_value and max_value are provided, min_value MUST be <= max_value.")];
11969
+ const { errors, failed } = schemas.reduce(
11970
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
11971
+ errors: [...errors2, ...result.error.issues],
11972
+ failed: failed2 + 1
11973
+ } : { errors: errors2, failed: failed2 })(
11974
+ schema.safeParse(x)
11975
+ ),
11976
+ { errors: [], failed: 0 }
11977
+ );
11978
+ const passed = schemas.length - failed;
11979
+ if (passed !== 1) {
11980
+ ctx.addIssue(errors.length ? {
11981
+ path: [],
11982
+ code: "invalid_union",
11983
+ errors: [errors],
11984
+ message: "Invalid input: Should pass single schema. Passed " + passed
11985
+ } : {
11986
+ path: [],
11987
+ code: "custom",
11988
+ errors: [errors],
11989
+ message: "Invalid input: Should pass single schema. Passed " + passed
11990
+ });
11991
+ }
11992
+ }).describe("Predicate over a named signal definition. Signals are typed dimensions, similar to feature values: binary signals match true, categorical signals match one of a set of values, and numeric signals match a range. In package signal targeting groups, include/exclude semantics are controlled by the parent group operator, not by negating the expression.")).describe("Buy-time selection of one seller-offered signal inside a package signal targeting group. The signal_ref uses scope 'product' for a product-local signal option, scope 'data_provider' for a signal defined in a data provider's published adagents.json signals[], or scope 'signal_source' for a source-native signal that is not published in adagents.json signals[]. The selected product's inline Product.signal_targeting_options, get_signals feed when inline options are omitted, and signal_targeting_rules define buy-time eligibility. Inclusion and exclusion are controlled by the parent group operator: use operator 'any' to include users matching the signal expression and operator 'none' to exclude users matching the signal expression. For binary signals, value MUST be true; do not use value=false for exclusion inside signal_targeting_groups. Use audience_include/audience_exclude only for buyer-managed first-party audiences registered through sync_audiences.")).min(1).describe("Signal targeting entries evaluated by this group. Each entry uses the package signal targeting shape, including signal_ref, value expression, and optional pricing, execution-handle, or activation fields.") }).catchall(z.any()).describe("A basic Boolean group of package-level signal targeting entries. 'any' means the user must match at least one signal in the group. 'none' means the user must match none of the signals in the group. Use groups for portable include/exclude composition such as (A OR B) AND NOT (C OR D).")).min(1).describe("Signal targeting groups to evaluate. Use operator 'any' for include groups and 'none' for exclusion groups.") }).catchall(z.any()).describe("Basic Boolean grouping for seller-offered signals. v1 supports a required top-level operator 'all' and child groups with operator 'any' for include groups or 'none' for exclusion groups. Example semantics: group 1 any(A, B) plus group 2 none(C, D) means (A OR B) AND NOT (C OR D). Signal entries reference named signal definitions with signal_ref scope 'product' for product-local signal options or scope 'data_provider' for external signals published in adagents.json signals[]. For simple include-only targeting, send one child group with operator 'any'. Sellers SHOULD reject entries that are not available for the product through inline signal_targeting_options or get_signals, are not active for the account, or exceed the product's signal_targeting_allowed/signal_targeting_rules/product terms. Signal targeting limits are product-scoped, not declared in get_adcp_capabilities, because products may be backed by different ad servers. Sellers MUST echo applied signal_targeting_groups on the resulting package state, including fixed/default selections. Sellers MAY return REQUOTE_REQUIRED when a targeting mutation changes commercial terms.").optional(), "signal_targeting": z.array(z.any().superRefine((x, ctx) => {
11993
+ const schemas = [z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
11994
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
11995
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
11996
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
11997
+ errors: [...errors3, ...result.error.issues],
11998
+ failed: failed3 + 1
11999
+ } : { errors: errors3, failed: failed3 })(
12000
+ schema.safeParse(x2)
12001
+ ),
12002
+ { errors: [], failed: 0 }
12003
+ );
12004
+ const passed2 = schemas2.length - failed2;
12005
+ if (passed2 !== 1) {
12006
+ ctx2.addIssue(errors2.length ? {
12007
+ path: [],
12008
+ code: "invalid_union",
12009
+ errors: [errors2],
12010
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12011
+ } : {
12012
+ path: [],
12013
+ code: "custom",
12014
+ errors: [errors2],
12015
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12016
+ });
12017
+ }
12018
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
12019
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
12020
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12021
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12022
+ errors: [...errors3, ...result.error.issues],
12023
+ failed: failed3 + 1
12024
+ } : { errors: errors3, failed: failed3 })(
12025
+ schema.safeParse(x2)
12026
+ ),
12027
+ { errors: [], failed: 0 }
12028
+ );
12029
+ const passed2 = schemas2.length - failed2;
12030
+ if (passed2 !== 1) {
12031
+ ctx2.addIssue(errors2.length ? {
12032
+ path: [],
12033
+ code: "invalid_union",
12034
+ errors: [errors2],
12035
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12036
+ } : {
12037
+ path: [],
12038
+ code: "custom",
12039
+ errors: [errors2],
12040
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12041
+ });
12042
+ }
12043
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("binary").describe("Discriminator for binary signals"), "value": z.boolean().describe("Whether to include (true) or exclude (false) users matching this signal") }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Binary signal targeting - user either matches or doesn't"), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
12044
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
12045
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12046
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12047
+ errors: [...errors3, ...result.error.issues],
12048
+ failed: failed3 + 1
12049
+ } : { errors: errors3, failed: failed3 })(
12050
+ schema.safeParse(x2)
12051
+ ),
12052
+ { errors: [], failed: 0 }
12053
+ );
12054
+ const passed2 = schemas2.length - failed2;
12055
+ if (passed2 !== 1) {
12056
+ ctx2.addIssue(errors2.length ? {
12057
+ path: [],
12058
+ code: "invalid_union",
12059
+ errors: [errors2],
12060
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12061
+ } : {
12062
+ path: [],
12063
+ code: "custom",
12064
+ errors: [errors2],
12065
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12066
+ });
12067
+ }
12068
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
12069
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
12070
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12071
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12072
+ errors: [...errors3, ...result.error.issues],
12073
+ failed: failed3 + 1
12074
+ } : { errors: errors3, failed: failed3 })(
12075
+ schema.safeParse(x2)
12076
+ ),
12077
+ { errors: [], failed: 0 }
12078
+ );
12079
+ const passed2 = schemas2.length - failed2;
12080
+ if (passed2 !== 1) {
12081
+ ctx2.addIssue(errors2.length ? {
12082
+ path: [],
12083
+ code: "invalid_union",
12084
+ errors: [errors2],
12085
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12086
+ } : {
12087
+ path: [],
12088
+ code: "custom",
12089
+ errors: [errors2],
12090
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12091
+ });
12092
+ }
12093
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("categorical").describe("Discriminator for categorical signals"), "values": z.array(z.string()).min(1).describe("Values to target. Users with any of these values will be included.") }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Categorical signal targeting - target users with specific values"), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
12094
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
12095
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12096
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12097
+ errors: [...errors3, ...result.error.issues],
12098
+ failed: failed3 + 1
12099
+ } : { errors: errors3, failed: failed3 })(
12100
+ schema.safeParse(x2)
12101
+ ),
12102
+ { errors: [], failed: 0 }
12103
+ );
12104
+ const passed2 = schemas2.length - failed2;
12105
+ if (passed2 !== 1) {
12106
+ ctx2.addIssue(errors2.length ? {
12107
+ path: [],
12108
+ code: "invalid_union",
12109
+ errors: [errors2],
12110
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12111
+ } : {
12112
+ path: [],
12113
+ code: "custom",
12114
+ errors: [errors2],
12115
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12116
+ });
12117
+ }
12118
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
12119
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
12120
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12121
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12122
+ errors: [...errors3, ...result.error.issues],
12123
+ failed: failed3 + 1
12124
+ } : { errors: errors3, failed: failed3 })(
12125
+ schema.safeParse(x2)
12126
+ ),
12127
+ { errors: [], failed: 0 }
12128
+ );
12129
+ const passed2 = schemas2.length - failed2;
12130
+ if (passed2 !== 1) {
12131
+ ctx2.addIssue(errors2.length ? {
12132
+ path: [],
12133
+ code: "invalid_union",
12134
+ errors: [errors2],
12135
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12136
+ } : {
12137
+ path: [],
12138
+ code: "custom",
12139
+ errors: [errors2],
12140
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12141
+ });
12142
+ }
12143
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("numeric").describe("Discriminator for numeric signals"), "min_value": z.number().describe("Minimum value (inclusive). Omit for no minimum. Must be <= max_value when both are provided. Should be >= signal's range.min if defined.").optional(), "max_value": z.number().describe("Maximum value (inclusive). Omit for no maximum. Must be >= min_value when both are provided. Should be <= signal's range.max if defined.").optional() }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Numeric signal targeting - target users within a value range. If min_value is provided, it must be <= max_value. Values should be within the signal's defined range (see signal definition).")];
12144
+ const { errors, failed } = schemas.reduce(
12145
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
12146
+ errors: [...errors2, ...result.error.issues],
12147
+ failed: failed2 + 1
12148
+ } : { errors: errors2, failed: failed2 })(
12149
+ schema.safeParse(x)
12150
+ ),
12151
+ { errors: [], failed: 0 }
12152
+ );
12153
+ const passed = schemas.length - failed;
12154
+ if (passed !== 1) {
12155
+ ctx.addIssue(errors.length ? {
12156
+ path: [],
12157
+ code: "invalid_union",
12158
+ errors: [errors],
12159
+ message: "Invalid input: Should pass single schema. Passed " + passed
12160
+ } : {
12161
+ path: [],
12162
+ code: "custom",
12163
+ errors: [errors],
12164
+ message: "Invalid input: Should pass single schema. Passed " + passed
12165
+ });
12166
+ }
12167
+ }).describe("Targeting constraint for a specific signal. Uses value_type as discriminator to determine the targeting expression format.")).min(1).describe("DEPRECATED. Use signal_targeting_groups for package-level signal targeting. Legacy flat signal_targeting remains accepted during the SignalRef migration window but cannot express grouped include/exclude composition or product-scoped pricing.").optional(), "demographics": z.object({ "age": z.intersection(z.object({ "min": z.number().int().gte(0).lte(150).describe("Inclusive minimum age in completed years. Omit for an open lower bound.").optional(), "max": z.number().int().gte(0).lte(150).describe("Inclusive maximum age in completed years. Omit for an open upper bound.").optional(), "include_unknown": z.boolean().describe("Whether delivery to people whose age is unavailable is part of this predicate. This field has no default and MUST be supplied.") }).catchall(z.any()).and(z.union([z.object({ "min": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("A canonical audience-age predicate in completed integer years. min and max are inclusive; omitting one bound means no restriction in that direction. At least one bound is required. include_unknown is always explicit because people whose age is unavailable are not members of any numeric interval. Implementations MUST reject min greater than max; JSON Schema draft-07 cannot compare sibling numeric values."), z.object({ "accepted_bases": z.array(z.enum(["verified", "declared", "inferred"]).describe("User-level bases that may resolve age for demographic targeting execution. Population estimates are deliberately absent because aggregate composition cannot establish an individual impression's age.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("User-level age determination bases the buyer permits for this predicate. Sellers MUST use only these bases or reject the request; they MUST NOT silently fall back to another basis. When omitted, the buyer imposes no determination-basis constraint beyond product capability and any age_restriction. population_estimate is structurally unavailable because aggregate evidence cannot identify an eligible user.").optional(), "accepted_verification_methods": z.array(z.enum(["facial_age_estimation", "id_document", "digital_id", "credit_card", "world_id"]).describe("Methods for verifying user age for compliance. Does not include 'inferred' as it is not accepted for regulatory compliance.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Verification methods acceptable when verified is an accepted basis. This field narrows verified demographic execution; age_restriction.accepted_methods independently governs legal eligibility and the two sets are intersected when both are present.").optional() }).catchall(z.any()).and(z.union([z.any().refine((value) => !z.object({ "accepted_verification_methods": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "accepted_verification_methods": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "accepted_bases": z.any().refine((value) => !z.array(z.any().refine((value2) => !z.literal("verified").safeParse(value2).success, "Invalid input: Should NOT be valid against schema")).safeParse(value).success, "Invalid input: Should NOT be valid against schema") }))]))) }).catchall(z.any()).describe("Canonical demographic audience targeting intent with optional constraints on how age may be determined. This is distinct from age_restriction: demographics selects an audience, while age_restriction expresses a legal eligibility or verification floor. Fresh create/update targeting MUST compile exactly or be rejected. During get_products, a seller may offer a different configured predicate only through sparse targeting_resolution modifications on a distinguishable product_id; selecting that product accepts the alternative. Sellers never silently broaden, narrow, default, drop, or substitute the basis.").optional(), "frequency_cap": z.object({ "suppress": z.object({ "interval": z.number().int().gte(1).describe("Number of time units. Must be 1 when unit is 'campaign'."), "unit": z.enum(["seconds", "minutes", "hours", "days", "campaign"]).describe("Time unit. 'seconds' for sub-minute precision. 'campaign' spans the full campaign flight.") }).strict().describe("A time duration expressed as an interval and unit. Used for frequency cap windows, attribution windows, reach optimization windows, time budgets, and other time-based settings. When unit is 'campaign', interval must be 1 \u2014 the window spans the full campaign flight.").describe('Cooldown period between consecutive exposures to the same entity. Prevents back-to-back ad delivery (e.g. {"interval": 60, "unit": "minutes"} for a 1-hour cooldown). Preferred over suppress_minutes.').optional(), "suppress_minutes": z.number().gte(0).describe("Deprecated \u2014 use suppress instead. Cooldown period in minutes between consecutive exposures to the same entity (e.g. 60 for a 1-hour cooldown).").optional(), "max_impressions": z.number().int().gte(1).describe("Maximum number of impressions per entity per window. For duration windows, implementations typically use a rolling window. campaign applies across the owning field's full flight: the package flight for a targeting overlay, or the MediaBuy flight for a root cap.").optional(), "per": z.enum(["individuals", "households", "devices", "accounts", "cookies", "custom"]).describe("Unit of measurement for reach and audience size metrics. Different channels and measurement providers count reach in fundamentally different units, making cross-channel comparison impossible without declaring the unit.").describe("Entity granularity for impression counting. Required when max_impressions is set.").optional(), "window": z.object({ "interval": z.number().int().gte(1).describe("Number of time units. Must be 1 when unit is 'campaign'."), "unit": z.enum(["seconds", "minutes", "hours", "days", "campaign"]).describe("Time unit. 'seconds' for sub-minute precision. 'campaign' spans the full campaign flight.") }).strict().describe("A time duration expressed as an interval and unit. Used for frequency cap windows, attribution windows, reach optimization windows, time budgets, and other time-based settings. When unit is 'campaign', interval must be 1 \u2014 the window spans the full campaign flight.").describe('Time window for the max_impressions cap (e.g. {"interval": 7, "unit": "days"} or {"interval": 1, "unit": "campaign"} for the full flight). Required when max_impressions is set.').optional() }).catchall(z.any()).and(z.union([z.object({ "suppress": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "suppress_minutes": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).and(z.intersection(z.union([z.any().refine((value) => !z.object({ "max_impressions": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "max_impressions": z.any().refine((value) => value !== void 0, "Required"), "per": z.any().refine((value) => value !== void 0, "Required"), "window": z.any().refine((value) => value !== void 0, "Required") }).passthrough()]), z.intersection(z.union([z.any().refine((value) => !z.object({ "per": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "per": z.any().refine((value) => value !== void 0, "Required"), "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()]), z.union([z.any().refine((value) => !z.object({ "window": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "window": z.any().refine((value) => value !== void 0, "Required"), "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])))).describe("Frequency capping settings for package-level application. Two types of frequency control can be used independently or together: suppress enforces a cooldown between consecutive exposures; max_impressions + per + window caps total exposures per entity in a time window. When both suppress and max_impressions are set, an impression is delivered only if both constraints permit it (AND semantics). At least one of suppress, suppress_minutes, or max_impressions must be set. Field location determines scope; this value has no scope discriminator. The MediaBuy root uses the narrower media-buy-frequency-cap schema, which permits maximum impressions only in 3.2.").optional(), "property_list": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the property list"), "list_id": z.string().min(1).describe("Identifier for the property list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a property list for targeting specific properties within this product. The package runs on the intersection of the product's publisher_properties and this list. Sellers SHOULD return a validation error if the product has property_targeting_allowed: false.").optional(), "property_list_exclude": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the property list"), "list_id": z.string().min(1).describe("Identifier for the property list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a property list whose properties must not carry the buyer's ads. Matched properties are removed from delivery. Use for brand-safety do-not-run lists (apps, sites). Exclude wins on overlap with property_list, and applies regardless of the product's property_targeting_allowed flag. Seller must declare support in get_adcp_capabilities.").optional(), "collection_list": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the collection list"), "list_id": z.string().min(1).describe("Identifier for the collection list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a collection list for including specific collections (programs, publications, channels) within this product. The package runs on the intersection of matched collections and this list. Use for inclusion-based collection targeting. Seller must declare support in get_adcp_capabilities.").optional(), "collection_list_exclude": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the collection list"), "list_id": z.string().min(1).describe("Identifier for the collection list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a collection list for excluding specific collections (programs, publications, channels) from this product. Matched collections must not carry the buyer's ads. Use for brand safety do-not-air lists. Seller must declare support in get_adcp_capabilities.").optional(), "placement_selection": z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
12168
+ const schemas = [z.object({ "mode": z.literal("selected"), "placement_refs": z.array(z.union([z.intersection(z.object({ "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain where the adagents.json declaring a publisher-catalog placement is hosted, or the inventory publisher associated with an inline placement. Omitted only for legacy single-publisher product-context references.").optional(), "placement_id": z.string().describe("Placement ID from the publisher's adagents.json placement catalog, or an inline seller-defined placement ID interpreted within the enclosing seller and product context.") }).catchall(z.any()).describe("Legacy-compatible product-context reference to a placement. For publisher-catalog placements, publisher_domain plus placement_id resolves the declaration in that publisher's adagents.json. For seller-inline placements, the enclosing seller and product supply scope. When publisher_domain is omitted on legacy inputs, receivers MAY interpret the ID relative to the enclosing single-publisher product. Use placement-identity.json when a self-contained cross-document identity is required."), z.object({ "publisher_domain": z.any().refine((value) => value !== void 0, "Required") }).passthrough()), z.any().superRefine((x2, ctx2) => {
12169
+ const schemas2 = [z.object({ "kind": z.literal("publisher_ref"), "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain whose adagents.json declares placement_id."), "placement_id": z.string().min(1) }).strict(), z.object({ "kind": z.literal("seller_inline"), "seller_agent": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("The seller agent's API endpoint URL as declared in the property publisher's adagents.json `authorized_agents[].url`. MUST use the `https://` scheme. Receivers compare this URL against the `authorized_agents` list using the AdCP URL canonicalization rules \u2014 not byte-equality \u2014 and reject mismatches with `seller_not_authorized`. See docs/reference/url-canonicalization."), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).min(1).describe("Reserved for a future registry-assigned stable seller identifier. Not used today \u2014 senders MUST NOT populate this field until a registry is defined. When a future release populates both `agent_url` and `id`, `agent_url` remains authoritative and `id` is advisory.").optional() }).strict().describe("Sales agent that defines and maintains the inline placement namespace."), "placement_id": z.string().min(1).describe("Stable placement ID within the defining sales agent's namespace. The agent MUST NOT reuse it for a different semantic placement.") }).strict()];
12170
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
12171
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
12172
+ errors: [...errors3, ...result.error.issues],
12173
+ failed: failed3 + 1
12174
+ } : { errors: errors3, failed: failed3 })(
12175
+ schema.safeParse(x2)
12176
+ ),
12177
+ { errors: [], failed: 0 }
12178
+ );
12179
+ const passed2 = schemas2.length - failed2;
12180
+ if (passed2 !== 1) {
12181
+ ctx2.addIssue(errors2.length ? {
12182
+ path: [],
12183
+ code: "invalid_union",
12184
+ errors: [errors2],
12185
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12186
+ } : {
12187
+ path: [],
12188
+ code: "custom",
12189
+ errors: [errors2],
12190
+ message: "Invalid input: Should pass single schema. Passed " + passed2
12191
+ });
12192
+ }
12193
+ }).describe("Self-contained identity for either a publisher-catalog placement or a sales-agent-defined inline placement. The discriminator names which authority owns placement_id.")])).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Complete required placement set. A reference normally identifies a mode targetable placement. It MAY identify a mode included placement only when the set exactly equals the product's complete fixed included set, which is an inherent match rather than independent selection. Legacy publisher refs use {publisher_domain, placement_id}; authority-discriminated 3.2 identities use placement-identity.json so seller-inline inventory is selected by {seller_agent, placement_id}. An item that exactly matches placement-identity uses that canonical identity; otherwise a released-compatible item with publisher_domain and placement_id uses legacy product-context matching, and tolerated product metadata such as kind, name, or mode has no selection effect."), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict(), z.object({ "mode": z.literal("default"), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict()];
12194
+ const { errors, failed } = schemas.reduce(
12195
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
12196
+ errors: [...errors2, ...result.error.issues],
12197
+ failed: failed2 + 1
12198
+ } : { errors: errors2, failed: failed2 })(
12199
+ schema.safeParse(x)
12200
+ ),
12201
+ { errors: [], failed: 0 }
12202
+ );
12203
+ const passed = schemas.length - failed;
12204
+ if (passed !== 1) {
12205
+ ctx.addIssue(errors.length ? {
12206
+ path: [],
12207
+ code: "invalid_union",
12208
+ errors: [errors],
12209
+ message: "Invalid input: Should pass single schema. Passed " + passed
12210
+ } : {
12211
+ path: [],
12212
+ code: "custom",
12213
+ errors: [errors],
12214
+ message: "Invalid input: Should pass single schema. Passed " + passed
12215
+ });
12216
+ }
12217
+ })).describe("Purchased placement selection within the product. This constrains package inventory; it is distinct from creative_assignments[].placement_refs, which only route individual creatives within the purchased set. On create, mode selected supplies the complete selected set and mode default uses the product default. In request-side Targeting Input, a non-null value replaces this dimension, omission preserves or inherits it, and null clears it when the product permits that broader inventory set.").optional(), "collection_selection": z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
12218
+ const schemas = [z.object({ "mode": z.literal("selected"), "collections": z.array(z.intersection(z.object({ "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain where the adagents.json declaring these collections is hosted (e.g., 'mrbeast.com'). The collections array in that file contains the authoritative collection definitions."), "collection_ids": z.array(z.string()).min(1).describe("Collection IDs from the adagents.json collections array. Each ID must match a collection_id declared in that file. Omit to reference all collections declared in that file.").optional() }).catchall(z.any()).describe("References collections declared in an adagents.json. Buyers resolve full collection objects by fetching the adagents.json at the given domain and matching collection_ids against its collections array. When collection_ids is omitted, the selector references every collection declared in that adagents.json \u2014 the bulk-grant form for authorization scoping (e.g., a host authorizing a channel owner's sales agent for all of the owner's collections without tracking owner-assigned IDs)."), z.object({ "collection_ids": z.any().refine((value) => value !== void 0, "Required") }).passthrough())).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Complete required collection set as domain-qualified selectors with explicit collection_ids; the domain-only bulk-grant form is authorization scoping, not selection. publisher_domain may be an external channel owner's domain."), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict(), z.object({ "mode": z.literal("default"), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict()];
12219
+ const { errors, failed } = schemas.reduce(
12220
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
12221
+ errors: [...errors2, ...result.error.issues],
12222
+ failed: failed2 + 1
12223
+ } : { errors: errors2, failed: failed2 })(
12224
+ schema.safeParse(x)
12225
+ ),
12226
+ { errors: [], failed: 0 }
12227
+ );
12228
+ const passed = schemas.length - failed;
12229
+ if (passed !== 1) {
12230
+ ctx.addIssue(errors.length ? {
12231
+ path: [],
12232
+ code: "invalid_union",
12233
+ errors: [errors],
12234
+ message: "Invalid input: Should pass single schema. Passed " + passed
12235
+ } : {
12236
+ path: [],
12237
+ code: "custom",
12238
+ errors: [errors],
12239
+ message: "Invalid input: Should pass single schema. Passed " + passed
12240
+ });
12241
+ }
12242
+ })).describe("Purchased collection selection within the product. On create, mode selected supplies the complete selected set and mode default uses the product's full bundle. On package readback this is the committed selection sellers MUST echo as concrete selectors, materializing any collection_list composition; collection_list fields remain the buyer-managed list mechanism. In request-side Targeting Input, a non-null value replaces this dimension, omission preserves or inherits it, and null clears it when the product permits that broader inventory set.").optional(), "age_restriction": z.object({ "min": z.number().int().gte(13).lte(99).describe("Minimum age required"), "verification_required": z.boolean().describe("Whether verified age (not inferred) is required for compliance").default(false), "accepted_methods": z.array(z.enum(["facial_age_estimation", "id_document", "digital_id", "credit_card", "world_id"]).describe("Methods for verifying user age for compliance. Does not include 'inferred' as it is not accepted for regulatory compliance.")).min(1).describe("Accepted verification methods. If omitted, any method the platform supports is acceptable.").optional() }).strict().describe("Age restriction for compliance. Use for legal requirements (alcohol, gambling), not audience targeting.").optional(), "device_platform": z.array(z.enum(["ios", "android", "windows", "macos", "linux", "chromeos", "tvos", "tizen", "webos", "fire_os", "roku_os", "unknown"]).describe("Operating system platforms for device targeting. Browser values from Sec-CH-UA-Platform standard, extended for CTV.")).min(1).describe("Restrict to specific platforms. Use for technical compatibility (app only works on iOS). Values from Sec-CH-UA-Platform standard, extended for CTV.").optional(), "device_platform_exclude": z.array(z.enum(["ios", "android", "windows", "macos", "linux", "chromeos", "tvos", "tizen", "webos", "fire_os", "roku_os", "unknown"]).describe("Operating system platforms for device targeting. Browser values from Sec-CH-UA-Platform standard, extended for CTV.")).min(1).describe("Exclude specific operating-system platforms from delivery. When a platform appears in both device_platform and device_platform_exclude, exclusion wins. Sellers MUST reject a request they cannot enforce rather than silently dropping the exclusion.").optional(), "device_type": z.array(z.enum(["desktop", "mobile", "tablet", "ctv", "dooh", "unknown"]).describe("Device form factor categories for targeting and reporting. Complements device-platform (operating system) with hardware classification. OpenRTB mapping: 1 (Mobile/Tablet General) \u2192 mobile, 2 (PC) \u2192 desktop, 4 (Phone) \u2192 mobile, 5 (Tablet) \u2192 tablet, 6 (Connected Device) \u2192 ctv, 7 (Set Top Box) \u2192 ctv. DOOH inventory uses dooh.")).min(1).describe("Restrict to specific device form factors. Use for campaigns targeting hardware categories rather than operating systems (e.g., mobile-only promotions, CTV campaigns).").optional(), "device_type_exclude": z.array(z.enum(["desktop", "mobile", "tablet", "ctv", "dooh", "unknown"]).describe("Device form factor categories for targeting and reporting. Complements device-platform (operating system) with hardware classification. OpenRTB mapping: 1 (Mobile/Tablet General) \u2192 mobile, 2 (PC) \u2192 desktop, 4 (Phone) \u2192 mobile, 5 (Tablet) \u2192 tablet, 6 (Connected Device) \u2192 ctv, 7 (Set Top Box) \u2192 ctv. DOOH inventory uses dooh.")).min(1).describe("Exclude specific device form factors from delivery (e.g., exclude CTV for app-install campaigns).").optional(), "browser": z.array(z.enum(["chrome", "safari", "firefox", "edge", "opera", "samsung_internet", "android_webview", "other", "unknown"]).describe("Portable browser families for targeting the impression delivery and rendering environment, not a post-click landing-page browser. Values identify browser families, not versions or seller-native browser IDs, and MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. android_webview means an impression reliably classified as rendering in Android WebView. other means a seller-recognized browser family that is not explicitly enumerated; unknown means the seller cannot classify the browser into a recognized family.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Restrict delivery to specific canonical browser families in the impression delivery and rendering environment, not the post-click landing-page browser. Values MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. Values in this array use OR semantics. When browser is supplied, families not listed are ineligible: other includes a seller-recognized family that is not explicitly enumerated, while unknown includes a browser the seller cannot classify into a recognized family. When the same family appears in browser and browser_exclude, exclusion wins. Browser and device constraints intersect; a seller that cannot enforce the exact combination MUST exclude or explicitly reconfigure the product during discovery and MUST reject it at create or update rather than silently widening delivery. Browser versions and seller-native IDs are intentionally unsupported.").optional(), "browser_exclude": z.array(z.enum(["chrome", "safari", "firefox", "edge", "opera", "samsung_internet", "android_webview", "other", "unknown"]).describe("Portable browser families for targeting the impression delivery and rendering environment, not a post-click landing-page browser. Values identify browser families, not versions or seller-native browser IDs, and MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. android_webview means an impression reliably classified as rendering in Android WebView. other means a seller-recognized browser family that is not explicitly enumerated; unknown means the seller cannot classify the browser into a recognized family.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Exclude specific canonical browser families from delivery. other excludes seller-recognized families that are not explicitly enumerated; unknown excludes browsers the seller cannot classify into a recognized family. When the same family appears in browser and browser_exclude, exclusion wins. Sellers MUST reject a request they cannot enforce rather than silently dropping the exclusion.").optional(), "store_catchments": z.array(z.object({ "catalog_id": z.string().describe("Synced store-type catalog ID from sync_catalogs."), "store_ids": z.array(z.string()).min(1).describe("Filter to specific stores within the catalog. Omit to target all stores.").optional(), "catchment_ids": z.array(z.string()).min(1).describe("Catchment zone IDs to target (e.g., 'walk', 'drive'). Omit to target all catchment zones.").optional() }).catchall(z.any())).min(1).describe("Target users within store catchment areas from a synced store catalog. Each entry references a store-type catalog and optionally narrows to specific stores or catchment zones.").optional(), "geo_proximity": z.array(z.object({ "lat": z.number().gte(-90).lte(90).describe("Latitude in decimal degrees (WGS 84). Required for travel_time and radius methods.").optional(), "lng": z.number().gte(-180).lte(180).describe("Longitude in decimal degrees (WGS 84). Required for travel_time and radius methods.").optional(), "label": z.string().describe("Human-readable label for this entry (e.g., 'D\xFCsseldorf', 'Heathrow Airport', 'Primary trade area').").optional(), "travel_time": z.object({ "value": z.number().gte(1).describe("Travel time limit."), "unit": z.enum(["min", "hr"]).describe("Time unit for isochrone (travel-time catchment) calculations.") }).strict().describe("Travel time limit for isochrone calculation. The platform resolves this to a geographic boundary based on actual transportation networks.").optional(), "transport_mode": z.enum(["walking", "cycling", "driving", "public_transport"]).describe("Transportation mode for isochrone calculation. Required when travel_time is provided.").optional(), "radius": z.object({ "value": z.number().gt(0).describe("Radius distance."), "unit": z.enum(["km", "mi", "m"]).describe("Distance unit.") }).strict().describe("Simple radius from the point. The platform draws a circle of this distance around the coordinates.").optional(), "geometry": z.object({ "type": z.enum(["Polygon", "MultiPolygon"]).describe("GeoJSON geometry type."), "coordinates": z.array(z.any()).describe("GeoJSON coordinates array. For Polygon: array of linear rings. For MultiPolygon: array of polygons.") }).strict().describe("Pre-computed GeoJSON geometry defining the proximity boundary. Use when the buyer has already calculated isochrones (via TravelTime, Mapbox, etc.) or has custom boundaries. When geometry is provided, lat/lng are not required.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).catchall(z.any()).and(z.any().superRefine((x, ctx) => {
12243
+ const schemas = [z.object({ "lat": z.any().refine((value) => value !== void 0, "Required"), "lng": z.any().refine((value) => value !== void 0, "Required"), "travel_time": z.any().refine((value) => value !== void 0, "Required"), "transport_mode": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "lat": z.any().refine((value) => value !== void 0, "Required"), "lng": z.any().refine((value) => value !== void 0, "Required"), "radius": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "geometry": z.any().refine((value) => value !== void 0, "Required") }).passthrough()];
12244
+ const { errors, failed } = schemas.reduce(
12245
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
12246
+ errors: [...errors2, ...result.error.issues],
12247
+ failed: failed2 + 1
12248
+ } : { errors: errors2, failed: failed2 })(
12249
+ schema.safeParse(x)
12250
+ ),
12251
+ { errors: [], failed: 0 }
12252
+ );
12253
+ const passed = schemas.length - failed;
12254
+ if (passed !== 1) {
12255
+ ctx.addIssue(errors.length ? {
12256
+ path: [],
12257
+ code: "invalid_union",
12258
+ errors: [errors],
12259
+ message: "Invalid input: Should pass single schema. Passed " + passed
12260
+ } : {
12261
+ path: [],
12262
+ code: "custom",
12263
+ errors: [errors],
12264
+ message: "Invalid input: Should pass single schema. Passed " + passed
12265
+ });
12266
+ }
12267
+ }))).min(1).describe("Target users within travel time, distance, or a custom boundary around arbitrary geographic points. Multiple entries use OR semantics \u2014 a user within range of any listed point is eligible. For campaigns targeting 10+ locations, consider using store_catchments with a location catalog instead. Seller must declare support in get_adcp_capabilities.").optional(), "language": z.array(z.string().regex(new RegExp("^(?:[a-z]{2,8}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?(?:-(?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*(?:-[0-9a-wy-z](?:-[a-z0-9]{2,8})+)*(?:-x(?:-[a-z0-9]{1,8})+)?|x(?:-[a-z0-9]{1,8})+)$")).min(2).max(63).describe("A well-formed BCP 47 language tag used by AdCP only as language identity. Script and region may refine that identity; other valid BCP 47 subtags remain part of tag matching but do not make this a general locale-settings object. It does not determine currency, time zone, number/date formatting, market, or legal jurisdiction. The AdCP canonical wire profile requires lower-case language and variants, title-case script, and upper-case region (for example `en-US`, `zh-Hant-TW`, or `x-private`). RFC 5646 comparisons are case-insensitive and its case regularization is optional; AdCP intentionally requires this stricter single wire spelling and receivers MUST reject differently cased tags rather than silently normalizing them. The schema pattern enforces the AdCP casing profile and extension structure for commonly used tags; conforming receivers additionally validate the complete RFC 5646 grammar and registry rules. Every new AdCP field carrying BCP 47 language identity or a concrete language range MUST reference this schema instead of declaring independent string constraints.")).min(1).describe("Restrict to users with specific language preferences using canonical BCP 47 language ranges. Each buyer range is evaluated against a user's language-preference tag with RFC 4647 section 3.3.1 Basic Filtering: 'fr' matches 'fr', 'fr-CA', and 'fr-FR', while 'fr-CA' matches 'fr-CA' and more-specific descendants but not 'fr' or 'fr-FR'. Values use OR logic.").optional(), "keyword_targets": z.array(z.object({ "keyword": z.string().min(1).describe("The keyword to target"), "match_type": z.enum(["broad", "phrase", "exact"]).describe("Keyword targeting match type. broad: ads may serve on queries semantically related to the keyword. phrase: ads serve when the query contains the keyword phrase. exact: ads serve only when the query matches the keyword exactly."), "bid_price": z.number().gte(0).describe("Per-keyword bid price, denominated in the same currency as the package's pricing option. Overrides the package-level bid_price for this keyword. Inherits the max_bid interpretation from the pricing option: when max_bid is true, this is the keyword's bid ceiling; when false, this is the exact bid. If omitted, the package bid_price applies.").optional() }).strict()).min(1).describe("Keyword targeting for search and retail media platforms. Restricts delivery to queries matching the specified keywords. Each keyword is identified by the tuple (keyword, match_type) \u2014 the same keyword string with different match types are distinct targets. Sellers SHOULD reject duplicate (keyword, match_type) pairs within a single request. Seller must declare support in get_adcp_capabilities.").optional(), "negative_keywords": z.array(z.object({ "keyword": z.string().min(1).describe("The keyword to exclude"), "match_type": z.enum(["broad", "phrase", "exact"]).describe("Keyword targeting match type. broad: ads may serve on queries semantically related to the keyword. phrase: ads serve when the query contains the keyword phrase. exact: ads serve only when the query matches the keyword exactly.") }).strict().describe("An excluded keyword.")).min(1).describe("Keywords to exclude from delivery. Queries matching these keywords will not trigger the ad. Each negative keyword is identified by the tuple (keyword, match_type). Seller must declare support in get_adcp_capabilities.").optional() }).catchall(z.any()).describe("Strict non-null targeting state used during product discovery, commercial snapshots, and media-buy readback. Targeting includes both audience eligibility and purchased-inventory selection: geography, demographics, placements, properties, collections, device compatibility, language, keywords, and other explicit controls. Sellers resolve requested outcomes against inherent product scope or selectable execution. Request-side create and update mutations use targeting-input.json so null can explicitly clear one dimension; resolved effective targeting omits cleared dimensions and MUST NOT contain null. A fresh create/update request MUST be applied exactly or rejected; get_products may instead return a request-scoped configured product with sparse, buyer-reviewable targeting_resolution modifications.");
12268
+ const exactSchema = objectSchema.superRefine((value, ctx) => {
12269
+ const checked = z.intersection(z.union([z.any().refine((value2) => !z.object({ "demographics": z.any().refine((value3) => value3 !== void 0, "Required"), "age_restriction": z.any().refine((value3) => value3 !== void 0, "Required") }).passthrough().safeParse(value2).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "demographics": z.any().refine((value2) => value2 !== void 0, "Required"), "age_restriction": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough(), z.object({ "demographics": z.object({ "age": z.object({ "include_unknown": z.literal(false).optional() }).optional() }).optional() }))]).describe("Unknown-age delivery cannot satisfy a minimum-age eligibility policy. When demographic audience targeting and age_restriction are both present, include_unknown must be false."), z.union([z.any().refine((value2) => !z.object({ "age_restriction": z.object({ "verification_required": z.literal(true) }), "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value3) => value3 !== void 0, "Required") }).passthrough() }) }).safeParse(value2).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "age_restriction": z.object({ "verification_required": z.literal(true) }), "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough() }) }), z.object({ "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value2) => !z.array(z.any().refine((value3) => !z.literal("verified").safeParse(value3).success, "Invalid input: Should NOT be valid against schema")).safeParse(value2).success, "Invalid input: Should NOT be valid against schema").optional() }).optional() }).optional() }))]).describe("A legal verification requirement always narrows demographic targeting. When the buyer supplies accepted_bases and age_restriction requires verification, verified must be accepted; otherwise the constraints have an empty intersection and the request is invalid.")).safeParse(value);
12270
+ if (!checked.success) {
12271
+ for (const issue of checked.error.issues) {
12272
+ ctx.addIssue({ code: "custom", path: issue.path, message: issue.message });
12273
+ }
12274
+ }
12275
+ });
12276
+ return Object.assign(exactSchema, {
12277
+ pick: objectSchema.pick.bind(objectSchema),
12278
+ omit: objectSchema.omit.bind(objectSchema),
12279
+ extend: objectSchema.extend.bind(objectSchema)
12280
+ });
12281
+ })();
12282
+ const DeliveryForecast1Schema = DeliveryForecastSchema;
12283
+ const GetProductsAsyncInputRequiredSchema = z.object({
12284
+ reason: z.union([z.literal("CLARIFICATION_NEEDED"), z.literal("BUDGET_REQUIRED")]).optional(),
12285
+ partial_results: z.array(ProductSchema).optional(),
12286
+ suggestions: z.array(z.string()).optional(),
12287
+ context: ContextObjectSchema.optional(),
12288
+ ext: ExtensionObjectSchema.optional()
12289
+ }).passthrough();
12290
+ const ProductPurchaseSchema = z.object({
12291
+ product_id: z.string().min(1),
12292
+ pricing_option_id: z.string().min(1),
12293
+ pricing: CanonicalPricingOptionSchema.optional(),
12294
+ format_option_refs: z.array(FormatOptionReferenceSchema).optional(),
12295
+ catalog_ids: z.array(z.string()).optional(),
12296
+ budget: z.number().gte(0).optional(),
12297
+ daily_budget_cap: z.number().gte(0).optional(),
12298
+ min_spend_target: z.number().gte(0).optional(),
12299
+ impressions: ProductPurchaseImpressionsSchema.optional(),
12300
+ start_time: z.string().refine(adcpJsonSchemaDateTime, "Invalid date-time").optional(),
12301
+ end_time: z.string().refine(adcpJsonSchemaDateTime, "Invalid date-time").optional(),
12302
+ pacing: PacingSchema.optional(),
12303
+ bidding: BiddingPolicySchema.optional(),
12304
+ targeting_overlay: TargetingOverlaySchema.optional(),
12305
+ optimization_goals: z.array(CanonicalOptimizationGoalSchema).optional(),
12306
+ audience_evidence_requirements: ProductPurchaseAudienceEvidenceRequirementsSchema.optional(),
12307
+ audience_evidence_pins: z.array(AudienceEvidencePinSchema).optional(),
12308
+ agency_estimate_number: z.string().max(100).optional(),
12309
+ context: ContextObjectSchema.optional(),
12310
+ ext: ExtensionObjectSchema.optional(),
12311
+ measurement_terms: ProductPurchaseMeasurementTermsSchema.optional(),
12312
+ performance_standards: z.array(CanonicalPerformanceStandardSchema).optional()
12313
+ }).passthrough();
12314
+ const CanonicalForecastPointSchema = z.object({
12315
+ label: z.string().max(128).optional(),
12316
+ budget: z.number().gte(0).optional(),
12317
+ product_id: z.string().optional(),
12318
+ dimensions: ForecastPointDimensionsSchema.optional(),
12319
+ availability_status: AvailabilityStatusSchema.optional(),
12320
+ metrics: z.object({
12321
+ coverage_rate: ForecastRateRangeSchema.optional()
12322
+ }).passthrough().catchall(ForecastRangeSchema),
12323
+ viewability: z.union([z.object({}).passthrough(), z.object({}).passthrough()]).optional(),
12324
+ vendor_metric_values: z.array(CanonicalForecastVendorMetricValueSchema).optional()
12325
+ }).passthrough();
12326
+ const CreativeAssetValueSchema = z.unknown().superRefine((value, ctx) => {
12327
+ const variants = Array.isArray(value) ? value : [value];
12328
+ if (variants.length === 0 || variants.some((variant) => !AssetVariantSchema.safeParse(variant).success)) {
12329
+ ctx.addIssue({
12330
+ code: "custom",
12331
+ message: "creative slot must contain an asset or non-empty array of assets"
12332
+ });
12333
+ }
12334
+ });
12335
+ const CreativeAssetsRuntimeSchema = z.record(z.string(), z.unknown()).superRefine((assets, ctx) => {
12336
+ for (const [slotKey, assetValue] of Object.entries(assets)) {
12337
+ if (/^[a-z0-9_]+$/.test(slotKey) && !CreativeAssetValueSchema.safeParse(assetValue).success) {
12338
+ ctx.addIssue({
12339
+ code: "custom",
12340
+ path: [slotKey],
12341
+ message: "creative slot must contain an asset or non-empty array of assets"
12342
+ });
12343
+ }
12344
+ }
12345
+ });
12346
+ const CreativeManifestSchema = z.object({}).passthrough().merge(z.object({
12347
+ format_id: FormatReferenceStructuredObjectSchema.optional(),
12348
+ format_kind: CanonicalFormatKindSchema.optional(),
12349
+ format_option_ref: FormatOptionReferenceSchema.optional(),
12350
+ representation_selection: RepresentationSelectionSchema.optional(),
12351
+ assets: CreativeAssetsRuntimeSchema,
12352
+ component_assets: z.record(z.string(), CreativeAssetsSchema).optional(),
12353
+ brand: BrandReferenceSchema.optional(),
12354
+ rights: z.array(RightsConstraintSchema).optional(),
12355
+ industry_identifiers: z.array(IndustryIdentifierSchema).optional(),
12356
+ provenance: ProvenanceSchema.optional(),
12357
+ ext: ExtensionObjectSchema.optional()
12358
+ }).passthrough()).superRefine((value, ctx) => {
12359
+ const hasFormatId = value.format_id !== void 0;
12360
+ const hasFormatKind = value.format_kind !== void 0;
12361
+ if (hasFormatId === hasFormatKind) {
12362
+ ctx.addIssue({
12363
+ code: "custom",
12364
+ path: [],
12365
+ message: "creative identity requires exactly one of format_id or format_kind"
12366
+ });
12367
+ }
12368
+ if ("capability_id" in value || "capability_ref" in value) {
12369
+ ctx.addIssue({
12370
+ code: "custom",
12371
+ path: [],
12372
+ message: "creative identity does not allow capability_id or capability_ref"
12373
+ });
12374
+ }
12375
+ });
12376
+ const BuildCreativeMultiSuccessSchema = z.object({
12377
+ creative_manifests: z.array(CreativeManifestSchema),
12378
+ sandbox: z.boolean().optional(),
12379
+ expires_at: z.iso.datetime().optional(),
12380
+ preview: z.object({
12381
+ previews: z.array(z.object({
12382
+ preview_id: z.string(),
12383
+ format_id: FormatReferenceStructuredObjectSchema.optional(),
12384
+ capability_id: z.string().regex(/^[a-zA-Z0-9_-]+$/).optional(),
12385
+ renders: z.array(PreviewRenderSchema),
12386
+ input: z.object({
12387
+ name: z.string(),
12388
+ macros: z.record(z.string(), z.string()).optional(),
12389
+ context_description: z.string().optional()
12390
+ }).passthrough()
12391
+ }).passthrough()),
12392
+ interactive_url: z.string().optional(),
12393
+ expires_at: z.iso.datetime()
12394
+ }).passthrough().optional(),
12395
+ preview_error: ErrorSchema.optional(),
12396
+ pricing_option_id: z.string().optional(),
12397
+ vendor_cost: z.number().min(0).optional(),
12398
+ currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12399
+ consumption: CreativeConsumptionSchema.optional(),
12400
+ context: ContextObjectSchema.optional(),
12401
+ ext: ExtensionObjectSchema.optional()
12402
+ }).passthrough();
12403
+ const BuildCreativeVariantSuccessSchema = z.object({
12404
+ creatives: z.array(z.object({
12405
+ build_creative_id: z.string().optional(),
12406
+ catalog_item_ref: z.object({
12407
+ catalog_type: z.string().optional(),
12408
+ item_id: z.string()
12409
+ }).passthrough().optional(),
12410
+ signal_condition: SignalTargetingSchema.optional(),
12411
+ variants: z.array(z.object({
12412
+ build_variant_id: z.string(),
12413
+ recipe_hash: z.string().optional(),
12414
+ parent_build_variant_id: z.string().optional(),
12415
+ creative_manifest: CreativeManifestSchema,
12416
+ variant_axis_value: z.unknown().optional(),
12417
+ recommended: z.boolean().optional(),
12418
+ rank: z.int().min(1).optional(),
12419
+ eval: z.object({
12420
+ features: z.array(CreativeFeatureResultSchema).optional(),
12421
+ ranked_against: z.int().min(1).optional(),
12422
+ calls_used: z.int().min(0).optional(),
12423
+ seconds_used: z.number().min(0).optional(),
12424
+ ext: ExtensionObjectSchema.optional()
12425
+ }).passthrough().optional(),
12426
+ pricing_option_id: z.string().optional(),
12427
+ vendor_cost: z.number().min(0).optional(),
12428
+ currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12429
+ consumption: CreativeConsumptionSchema.optional()
12430
+ }).passthrough()).optional(),
12431
+ errors: z.array(ErrorSchema).optional()
12432
+ }).passthrough()),
12433
+ items_total: z.int().min(0).optional(),
12434
+ items_returned: z.int().min(0).optional(),
12435
+ leaves_total: z.int().min(0).optional(),
12436
+ leaves_returned: z.int().min(0).optional(),
12437
+ vendor_cost: z.number().min(0).optional(),
12438
+ currency: z.string().regex(/^[A-Z]{3}$/).optional(),
12439
+ keep_mode_applied: z.union([z.literal("keep_all"), z.literal("keep_one"), z.literal("keep_some")]).optional(),
12440
+ selection_strategy_applied: CreativeSelectionStrategySchema.optional(),
12441
+ budget_status: z.union([z.literal("complete"), z.literal("capped")]).optional(),
12442
+ errors: z.array(ErrorSchema).optional(),
12443
+ sandbox: z.boolean().optional(),
12444
+ expires_at: z.iso.datetime().optional(),
12445
+ context: ContextObjectSchema.optional(),
12446
+ ext: ExtensionObjectSchema.optional()
12447
+ }).passthrough();
12448
+ const PreviewCreativeVariantResponseSchema = z.object({
12449
+ response_type: z.literal("variant"),
12450
+ variant_id: z.string(),
12451
+ creative_id: z.string().optional(),
12452
+ previews: z.array(z.object({
12453
+ preview_id: z.string(),
12454
+ renders: z.array(PreviewRenderSchema)
12455
+ }).passthrough()),
12456
+ manifest: CreativeManifestSchema.optional(),
12457
+ expires_at: z.iso.datetime().optional(),
12458
+ context: ContextObjectSchema.optional(),
12459
+ ext: ExtensionObjectSchema.optional()
12460
+ }).passthrough();
12461
+ const AAODirectoryAgentPublishersInverseLookupResponseSchema = z.object({
12462
+ agent_url: z.string().refine(adcpJsonSchemaUri, "Invalid URI"),
12463
+ directory_indexed_at: z.iso.datetime().nullable(),
12464
+ publishers: z.array(PublisherEntrySchema),
12465
+ next_cursor: z.string().optional().nullable()
12466
+ }).passthrough();
12467
+ const AcquireRightsAcquiredSchema = z.object({
12468
+ rights_id: z.string(),
12469
+ rights_status: z.literal("acquired"),
12470
+ brand_id: z.string(),
12471
+ terms: RightsTermsSchema,
12472
+ generation_credentials: z.array(GenerationCredentialSchema),
12473
+ restrictions: z.array(z.string()).optional(),
12474
+ disclosure: z.object({
12475
+ required: z.boolean(),
12476
+ text: z.string().optional()
12477
+ }).passthrough().optional(),
12478
+ approval_webhook: PushNotificationConfigSchema.optional(),
12479
+ usage_reporting_url: z.string().optional(),
12480
+ rights_constraint: RightsConstraintSchema.and(z.object({}).passthrough()),
12481
+ context: ContextObjectSchema.optional(),
12482
+ ext: ExtensionObjectSchema.optional()
12483
+ }).passthrough();
12484
+ const CreativeApprovalResponseSchema = z.object({
12485
+ context_id: z.string().optional(),
12486
+ context: ContextObjectSchema.optional(),
12487
+ task_id: z.string().optional(),
12488
+ status: TaskStatusSchema,
12489
+ message: z.string().optional(),
12490
+ timestamp: z.string().optional(),
12491
+ replayed: z.boolean().optional(),
12492
+ adcp_error: ErrorSchema.optional(),
12493
+ push_notification_config: PushNotificationConfigSchema.optional(),
12494
+ governance_context: z.string().optional(),
12495
+ payload: z.object({}).passthrough().optional(),
12496
+ adcp_version: z.string().optional(),
12497
+ adcp_major_version: z.number().optional()
12498
+ }).passthrough().and(z.union([CreativeApprovedSchema, CreativeRejectedSchema, CreativePendingReviewSchema, CreativeApprovalErrorSchema]));
12499
+ const GetBrandIdentityResponseSchema = z.object({
12500
+ context_id: z.string().optional(),
12501
+ context: ContextObjectSchema.optional(),
12126
12502
  task_id: z.string().optional(),
12127
12503
  status: TaskStatusSchema,
12128
12504
  message: z.string().optional(),
@@ -13126,45 +13502,422 @@ const AcceptancePolicyCatalogSchema = z.object({
13126
13502
  registry_profiles: z.array(RegistryAcceptancePolicyProfileReferenceSchema).optional(),
13127
13503
  ext: ExtensionObjectSchema.optional()
13128
13504
  }).passthrough();
13129
- const TargetingOverlayInputSchema = TargetingUnknownAgeEligibilityConstraintSchema.merge(TargetingVerifiedAgeBasisConstraintSchema).merge(z.object({
13130
- geo_countries: GeoCountriesSchema.optional().nullable(),
13131
- geo_countries_exclude: GeoCountriesExcludeSchema.optional().nullable(),
13132
- geo_regions: GeoRegionsSchema.optional().nullable(),
13133
- geo_regions_exclude: GeoRegionsExcludeSchema.optional().nullable(),
13134
- geo_metros: TargetingGeoMetrosSchema.optional(),
13135
- geo_metros_exclude: GeoMetrosExcludeSchema.optional().nullable(),
13136
- geo_postal_areas: GeoPostalAreasSchema.optional().nullable(),
13137
- geo_postal_areas_exclude: GeoPostalAreasExcludeSchema.optional().nullable(),
13138
- geo_places: GeoPlacesSchema.optional().nullable(),
13139
- geo_places_exclude: GeoPlacesExcludeSchema.optional().nullable(),
13140
- daypart_targets: DaypartTargetsSchema.optional().nullable(),
13141
- axe_include_segment: z.string().optional().nullable(),
13142
- axe_exclude_segment: z.string().optional().nullable(),
13143
- audience_include: AudienceIncludeSchema.optional().nullable(),
13144
- audience_exclude: AudienceExcludeSchema.optional().nullable(),
13145
- signal_targeting_groups: TargetingSignalGroupsSchema.optional().nullable(),
13146
- signal_targeting: z.array(SignalTargetingSchema).optional().nullable(),
13147
- demographics: DemographicTargetingIntentSchema.optional().nullable(),
13148
- frequency_cap: TargetingFrequencyCapSchema.optional().nullable(),
13149
- property_list: TargetingPropertyListSchema.optional().nullable(),
13150
- property_list_exclude: PropertyListReferenceSchema.optional().nullable(),
13151
- collection_list: TargetingCollectionListSchema.optional().nullable(),
13152
- collection_list_exclude: CollectionListReferenceSchema.optional().nullable(),
13153
- placement_selection: PlacementSelectionSchema.optional().nullable(),
13154
- collection_selection: TargetingCollectionSelectionSchema.optional().nullable(),
13155
- age_restriction: AgeRestrictionSchema.optional().nullable(),
13156
- device_platform: z.array(DevicePlatformSchema).optional().nullable(),
13157
- device_platform_exclude: DevicePlatformExcludeSchema.optional().nullable(),
13158
- device_type: z.array(DeviceTypeSchema).optional().nullable(),
13159
- device_type_exclude: DeviceTypeExcludeSchema.optional().nullable(),
13160
- browser: BrowserSchema.optional().nullable(),
13161
- browser_exclude: BrowserExcludeSchema.optional().nullable(),
13162
- store_catchments: StoreCatchmentsSchema.optional().nullable(),
13163
- geo_proximity: GeoProximitySchema.optional().nullable(),
13164
- language: TargetingLanguagesSchema.optional(),
13165
- keyword_targets: TargetingKeywordsSchema.optional(),
13166
- negative_keywords: TargetingNegativeKeywordsSchema.optional()
13167
- }).passthrough());
13505
+ const TargetingOverlayInputSchema = (() => {
13506
+ const objectSchema = z.object({ "geo_countries": z.union([z.array(z.string().regex(new RegExp("^[A-Z]{2}$"))).min(1).describe("Restrict delivery to specific countries. ISO 3166-1 alpha-2 codes (e.g., 'US', 'GB', 'DE')."), z.null()]).optional(), "geo_countries_exclude": z.union([z.array(z.string().regex(new RegExp("^[A-Z]{2}$"))).min(1).describe("Exclude specific countries from delivery. ISO 3166-1 alpha-2 codes (e.g., 'US', 'GB', 'DE')."), z.null()]).optional(), "geo_regions": z.union([z.array(z.string().regex(new RegExp("^[A-Z]{2}-[A-Z0-9]{1,3}$"))).min(1).describe("Restrict delivery to exact canonical ISO 3166-2 subdivisions (states, provinces, regions, departments, or other subdivision categories). Unknown identifiers are invalid. At create or update, sellers MUST reject unsupported identifiers and MUST NOT silently widen, drop, or partially apply the list. During get_products, a seller may instead return a sparse, buyer-reviewable targeting_resolution modification for a valid but unsupported requested outcome. Exact internal translation preserves accepted identifiers in package readback."), z.null()]).optional(), "geo_regions_exclude": z.union([z.array(z.string().regex(new RegExp("^[A-Z]{2}-[A-Z0-9]{1,3}$"))).min(1).describe("Exclude exact canonical ISO 3166-2 subdivisions. Support is independent from geo_regions inclusion support. Unknown identifiers and values also present in geo_regions are invalid. At create or update, sellers MUST reject unsupported identifiers and partial application; during get_products, a seller may instead return a sparse, buyer-reviewable targeting_resolution modification for a valid but unsupported requested outcome."), z.null()]).optional(), "geo_metros": z.union([z.array(z.object({ "system": z.enum(["nielsen_dma", "uk_itl1", "uk_itl2", "eurostat_nuts2", "custom"]).describe("Metro area classification system (e.g., 'nielsen_dma', 'uk_itl2')"), "values": z.array(z.string()).min(1).describe("Metro codes within the system (e.g., ['501', '602'] for Nielsen DMAs)") }).strict().describe("A targeted metro area.")).min(1).describe("Restrict delivery to specific metro areas. Each entry specifies the classification system and target values. Seller must declare supported systems in get_adcp_capabilities."), z.null().describe("Restrict delivery to specific metro areas. Each entry specifies the classification system and target values. Seller must declare supported systems in get_adcp_capabilities.")]).describe("Restrict delivery to specific metro areas. Each entry specifies the classification system and target values. Seller must declare supported systems in get_adcp_capabilities.").optional(), "geo_metros_exclude": z.union([z.array(z.object({ "system": z.enum(["nielsen_dma", "uk_itl1", "uk_itl2", "eurostat_nuts2", "custom"]).describe("Metro area classification system (e.g., 'nielsen_dma', 'uk_itl2')"), "values": z.array(z.string()).min(1).describe("Metro codes to exclude within the system (e.g., ['501', '602'] for Nielsen DMAs)") }).strict()).min(1).describe("Exclude specific metro areas from delivery. Each entry specifies the classification system and excluded values. Seller must declare supported systems in get_adcp_capabilities."), z.null()]).optional(), "geo_postal_areas": z.union([z.array(z.union([z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code for the postal values."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system (e.g., 'zip', 'outward', 'plz', 'postal_code')."), "values": z.array(z.string()).min(1).describe("Postal codes within the country and system.") }).strict().and(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system.") }).and(z.union([z.object({ "country": z.literal("US").optional(), "system": z.enum(["zip", "zip_plus_four"]).optional() }), z.object({ "country": z.literal("GB").optional(), "system": z.enum(["outward", "full"]).optional() }), z.object({ "country": z.literal("CA").optional(), "system": z.enum(["fsa", "full"]).optional() }), z.object({ "country": z.enum(["DE", "CH", "AT"]).optional(), "system": z.literal("plz").optional() }), z.object({ "country": z.literal("FR").optional(), "system": z.literal("code_postal").optional() }), z.object({ "country": z.literal("AU").optional(), "system": z.literal("postcode").optional() }), z.object({ "country": z.literal("BR").optional(), "system": z.literal("cep").optional() }), z.object({ "country": z.literal("IN").optional(), "system": z.literal("pin").optional() }), z.object({ "country": z.literal("ZA").optional(), "system": z.literal("postal_code").optional() }), z.object({ "country": z.any().refine((value) => !z.enum(["US", "GB", "CA", "DE", "CH", "AT", "FR", "AU", "BR", "IN", "ZA"]).safeParse(value).success, "Invalid input: Should NOT be valid against schema").optional(), "system": z.enum(["postal_code", "custom"]).optional() })])).describe("Valid country-local postal system pairing. Registered countries only accept their registered local systems; countries without a registered local system use postal_code or custom.")), z.object({ "system": z.enum(["us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Deprecated country-fused postal code system (e.g., 'us_zip', 'gb_outward'). Prefer country + postal-system."), "values": z.array(z.string()).min(1).describe("Postal codes within the legacy system.") }).strict()]).describe("Postal area values. Prefer the native country + postal system form. Deprecated legacy country-fused postal-system tokens remain accepted for compatibility.")).min(1).describe("Restrict delivery to specific postal areas. Prefer the native country + postal system form. The deprecated legacy country-fused postal-system tokens remain accepted for compatibility. Seller must declare supported systems in get_adcp_capabilities."), z.null()]).optional(), "geo_postal_areas_exclude": z.union([z.array(z.union([z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code for the postal values."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system (e.g., 'zip', 'outward', 'plz', 'postal_code')."), "values": z.array(z.string()).min(1).describe("Postal codes within the country and system.") }).strict().and(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code."), "system": z.enum(["postal_code", "zip", "zip_plus_four", "outward", "full", "fsa", "plz", "code_postal", "postcode", "cep", "pin", "custom", "us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Country-local postal code system.") }).and(z.union([z.object({ "country": z.literal("US").optional(), "system": z.enum(["zip", "zip_plus_four"]).optional() }), z.object({ "country": z.literal("GB").optional(), "system": z.enum(["outward", "full"]).optional() }), z.object({ "country": z.literal("CA").optional(), "system": z.enum(["fsa", "full"]).optional() }), z.object({ "country": z.enum(["DE", "CH", "AT"]).optional(), "system": z.literal("plz").optional() }), z.object({ "country": z.literal("FR").optional(), "system": z.literal("code_postal").optional() }), z.object({ "country": z.literal("AU").optional(), "system": z.literal("postcode").optional() }), z.object({ "country": z.literal("BR").optional(), "system": z.literal("cep").optional() }), z.object({ "country": z.literal("IN").optional(), "system": z.literal("pin").optional() }), z.object({ "country": z.literal("ZA").optional(), "system": z.literal("postal_code").optional() }), z.object({ "country": z.any().refine((value) => !z.enum(["US", "GB", "CA", "DE", "CH", "AT", "FR", "AU", "BR", "IN", "ZA"]).safeParse(value).success, "Invalid input: Should NOT be valid against schema").optional(), "system": z.enum(["postal_code", "custom"]).optional() })])).describe("Valid country-local postal system pairing. Registered countries only accept their registered local systems; countries without a registered local system use postal_code or custom.")), z.object({ "system": z.enum(["us_zip", "us_zip_plus_four", "gb_outward", "gb_full", "ca_fsa", "ca_full", "de_plz", "fr_code_postal", "au_postcode", "ch_plz", "at_plz"]).describe("Deprecated country-fused postal code system (e.g., 'us_zip', 'gb_outward'). Prefer country + postal-system."), "values": z.array(z.string()).min(1).describe("Postal codes within the legacy system.") }).strict()]).describe("Postal area values. Prefer the native country + postal system form. Deprecated legacy country-fused postal-system tokens remain accepted for compatibility.")).min(1).describe("Exclude specific postal areas from delivery. Prefer the native country + postal system form. The deprecated legacy country-fused postal-system tokens remain accepted for compatibility. Seller must declare supported systems in get_adcp_capabilities."), z.null()]).optional(), "geo_places": z.union([z.array(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code containing the place."), "system": z.union([z.enum(["geonames", "google_ads", "microsoft_ads"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Collision-safe identifier namespace for geographic places. Registered tokens have protocol-defined semantics. Unregistered systems MUST use an absolute HTTPS URI controlled by the catalog owner; consumers compare URI systems as exact opaque strings."), "system_version": z.string().min(1).describe("Optional exact catalog version from the seller's declared supported_versions. When omitted, the seller applies catalog.current_version and MUST echo that version on persisted package state.").optional(), "place_type": z.union([z.enum(["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Canonical place classification. Registered tokens have protocol-defined meanings. Catalog-specific classifications without a registered mapping MUST use an absolute HTTPS URI controlled by the vocabulary owner; consumers compare URI types as exact opaque strings."), "values": z.array(z.string().min(1)).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Stable place identifiers in the declared system. Display names are not valid targeting values."), "value_labels": z.record(z.string(), z.string().min(1)).describe("Optional human-readable diagnostic labels keyed by identifiers present in values. Extra keys are a conformance error. Labels are non-authoritative and MUST NOT be used to resolve or apply targeting.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict().and(z.union([z.any().refine((value) => !z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }).safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }), z.object({ "values": z.any().optional() }))])).describe("A catalog-backed named place target. Values are stable identifiers in the declared system. Entries within geo_places form a union; different geographic inclusion dimensions intersect. value_labels are diagnostic only and MUST NOT be used to resolve targeting.")).min(1).describe("Restrict delivery to catalog-backed named places. Values MUST be stable identifiers in the declared system, not display names. Sellers must declare supported systems, countries, and place types in get_adcp_capabilities and reject unsupported entries rather than silently dropping them."), z.null()]).optional(), "geo_places_exclude": z.union([z.array(z.object({ "country": z.string().regex(new RegExp("^[A-Z]{2}$")).describe("ISO 3166-1 alpha-2 country code containing the place."), "system": z.union([z.enum(["geonames", "google_ads", "microsoft_ads"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Collision-safe identifier namespace for geographic places. Registered tokens have protocol-defined semantics. Unregistered systems MUST use an absolute HTTPS URI controlled by the catalog owner; consumers compare URI systems as exact opaque strings."), "system_version": z.string().min(1).describe("Optional exact catalog version from the seller's declared supported_versions. When omitted, the seller applies catalog.current_version and MUST echo that version on persisted package state.").optional(), "place_type": z.union([z.enum(["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"]), z.string().refine(adcpJsonSchemaUri, "Invalid URI").regex(new RegExp("^https://"))]).describe("Canonical place classification. Registered tokens have protocol-defined meanings. Catalog-specific classifications without a registered mapping MUST use an absolute HTTPS URI controlled by the vocabulary owner; consumers compare URI types as exact opaque strings."), "values": z.array(z.string().min(1)).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Stable place identifiers in the declared system. Display names are not valid targeting values."), "value_labels": z.record(z.string(), z.string().min(1)).describe("Optional human-readable diagnostic labels keyed by identifiers present in values. Extra keys are a conformance error. Labels are non-authoritative and MUST NOT be used to resolve or apply targeting.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict().and(z.union([z.any().refine((value) => !z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }).safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "system": z.enum(["geonames", "google_ads", "microsoft_ads"]) }), z.object({ "values": z.any().optional() }))])).describe("A catalog-backed named place target. Values are stable identifiers in the declared system. Entries within geo_places form a union; different geographic inclusion dimensions intersect. value_labels are diagnostic only and MUST NOT be used to resolve targeting.")).min(1).describe("Exclude catalog-backed named places. Uses the same identifier-based shape as geo_places. Sellers MUST reject overlap with geo_places for the same country, system, place_type, and value."), z.null()]).optional(), "daypart_targets": z.union([z.array(z.object({ "days": z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]).describe("Days of the week for daypart targeting")).min(1).describe("Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object)."), "start_hour": z.number().int().gte(0).lte(23).describe("Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm."), "end_hour": z.number().int().gte(1).lte(24).describe("End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour."), "timezone": z.union([z.literal("inventory_local"), z.any().refine((value) => !z.literal("inventory_local").safeParse(value).success, "Invalid input: Should NOT be valid against schema").describe("Concrete timezone identifier in the implementation's supported IANA Time Zone Database, such as America/New_York, CET, or UTC.")]).describe("Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and hour with the half-open window: a skipped DST hour has no matching instants, while both occurrences of a repeated hour match. This delivery clock is independent of reporting_capabilities.timezone.").default("inventory_local"), "label": z.string().describe("Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')").optional() }).strict().describe("A time window for daypart targeting. Specifies days of week, an hour range, and the civil-time clock used to evaluate it. start_hour is inclusive, end_hour is exclusive (e.g., 6-10 = 6:00am to 10:00am). Follows the Google Ads AdScheduleInfo / DV360 DayPartTargeting pattern.")).min(1).describe("Restrict delivery to specific time windows. Each entry specifies days of week, an hour range, and an optional timezone that defaults to inventory_local. A concrete IANA zone uses one shared civil-time clock, while inventory_local evaluates each inventory unit in its seller-assigned local timezone. Entries are independent and MAY use different clocks."), z.null()]).optional(), "axe_include_segment": z.union([z.string().describe("Deprecated: Use TMP provider fields instead. AXE segment ID to include for targeting."), z.null()]).optional(), "axe_exclude_segment": z.union([z.string().describe("Deprecated: Use TMP provider fields instead. AXE segment ID to exclude from targeting."), z.null()]).optional(), "audience_include": z.union([z.array(z.string()).min(1).describe("Restrict delivery to members of these first-party CRM audiences. Only users present in the uploaded lists are eligible. References audience_id values from sync_audiences on the same seller account \u2014 audience IDs are not portable across sellers. Not for lookalike expansion \u2014 express that intent in the campaign brief. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "audience_exclude": z.union([z.array(z.string()).min(1).describe("Suppress delivery to members of these first-party CRM audiences. Matched users are excluded regardless of other targeting. References audience_id values from sync_audiences on the same seller account \u2014 audience IDs are not portable across sellers. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "signal_targeting_groups": z.union([z.object({ "operator": z.literal("all").describe("Groups-level operator. Required even though v1 only supports 'all': every child group must be satisfied."), "groups": z.array(z.object({ "operator": z.enum(["any", "none"]).describe("How to evaluate the signals in this group. 'any' is an OR include group. 'none' is an exclusion group equivalent to NOT (A OR B OR C)."), "signals": z.array(z.object({ "pricing_option_id": z.string().describe("Pricing option selected for this signal. Use the pricing_option_id from the product's signal_targeting_options entry when product-scoped pricing is present; otherwise use the seller get_signals pricing only when the product option does not override it. Required when the selected signal has pricing_options; omit only when the signal is bundled into the product price or has no incremental cost.").optional(), "signal_agent_segment_id": z.string().describe("Optional opaque resolved-segment or seller execution handle for this signal. Omit when signal_ref plus the value expression is sufficient for the seller to resolve the signal. Include when the product option exposes a separate runtime or activation handle, and pass it verbatim. Buyers SHOULD prefer an exposed segment handle over reconstructing condition identity from categorical values because the handle can carry provider namespace and methodology distinctions.").optional(), "activation_key": z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
13507
+ const schemas = [z.object({ "type": z.literal("segment_id").describe("Segment ID based targeting"), "segment_id": z.string().describe("The platform-specific segment identifier to use in campaign targeting") }).catchall(z.any()), z.object({ "type": z.literal("key_value").describe("Key-value pair based targeting"), "key": z.string().describe("The targeting parameter key"), "value": z.string().describe("The targeting parameter value") }).catchall(z.any())];
13508
+ const { errors, failed } = schemas.reduce(
13509
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13510
+ errors: [...errors2, ...result.error.issues],
13511
+ failed: failed2 + 1
13512
+ } : { errors: errors2, failed: failed2 })(
13513
+ schema.safeParse(x)
13514
+ ),
13515
+ { errors: [], failed: 0 }
13516
+ );
13517
+ const passed = schemas.length - failed;
13518
+ if (passed !== 1) {
13519
+ ctx.addIssue(errors.length ? {
13520
+ path: [],
13521
+ code: "invalid_union",
13522
+ errors: [errors],
13523
+ message: "Invalid input: Should pass single schema. Passed " + passed
13524
+ } : {
13525
+ path: [],
13526
+ code: "custom",
13527
+ errors: [errors],
13528
+ message: "Invalid input: Should pass single schema. Passed " + passed
13529
+ });
13530
+ }
13531
+ })).describe("Destination-specific activation key returned by get_signals or activate_signal. Usually omitted for seller-offered signals selected directly through the same seller; include only when the selected signal was separately activated and the seller requires the activation key to correlate the package selection.").optional() }).catchall(z.any()).and(z.any().superRefine((x, ctx) => {
13532
+ const schemas = [z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13533
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13534
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13535
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13536
+ errors: [...errors3, ...result.error.issues],
13537
+ failed: failed3 + 1
13538
+ } : { errors: errors3, failed: failed3 })(
13539
+ schema.safeParse(x2)
13540
+ ),
13541
+ { errors: [], failed: 0 }
13542
+ );
13543
+ const passed2 = schemas2.length - failed2;
13544
+ if (passed2 !== 1) {
13545
+ ctx2.addIssue(errors2.length ? {
13546
+ path: [],
13547
+ code: "invalid_union",
13548
+ errors: [errors2],
13549
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13550
+ } : {
13551
+ path: [],
13552
+ code: "custom",
13553
+ errors: [errors2],
13554
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13555
+ });
13556
+ }
13557
+ }).describe("Named signal being targeted."), "value_type": z.literal("binary").describe("Discriminator for binary signals."), "value": z.literal(true).describe("Binary package signal entries match users for whom the signal is true. Use the parent group operator for include/exclude.") }).catchall(z.any()).describe("Binary signal expression. In grouped package targeting, value is always true; use a parent group with operator 'none' for exclusion."), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13558
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13559
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13560
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13561
+ errors: [...errors3, ...result.error.issues],
13562
+ failed: failed3 + 1
13563
+ } : { errors: errors3, failed: failed3 })(
13564
+ schema.safeParse(x2)
13565
+ ),
13566
+ { errors: [], failed: 0 }
13567
+ );
13568
+ const passed2 = schemas2.length - failed2;
13569
+ if (passed2 !== 1) {
13570
+ ctx2.addIssue(errors2.length ? {
13571
+ path: [],
13572
+ code: "invalid_union",
13573
+ errors: [errors2],
13574
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13575
+ } : {
13576
+ path: [],
13577
+ code: "custom",
13578
+ errors: [errors2],
13579
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13580
+ });
13581
+ }
13582
+ }).describe("Named signal being targeted."), "value_type": z.literal("categorical").describe("Discriminator for categorical signals."), "values": z.array(z.string()).min(1).describe("Values to target. Users with any of these values match the expression.") }).catchall(z.any()).describe("Categorical signal expression - target users with one of the listed values."), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13583
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13584
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13585
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13586
+ errors: [...errors3, ...result.error.issues],
13587
+ failed: failed3 + 1
13588
+ } : { errors: errors3, failed: failed3 })(
13589
+ schema.safeParse(x2)
13590
+ ),
13591
+ { errors: [], failed: 0 }
13592
+ );
13593
+ const passed2 = schemas2.length - failed2;
13594
+ if (passed2 !== 1) {
13595
+ ctx2.addIssue(errors2.length ? {
13596
+ path: [],
13597
+ code: "invalid_union",
13598
+ errors: [errors2],
13599
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13600
+ } : {
13601
+ path: [],
13602
+ code: "custom",
13603
+ errors: [errors2],
13604
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13605
+ });
13606
+ }
13607
+ }).describe("Named signal being targeted."), "value_type": z.literal("numeric").describe("Discriminator for numeric signals."), "min_value": z.number().describe("Minimum value, inclusive. Omit for no minimum. Should be within the signal definition's range when declared.").optional(), "max_value": z.number().describe("Maximum value, inclusive. Omit for no maximum. Should be within the signal definition's range when declared.").optional() }).catchall(z.any()).and(z.union([z.object({ "min_value": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max_value": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Numeric signal expression - target users within a value range. At least one of min_value or max_value is required. If both min_value and max_value are provided, min_value MUST be <= max_value.")];
13608
+ const { errors, failed } = schemas.reduce(
13609
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13610
+ errors: [...errors2, ...result.error.issues],
13611
+ failed: failed2 + 1
13612
+ } : { errors: errors2, failed: failed2 })(
13613
+ schema.safeParse(x)
13614
+ ),
13615
+ { errors: [], failed: 0 }
13616
+ );
13617
+ const passed = schemas.length - failed;
13618
+ if (passed !== 1) {
13619
+ ctx.addIssue(errors.length ? {
13620
+ path: [],
13621
+ code: "invalid_union",
13622
+ errors: [errors],
13623
+ message: "Invalid input: Should pass single schema. Passed " + passed
13624
+ } : {
13625
+ path: [],
13626
+ code: "custom",
13627
+ errors: [errors],
13628
+ message: "Invalid input: Should pass single schema. Passed " + passed
13629
+ });
13630
+ }
13631
+ }).describe("Predicate over a named signal definition. Signals are typed dimensions, similar to feature values: binary signals match true, categorical signals match one of a set of values, and numeric signals match a range. In package signal targeting groups, include/exclude semantics are controlled by the parent group operator, not by negating the expression.")).describe("Buy-time selection of one seller-offered signal inside a package signal targeting group. The signal_ref uses scope 'product' for a product-local signal option, scope 'data_provider' for a signal defined in a data provider's published adagents.json signals[], or scope 'signal_source' for a source-native signal that is not published in adagents.json signals[]. The selected product's inline Product.signal_targeting_options, get_signals feed when inline options are omitted, and signal_targeting_rules define buy-time eligibility. Inclusion and exclusion are controlled by the parent group operator: use operator 'any' to include users matching the signal expression and operator 'none' to exclude users matching the signal expression. For binary signals, value MUST be true; do not use value=false for exclusion inside signal_targeting_groups. Use audience_include/audience_exclude only for buyer-managed first-party audiences registered through sync_audiences.")).min(1).describe("Signal targeting entries evaluated by this group. Each entry uses the package signal targeting shape, including signal_ref, value expression, and optional pricing, execution-handle, or activation fields.") }).catchall(z.any()).describe("A basic Boolean group of package-level signal targeting entries. 'any' means the user must match at least one signal in the group. 'none' means the user must match none of the signals in the group. Use groups for portable include/exclude composition such as (A OR B) AND NOT (C OR D).")).min(1).describe("Signal targeting groups to evaluate. Use operator 'any' for include groups and 'none' for exclusion groups.") }).catchall(z.any()).describe("Basic Boolean grouping for seller-offered signals. v1 supports a required top-level operator 'all' and child groups with operator 'any' for include groups or 'none' for exclusion groups. Example semantics: group 1 any(A, B) plus group 2 none(C, D) means (A OR B) AND NOT (C OR D). Signal entries reference named signal definitions with signal_ref scope 'product' for product-local signal options or scope 'data_provider' for external signals published in adagents.json signals[]. For simple include-only targeting, send one child group with operator 'any'. Sellers SHOULD reject entries that are not available for the product through inline signal_targeting_options or get_signals, are not active for the account, or exceed the product's signal_targeting_allowed/signal_targeting_rules/product terms. Signal targeting limits are product-scoped, not declared in get_adcp_capabilities, because products may be backed by different ad servers. Sellers MUST echo applied signal_targeting_groups on the resulting package state, including fixed/default selections. Sellers MAY return REQUOTE_REQUIRED when a targeting mutation changes commercial terms."), z.null()]).optional(), "signal_targeting": z.union([z.array(z.any().superRefine((x, ctx) => {
13632
+ const schemas = [z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13633
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13634
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13635
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13636
+ errors: [...errors3, ...result.error.issues],
13637
+ failed: failed3 + 1
13638
+ } : { errors: errors3, failed: failed3 })(
13639
+ schema.safeParse(x2)
13640
+ ),
13641
+ { errors: [], failed: 0 }
13642
+ );
13643
+ const passed2 = schemas2.length - failed2;
13644
+ if (passed2 !== 1) {
13645
+ ctx2.addIssue(errors2.length ? {
13646
+ path: [],
13647
+ code: "invalid_union",
13648
+ errors: [errors2],
13649
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13650
+ } : {
13651
+ path: [],
13652
+ code: "custom",
13653
+ errors: [errors2],
13654
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13655
+ });
13656
+ }
13657
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
13658
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
13659
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13660
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13661
+ errors: [...errors3, ...result.error.issues],
13662
+ failed: failed3 + 1
13663
+ } : { errors: errors3, failed: failed3 })(
13664
+ schema.safeParse(x2)
13665
+ ),
13666
+ { errors: [], failed: 0 }
13667
+ );
13668
+ const passed2 = schemas2.length - failed2;
13669
+ if (passed2 !== 1) {
13670
+ ctx2.addIssue(errors2.length ? {
13671
+ path: [],
13672
+ code: "invalid_union",
13673
+ errors: [errors2],
13674
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13675
+ } : {
13676
+ path: [],
13677
+ code: "custom",
13678
+ errors: [errors2],
13679
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13680
+ });
13681
+ }
13682
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("binary").describe("Discriminator for binary signals"), "value": z.boolean().describe("Whether to include (true) or exclude (false) users matching this signal") }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Binary signal targeting - user either matches or doesn't"), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13683
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13684
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13685
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13686
+ errors: [...errors3, ...result.error.issues],
13687
+ failed: failed3 + 1
13688
+ } : { errors: errors3, failed: failed3 })(
13689
+ schema.safeParse(x2)
13690
+ ),
13691
+ { errors: [], failed: 0 }
13692
+ );
13693
+ const passed2 = schemas2.length - failed2;
13694
+ if (passed2 !== 1) {
13695
+ ctx2.addIssue(errors2.length ? {
13696
+ path: [],
13697
+ code: "invalid_union",
13698
+ errors: [errors2],
13699
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13700
+ } : {
13701
+ path: [],
13702
+ code: "custom",
13703
+ errors: [errors2],
13704
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13705
+ });
13706
+ }
13707
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
13708
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
13709
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13710
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13711
+ errors: [...errors3, ...result.error.issues],
13712
+ failed: failed3 + 1
13713
+ } : { errors: errors3, failed: failed3 })(
13714
+ schema.safeParse(x2)
13715
+ ),
13716
+ { errors: [], failed: 0 }
13717
+ );
13718
+ const passed2 = schemas2.length - failed2;
13719
+ if (passed2 !== 1) {
13720
+ ctx2.addIssue(errors2.length ? {
13721
+ path: [],
13722
+ code: "invalid_union",
13723
+ errors: [errors2],
13724
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13725
+ } : {
13726
+ path: [],
13727
+ code: "custom",
13728
+ errors: [errors2],
13729
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13730
+ });
13731
+ }
13732
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("categorical").describe("Discriminator for categorical signals"), "values": z.array(z.string()).min(1).describe("Values to target. Users with any of these values will be included.") }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Categorical signal targeting - target users with specific values"), z.object({ "signal_ref": z.any().superRefine((x2, ctx2) => {
13733
+ const schemas2 = [z.object({ "scope": z.literal("product").describe("Discriminator indicating the signal resolves through the selected product's included_signals or signal_targeting_options."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Product-local signal identifier. For local signals exposed on both get_signals and get_products, this MUST match get_signals.signals[].signal_ref.signal_id for the same signal.") }).catchall(z.any()).describe("Product-scoped signal. The signal_id is meaningful only within the selected product/package context and MUST match a Product.included_signals[].signal_ref.signal_id or Product.signal_targeting_options[].signal_ref.signal_id for that product, depending on whether the signal is descriptive or selectable."), z.object({ "scope": z.literal("data_provider").describe("Discriminator indicating the signal resolves through a data provider's published adagents.json signals[]."), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain that publishes the signal definition in its adagents.json signals[]."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's published adagents.json signals[].") }).catchall(z.any()).describe("Data-provider-scoped signal. The signal_id resolves through the data provider's published adagents.json signals[] and can be authorization-verified there."), z.object({ "scope": z.literal("signal_source").describe("Discriminator indicating the signal resolves through the issuing signal source."), "signal_source_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that issues this source-native signal."), "signal_id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the issuing signal source's signal set.") }).catchall(z.any()).describe("Signal-source-scoped signal. Use this for source-native signals that are not published in upstream adagents.json signals[]. The buyer trusts the issuing signal source for this identity; use scope 'data_provider' instead when the signal is published in adagents.json signals[], even if the publisher is also the seller or signal source.")];
13734
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13735
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13736
+ errors: [...errors3, ...result.error.issues],
13737
+ failed: failed3 + 1
13738
+ } : { errors: errors3, failed: failed3 })(
13739
+ schema.safeParse(x2)
13740
+ ),
13741
+ { errors: [], failed: 0 }
13742
+ );
13743
+ const passed2 = schemas2.length - failed2;
13744
+ if (passed2 !== 1) {
13745
+ ctx2.addIssue(errors2.length ? {
13746
+ path: [],
13747
+ code: "invalid_union",
13748
+ errors: [errors2],
13749
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13750
+ } : {
13751
+ path: [],
13752
+ code: "custom",
13753
+ errors: [errors2],
13754
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13755
+ });
13756
+ }
13757
+ }).describe("The signal to target. New targeting constraints SHOULD use signal_ref.").optional(), "signal_id": z.any().superRefine((x2, ctx2) => {
13758
+ const schemas2 = [z.object({ "source": z.literal("catalog").describe("Discriminator indicating this signal is from a data provider's published adagents.json signals[]"), "data_provider_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain of the data provider that owns this signal (e.g., 'pinnacle-data.example'). The signal definition is published at this domain's /.well-known/adagents.json"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the data provider's catalog (e.g., 'likely_ev_buyers', 'income_100k_plus')") }).catchall(z.any()).describe("Data-provider signal - references a signal from a data provider's published adagents.json signals[]. Buyers can verify authorization by checking the data provider's adagents.json."), z.object({ "source": z.literal("agent").describe("Discriminator indicating this signal is native to the signal source identified by agent_url, not from a data provider's published signal definitions."), "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the signal source that provides this signal (e.g., 'https://signals.example/.well-known/adcp/signals')"), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).describe("Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')") }).catchall(z.any()).describe("Agent signal - references a signal native to a signal source identified by agent_url. Not externally verifiable through an upstream catalog; buyer trusts the issuing signal source's claim about the signal.")];
13759
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13760
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13761
+ errors: [...errors3, ...result.error.issues],
13762
+ failed: failed3 + 1
13763
+ } : { errors: errors3, failed: failed3 })(
13764
+ schema.safeParse(x2)
13765
+ ),
13766
+ { errors: [], failed: 0 }
13767
+ );
13768
+ const passed2 = schemas2.length - failed2;
13769
+ if (passed2 !== 1) {
13770
+ ctx2.addIssue(errors2.length ? {
13771
+ path: [],
13772
+ code: "invalid_union",
13773
+ errors: [errors2],
13774
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13775
+ } : {
13776
+ path: [],
13777
+ code: "custom",
13778
+ errors: [errors2],
13779
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13780
+ });
13781
+ }
13782
+ }).describe("DEPRECATED. Use signal_ref instead. Legacy SignalId retained for compatibility with older clients.").optional(), "value_type": z.literal("numeric").describe("Discriminator for numeric signals"), "min_value": z.number().describe("Minimum value (inclusive). Omit for no minimum. Must be <= max_value when both are provided. Should be >= signal's range.min if defined.").optional(), "max_value": z.number().describe("Maximum value (inclusive). Omit for no maximum. Must be >= min_value when both are provided. Should be <= signal's range.max if defined.").optional() }).catchall(z.any()).and(z.union([z.object({ "signal_ref": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "signal_id": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("Numeric signal targeting - target users within a value range. If min_value is provided, it must be <= max_value. Values should be within the signal's defined range (see signal definition).")];
13783
+ const { errors, failed } = schemas.reduce(
13784
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13785
+ errors: [...errors2, ...result.error.issues],
13786
+ failed: failed2 + 1
13787
+ } : { errors: errors2, failed: failed2 })(
13788
+ schema.safeParse(x)
13789
+ ),
13790
+ { errors: [], failed: 0 }
13791
+ );
13792
+ const passed = schemas.length - failed;
13793
+ if (passed !== 1) {
13794
+ ctx.addIssue(errors.length ? {
13795
+ path: [],
13796
+ code: "invalid_union",
13797
+ errors: [errors],
13798
+ message: "Invalid input: Should pass single schema. Passed " + passed
13799
+ } : {
13800
+ path: [],
13801
+ code: "custom",
13802
+ errors: [errors],
13803
+ message: "Invalid input: Should pass single schema. Passed " + passed
13804
+ });
13805
+ }
13806
+ }).describe("Targeting constraint for a specific signal. Uses value_type as discriminator to determine the targeting expression format.")).min(1).describe("DEPRECATED. Use signal_targeting_groups for package-level signal targeting. Legacy flat signal_targeting remains accepted during the SignalRef migration window but cannot express grouped include/exclude composition or product-scoped pricing."), z.null().describe("DEPRECATED. Use signal_targeting_groups for package-level signal targeting. Legacy flat signal_targeting remains accepted during the SignalRef migration window but cannot express grouped include/exclude composition or product-scoped pricing.")]).describe("DEPRECATED. Use signal_targeting_groups for package-level signal targeting. Legacy flat signal_targeting remains accepted during the SignalRef migration window but cannot express grouped include/exclude composition or product-scoped pricing.").optional(), "demographics": z.union([z.object({ "age": z.intersection(z.object({ "min": z.number().int().gte(0).lte(150).describe("Inclusive minimum age in completed years. Omit for an open lower bound.").optional(), "max": z.number().int().gte(0).lte(150).describe("Inclusive maximum age in completed years. Omit for an open upper bound.").optional(), "include_unknown": z.boolean().describe("Whether delivery to people whose age is unavailable is part of this predicate. This field has no default and MUST be supplied.") }).catchall(z.any()).and(z.union([z.object({ "min": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).describe("A canonical audience-age predicate in completed integer years. min and max are inclusive; omitting one bound means no restriction in that direction. At least one bound is required. include_unknown is always explicit because people whose age is unavailable are not members of any numeric interval. Implementations MUST reject min greater than max; JSON Schema draft-07 cannot compare sibling numeric values."), z.object({ "accepted_bases": z.array(z.enum(["verified", "declared", "inferred"]).describe("User-level bases that may resolve age for demographic targeting execution. Population estimates are deliberately absent because aggregate composition cannot establish an individual impression's age.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("User-level age determination bases the buyer permits for this predicate. Sellers MUST use only these bases or reject the request; they MUST NOT silently fall back to another basis. When omitted, the buyer imposes no determination-basis constraint beyond product capability and any age_restriction. population_estimate is structurally unavailable because aggregate evidence cannot identify an eligible user.").optional(), "accepted_verification_methods": z.array(z.enum(["facial_age_estimation", "id_document", "digital_id", "credit_card", "world_id"]).describe("Methods for verifying user age for compliance. Does not include 'inferred' as it is not accepted for regulatory compliance.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Verification methods acceptable when verified is an accepted basis. This field narrows verified demographic execution; age_restriction.accepted_methods independently governs legal eligibility and the two sets are intersected when both are present.").optional() }).catchall(z.any()).and(z.union([z.any().refine((value) => !z.object({ "accepted_verification_methods": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "accepted_verification_methods": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "accepted_bases": z.any().refine((value) => !z.array(z.any().refine((value2) => !z.literal("verified").safeParse(value2).success, "Invalid input: Should NOT be valid against schema")).safeParse(value).success, "Invalid input: Should NOT be valid against schema") }))]))) }).catchall(z.any()).describe("Canonical demographic audience targeting intent with optional constraints on how age may be determined. This is distinct from age_restriction: demographics selects an audience, while age_restriction expresses a legal eligibility or verification floor. Fresh create/update targeting MUST compile exactly or be rejected. During get_products, a seller may offer a different configured predicate only through sparse targeting_resolution modifications on a distinguishable product_id; selecting that product accepts the alternative. Sellers never silently broaden, narrow, default, drop, or substitute the basis."), z.null()]).optional(), "frequency_cap": z.union([z.object({ "suppress": z.object({ "interval": z.number().int().gte(1).describe("Number of time units. Must be 1 when unit is 'campaign'."), "unit": z.enum(["seconds", "minutes", "hours", "days", "campaign"]).describe("Time unit. 'seconds' for sub-minute precision. 'campaign' spans the full campaign flight.") }).strict().describe("A time duration expressed as an interval and unit. Used for frequency cap windows, attribution windows, reach optimization windows, time budgets, and other time-based settings. When unit is 'campaign', interval must be 1 \u2014 the window spans the full campaign flight.").describe('Cooldown period between consecutive exposures to the same entity. Prevents back-to-back ad delivery (e.g. {"interval": 60, "unit": "minutes"} for a 1-hour cooldown). Preferred over suppress_minutes.').optional(), "suppress_minutes": z.number().gte(0).describe("Deprecated \u2014 use suppress instead. Cooldown period in minutes between consecutive exposures to the same entity (e.g. 60 for a 1-hour cooldown).").optional(), "max_impressions": z.number().int().gte(1).describe("Maximum number of impressions per entity per window. For duration windows, implementations typically use a rolling window. campaign applies across the owning field's full flight: the package flight for a targeting overlay, or the MediaBuy flight for a root cap.").optional(), "per": z.enum(["individuals", "households", "devices", "accounts", "cookies", "custom"]).describe("Unit of measurement for reach and audience size metrics. Different channels and measurement providers count reach in fundamentally different units, making cross-channel comparison impossible without declaring the unit.").describe("Entity granularity for impression counting. Required when max_impressions is set.").optional(), "window": z.object({ "interval": z.number().int().gte(1).describe("Number of time units. Must be 1 when unit is 'campaign'."), "unit": z.enum(["seconds", "minutes", "hours", "days", "campaign"]).describe("Time unit. 'seconds' for sub-minute precision. 'campaign' spans the full campaign flight.") }).strict().describe("A time duration expressed as an interval and unit. Used for frequency cap windows, attribution windows, reach optimization windows, time budgets, and other time-based settings. When unit is 'campaign', interval must be 1 \u2014 the window spans the full campaign flight.").describe('Time window for the max_impressions cap (e.g. {"interval": 7, "unit": "days"} or {"interval": 1, "unit": "campaign"} for the full flight). Required when max_impressions is set.').optional() }).catchall(z.any()).and(z.union([z.object({ "suppress": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "suppress_minutes": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])).and(z.intersection(z.union([z.any().refine((value) => !z.object({ "max_impressions": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "max_impressions": z.any().refine((value) => value !== void 0, "Required"), "per": z.any().refine((value) => value !== void 0, "Required"), "window": z.any().refine((value) => value !== void 0, "Required") }).passthrough()]), z.intersection(z.union([z.any().refine((value) => !z.object({ "per": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "per": z.any().refine((value) => value !== void 0, "Required"), "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()]), z.union([z.any().refine((value) => !z.object({ "window": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough().safeParse(value).success, "Invalid input: Should NOT be valid against schema"), z.object({ "window": z.any().refine((value) => value !== void 0, "Required"), "max_impressions": z.any().refine((value) => value !== void 0, "Required") }).passthrough()])))).describe("Frequency capping settings for package-level application. Two types of frequency control can be used independently or together: suppress enforces a cooldown between consecutive exposures; max_impressions + per + window caps total exposures per entity in a time window. When both suppress and max_impressions are set, an impression is delivered only if both constraints permit it (AND semantics). At least one of suppress, suppress_minutes, or max_impressions must be set. Field location determines scope; this value has no scope discriminator. The MediaBuy root uses the narrower media-buy-frequency-cap schema, which permits maximum impressions only in 3.2."), z.null()]).optional(), "property_list": z.union([z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the property list"), "list_id": z.string().min(1).describe("Identifier for the property list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a property list for targeting specific properties within this product. The package runs on the intersection of the product's publisher_properties and this list. Sellers SHOULD return a validation error if the product has property_targeting_allowed: false."), z.null()]).optional(), "property_list_exclude": z.union([z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the property list"), "list_id": z.string().min(1).describe("Identifier for the property list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a property list whose properties must not carry the buyer's ads. Matched properties are removed from delivery. Use for brand-safety do-not-run lists (apps, sites). Exclude wins on overlap with property_list, and applies regardless of the product's property_targeting_allowed flag. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "collection_list": z.union([z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the collection list"), "list_id": z.string().min(1).describe("Identifier for the collection list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a collection list for including specific collections (programs, publications, channels) within this product. The package runs on the intersection of matched collections and this list. Use for inclusion-based collection targeting. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "collection_list_exclude": z.union([z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("URL of the agent managing the collection list"), "list_id": z.string().min(1).describe("Identifier for the collection list within the agent"), "auth_token": z.string().describe("JWT or other authorization token for accessing the list. Optional if the list is public or caller has implicit access.").optional() }).strict().describe("Reference to a collection list for excluding specific collections (programs, publications, channels) from this product. Matched collections must not carry the buyer's ads. Use for brand safety do-not-air lists. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "placement_selection": z.union([z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
13807
+ const schemas = [z.object({ "mode": z.literal("selected"), "placement_refs": z.array(z.union([z.intersection(z.object({ "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain where the adagents.json declaring a publisher-catalog placement is hosted, or the inventory publisher associated with an inline placement. Omitted only for legacy single-publisher product-context references.").optional(), "placement_id": z.string().describe("Placement ID from the publisher's adagents.json placement catalog, or an inline seller-defined placement ID interpreted within the enclosing seller and product context.") }).catchall(z.any()).describe("Legacy-compatible product-context reference to a placement. For publisher-catalog placements, publisher_domain plus placement_id resolves the declaration in that publisher's adagents.json. For seller-inline placements, the enclosing seller and product supply scope. When publisher_domain is omitted on legacy inputs, receivers MAY interpret the ID relative to the enclosing single-publisher product. Use placement-identity.json when a self-contained cross-document identity is required."), z.object({ "publisher_domain": z.any().refine((value) => value !== void 0, "Required") }).passthrough()), z.any().superRefine((x2, ctx2) => {
13808
+ const schemas2 = [z.object({ "kind": z.literal("publisher_ref"), "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain whose adagents.json declares placement_id."), "placement_id": z.string().min(1) }).strict(), z.object({ "kind": z.literal("seller_inline"), "seller_agent": z.object({ "agent_url": z.string().refine(adcpJsonSchemaUri, "Invalid URI").describe("The seller agent's API endpoint URL as declared in the property publisher's adagents.json `authorized_agents[].url`. MUST use the `https://` scheme. Receivers compare this URL against the `authorized_agents` list using the AdCP URL canonicalization rules \u2014 not byte-equality \u2014 and reject mismatches with `seller_not_authorized`. See docs/reference/url-canonicalization."), "id": z.string().regex(new RegExp("^[a-zA-Z0-9_-]+$")).min(1).describe("Reserved for a future registry-assigned stable seller identifier. Not used today \u2014 senders MUST NOT populate this field until a registry is defined. When a future release populates both `agent_url` and `id`, `agent_url` remains authoritative and `id` is advisory.").optional() }).strict().describe("Sales agent that defines and maintains the inline placement namespace."), "placement_id": z.string().min(1).describe("Stable placement ID within the defining sales agent's namespace. The agent MUST NOT reuse it for a different semantic placement.") }).strict()];
13809
+ const { errors: errors2, failed: failed2 } = schemas2.reduce(
13810
+ ({ errors: errors3, failed: failed3 }, schema) => ((result) => result.error ? {
13811
+ errors: [...errors3, ...result.error.issues],
13812
+ failed: failed3 + 1
13813
+ } : { errors: errors3, failed: failed3 })(
13814
+ schema.safeParse(x2)
13815
+ ),
13816
+ { errors: [], failed: 0 }
13817
+ );
13818
+ const passed2 = schemas2.length - failed2;
13819
+ if (passed2 !== 1) {
13820
+ ctx2.addIssue(errors2.length ? {
13821
+ path: [],
13822
+ code: "invalid_union",
13823
+ errors: [errors2],
13824
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13825
+ } : {
13826
+ path: [],
13827
+ code: "custom",
13828
+ errors: [errors2],
13829
+ message: "Invalid input: Should pass single schema. Passed " + passed2
13830
+ });
13831
+ }
13832
+ }).describe("Self-contained identity for either a publisher-catalog placement or a sales-agent-defined inline placement. The discriminator names which authority owns placement_id.")])).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Complete required placement set. A reference normally identifies a mode targetable placement. It MAY identify a mode included placement only when the set exactly equals the product's complete fixed included set, which is an inherent match rather than independent selection. Legacy publisher refs use {publisher_domain, placement_id}; authority-discriminated 3.2 identities use placement-identity.json so seller-inline inventory is selected by {seller_agent, placement_id}. An item that exactly matches placement-identity uses that canonical identity; otherwise a released-compatible item with publisher_domain and placement_id uses legacy product-context matching, and tolerated product metadata such as kind, name, or mode has no selection effect."), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict(), z.object({ "mode": z.literal("default"), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict()];
13833
+ const { errors, failed } = schemas.reduce(
13834
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13835
+ errors: [...errors2, ...result.error.issues],
13836
+ failed: failed2 + 1
13837
+ } : { errors: errors2, failed: failed2 })(
13838
+ schema.safeParse(x)
13839
+ ),
13840
+ { errors: [], failed: 0 }
13841
+ );
13842
+ const passed = schemas.length - failed;
13843
+ if (passed !== 1) {
13844
+ ctx.addIssue(errors.length ? {
13845
+ path: [],
13846
+ code: "invalid_union",
13847
+ errors: [errors],
13848
+ message: "Invalid input: Should pass single schema. Passed " + passed
13849
+ } : {
13850
+ path: [],
13851
+ code: "custom",
13852
+ errors: [errors],
13853
+ message: "Invalid input: Should pass single schema. Passed " + passed
13854
+ });
13855
+ }
13856
+ })).describe("Purchased placement selection within the product. This constrains package inventory; it is distinct from creative_assignments[].placement_refs, which only route individual creatives within the purchased set. On create, mode selected supplies the complete selected set and mode default uses the product default. In request-side Targeting Input, a non-null value replaces this dimension, omission preserves or inherits it, and null clears it when the product permits that broader inventory set."), z.null()]).optional(), "collection_selection": z.union([z.record(z.string(), z.any()).and(z.any().superRefine((x, ctx) => {
13857
+ const schemas = [z.object({ "mode": z.literal("selected"), "collections": z.array(z.intersection(z.object({ "publisher_domain": z.string().regex(new RegExp("^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$")).describe("Domain where the adagents.json declaring these collections is hosted (e.g., 'mrbeast.com'). The collections array in that file contains the authoritative collection definitions."), "collection_ids": z.array(z.string()).min(1).describe("Collection IDs from the adagents.json collections array. Each ID must match a collection_id declared in that file. Omit to reference all collections declared in that file.").optional() }).catchall(z.any()).describe("References collections declared in an adagents.json. Buyers resolve full collection objects by fetching the adagents.json at the given domain and matching collection_ids against its collections array. When collection_ids is omitted, the selector references every collection declared in that adagents.json \u2014 the bulk-grant form for authorization scoping (e.g., a host authorizing a channel owner's sales agent for all of the owner's collections without tracking owner-assigned IDs)."), z.object({ "collection_ids": z.any().refine((value) => value !== void 0, "Required") }).passthrough())).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Complete required collection set as domain-qualified selectors with explicit collection_ids; the domain-only bulk-grant form is authorization scoping, not selection. publisher_domain may be an external channel owner's domain."), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict(), z.object({ "mode": z.literal("default"), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).strict()];
13858
+ const { errors, failed } = schemas.reduce(
13859
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13860
+ errors: [...errors2, ...result.error.issues],
13861
+ failed: failed2 + 1
13862
+ } : { errors: errors2, failed: failed2 })(
13863
+ schema.safeParse(x)
13864
+ ),
13865
+ { errors: [], failed: 0 }
13866
+ );
13867
+ const passed = schemas.length - failed;
13868
+ if (passed !== 1) {
13869
+ ctx.addIssue(errors.length ? {
13870
+ path: [],
13871
+ code: "invalid_union",
13872
+ errors: [errors],
13873
+ message: "Invalid input: Should pass single schema. Passed " + passed
13874
+ } : {
13875
+ path: [],
13876
+ code: "custom",
13877
+ errors: [errors],
13878
+ message: "Invalid input: Should pass single schema. Passed " + passed
13879
+ });
13880
+ }
13881
+ })).describe("Purchased collection selection within the product. On create, mode selected supplies the complete selected set and mode default uses the product's full bundle. On package readback this is the committed selection sellers MUST echo as concrete selectors, materializing any collection_list composition; collection_list fields remain the buyer-managed list mechanism. In request-side Targeting Input, a non-null value replaces this dimension, omission preserves or inherits it, and null clears it when the product permits that broader inventory set."), z.null()]).optional(), "age_restriction": z.union([z.object({ "min": z.number().int().gte(13).lte(99).describe("Minimum age required"), "verification_required": z.boolean().describe("Whether verified age (not inferred) is required for compliance").default(false), "accepted_methods": z.array(z.enum(["facial_age_estimation", "id_document", "digital_id", "credit_card", "world_id"]).describe("Methods for verifying user age for compliance. Does not include 'inferred' as it is not accepted for regulatory compliance.")).min(1).describe("Accepted verification methods. If omitted, any method the platform supports is acceptable.").optional() }).strict().describe("Age restriction for compliance. Use for legal requirements (alcohol, gambling), not audience targeting."), z.null()]).optional(), "device_platform": z.union([z.array(z.enum(["ios", "android", "windows", "macos", "linux", "chromeos", "tvos", "tizen", "webos", "fire_os", "roku_os", "unknown"]).describe("Operating system platforms for device targeting. Browser values from Sec-CH-UA-Platform standard, extended for CTV.")).min(1).describe("Restrict to specific platforms. Use for technical compatibility (app only works on iOS). Values from Sec-CH-UA-Platform standard, extended for CTV."), z.null()]).optional(), "device_platform_exclude": z.union([z.array(z.enum(["ios", "android", "windows", "macos", "linux", "chromeos", "tvos", "tizen", "webos", "fire_os", "roku_os", "unknown"]).describe("Operating system platforms for device targeting. Browser values from Sec-CH-UA-Platform standard, extended for CTV.")).min(1).describe("Exclude specific operating-system platforms from delivery. When a platform appears in both device_platform and device_platform_exclude, exclusion wins. Sellers MUST reject a request they cannot enforce rather than silently dropping the exclusion."), z.null()]).optional(), "device_type": z.union([z.array(z.enum(["desktop", "mobile", "tablet", "ctv", "dooh", "unknown"]).describe("Device form factor categories for targeting and reporting. Complements device-platform (operating system) with hardware classification. OpenRTB mapping: 1 (Mobile/Tablet General) \u2192 mobile, 2 (PC) \u2192 desktop, 4 (Phone) \u2192 mobile, 5 (Tablet) \u2192 tablet, 6 (Connected Device) \u2192 ctv, 7 (Set Top Box) \u2192 ctv. DOOH inventory uses dooh.")).min(1).describe("Restrict to specific device form factors. Use for campaigns targeting hardware categories rather than operating systems (e.g., mobile-only promotions, CTV campaigns)."), z.null()]).optional(), "device_type_exclude": z.union([z.array(z.enum(["desktop", "mobile", "tablet", "ctv", "dooh", "unknown"]).describe("Device form factor categories for targeting and reporting. Complements device-platform (operating system) with hardware classification. OpenRTB mapping: 1 (Mobile/Tablet General) \u2192 mobile, 2 (PC) \u2192 desktop, 4 (Phone) \u2192 mobile, 5 (Tablet) \u2192 tablet, 6 (Connected Device) \u2192 ctv, 7 (Set Top Box) \u2192 ctv. DOOH inventory uses dooh.")).min(1).describe("Exclude specific device form factors from delivery (e.g., exclude CTV for app-install campaigns)."), z.null()]).optional(), "browser": z.union([z.array(z.enum(["chrome", "safari", "firefox", "edge", "opera", "samsung_internet", "android_webview", "other", "unknown"]).describe("Portable browser families for targeting the impression delivery and rendering environment, not a post-click landing-page browser. Values identify browser families, not versions or seller-native browser IDs, and MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. android_webview means an impression reliably classified as rendering in Android WebView. other means a seller-recognized browser family that is not explicitly enumerated; unknown means the seller cannot classify the browser into a recognized family.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Restrict delivery to specific canonical browser families in the impression delivery and rendering environment, not the post-click landing-page browser. Values MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. Values in this array use OR semantics. When browser is supplied, families not listed are ineligible: other includes a seller-recognized family that is not explicitly enumerated, while unknown includes a browser the seller cannot classify into a recognized family. When the same family appears in browser and browser_exclude, exclusion wins. Browser and device constraints intersect; a seller that cannot enforce the exact combination MUST exclude or explicitly reconfigure the product during discovery and MUST reject it at create or update rather than silently widening delivery. Browser versions and seller-native IDs are intentionally unsupported."), z.null()]).optional(), "browser_exclude": z.union([z.array(z.enum(["chrome", "safari", "firefox", "edge", "opera", "samsung_internet", "android_webview", "other", "unknown"]).describe("Portable browser families for targeting the impression delivery and rendering environment, not a post-click landing-page browser. Values identify browser families, not versions or seller-native browser IDs, and MUST NOT be inferred solely from operating system, device, web/mobile-web inventory, or placement. android_webview means an impression reliably classified as rendering in Android WebView. other means a seller-recognized browser family that is not explicitly enumerated; unknown means the seller cannot classify the browser into a recognized family.")).min(1).refine((arr) => arr.every((item, i) => arr.indexOf(item) == i), "All items must be unique!").describe("Exclude specific canonical browser families from delivery. other excludes seller-recognized families that are not explicitly enumerated; unknown excludes browsers the seller cannot classify into a recognized family. When the same family appears in browser and browser_exclude, exclusion wins. Sellers MUST reject a request they cannot enforce rather than silently dropping the exclusion."), z.null()]).optional(), "store_catchments": z.union([z.array(z.object({ "catalog_id": z.string().describe("Synced store-type catalog ID from sync_catalogs."), "store_ids": z.array(z.string()).min(1).describe("Filter to specific stores within the catalog. Omit to target all stores.").optional(), "catchment_ids": z.array(z.string()).min(1).describe("Catchment zone IDs to target (e.g., 'walk', 'drive'). Omit to target all catchment zones.").optional() }).catchall(z.any())).min(1).describe("Target users within store catchment areas from a synced store catalog. Each entry references a store-type catalog and optionally narrows to specific stores or catchment zones."), z.null()]).optional(), "geo_proximity": z.union([z.array(z.object({ "lat": z.number().gte(-90).lte(90).describe("Latitude in decimal degrees (WGS 84). Required for travel_time and radius methods.").optional(), "lng": z.number().gte(-180).lte(180).describe("Longitude in decimal degrees (WGS 84). Required for travel_time and radius methods.").optional(), "label": z.string().describe("Human-readable label for this entry (e.g., 'D\xFCsseldorf', 'Heathrow Airport', 'Primary trade area').").optional(), "travel_time": z.object({ "value": z.number().gte(1).describe("Travel time limit."), "unit": z.enum(["min", "hr"]).describe("Time unit for isochrone (travel-time catchment) calculations.") }).strict().describe("Travel time limit for isochrone calculation. The platform resolves this to a geographic boundary based on actual transportation networks.").optional(), "transport_mode": z.enum(["walking", "cycling", "driving", "public_transport"]).describe("Transportation mode for isochrone calculation. Required when travel_time is provided.").optional(), "radius": z.object({ "value": z.number().gt(0).describe("Radius distance."), "unit": z.enum(["km", "mi", "m"]).describe("Distance unit.") }).strict().describe("Simple radius from the point. The platform draws a circle of this distance around the coordinates.").optional(), "geometry": z.object({ "type": z.enum(["Polygon", "MultiPolygon"]).describe("GeoJSON geometry type."), "coordinates": z.array(z.any()).describe("GeoJSON coordinates array. For Polygon: array of linear rings. For MultiPolygon: array of polygons.") }).strict().describe("Pre-computed GeoJSON geometry defining the proximity boundary. Use when the buyer has already calculated isochrones (via TravelTime, Mapbox, etc.) or has custom boundaries. When geometry is provided, lat/lng are not required.").optional(), "ext": z.record(z.string(), z.any()).describe("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.").optional() }).catchall(z.any()).and(z.any().superRefine((x, ctx) => {
13882
+ const schemas = [z.object({ "lat": z.any().refine((value) => value !== void 0, "Required"), "lng": z.any().refine((value) => value !== void 0, "Required"), "travel_time": z.any().refine((value) => value !== void 0, "Required"), "transport_mode": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "lat": z.any().refine((value) => value !== void 0, "Required"), "lng": z.any().refine((value) => value !== void 0, "Required"), "radius": z.any().refine((value) => value !== void 0, "Required") }).passthrough(), z.object({ "geometry": z.any().refine((value) => value !== void 0, "Required") }).passthrough()];
13883
+ const { errors, failed } = schemas.reduce(
13884
+ ({ errors: errors2, failed: failed2 }, schema) => ((result) => result.error ? {
13885
+ errors: [...errors2, ...result.error.issues],
13886
+ failed: failed2 + 1
13887
+ } : { errors: errors2, failed: failed2 })(
13888
+ schema.safeParse(x)
13889
+ ),
13890
+ { errors: [], failed: 0 }
13891
+ );
13892
+ const passed = schemas.length - failed;
13893
+ if (passed !== 1) {
13894
+ ctx.addIssue(errors.length ? {
13895
+ path: [],
13896
+ code: "invalid_union",
13897
+ errors: [errors],
13898
+ message: "Invalid input: Should pass single schema. Passed " + passed
13899
+ } : {
13900
+ path: [],
13901
+ code: "custom",
13902
+ errors: [errors],
13903
+ message: "Invalid input: Should pass single schema. Passed " + passed
13904
+ });
13905
+ }
13906
+ }))).min(1).describe("Target users within travel time, distance, or a custom boundary around arbitrary geographic points. Multiple entries use OR semantics \u2014 a user within range of any listed point is eligible. For campaigns targeting 10+ locations, consider using store_catchments with a location catalog instead. Seller must declare support in get_adcp_capabilities."), z.null()]).optional(), "language": z.union([z.array(z.string().regex(new RegExp("^(?:[a-z]{2,8}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?(?:-(?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*(?:-[0-9a-wy-z](?:-[a-z0-9]{2,8})+)*(?:-x(?:-[a-z0-9]{1,8})+)?|x(?:-[a-z0-9]{1,8})+)$")).min(2).max(63).describe("A well-formed BCP 47 language tag used by AdCP only as language identity. Script and region may refine that identity; other valid BCP 47 subtags remain part of tag matching but do not make this a general locale-settings object. It does not determine currency, time zone, number/date formatting, market, or legal jurisdiction. The AdCP canonical wire profile requires lower-case language and variants, title-case script, and upper-case region (for example `en-US`, `zh-Hant-TW`, or `x-private`). RFC 5646 comparisons are case-insensitive and its case regularization is optional; AdCP intentionally requires this stricter single wire spelling and receivers MUST reject differently cased tags rather than silently normalizing them. The schema pattern enforces the AdCP casing profile and extension structure for commonly used tags; conforming receivers additionally validate the complete RFC 5646 grammar and registry rules. Every new AdCP field carrying BCP 47 language identity or a concrete language range MUST reference this schema instead of declaring independent string constraints.")).min(1).describe("Restrict to users with specific language preferences using canonical BCP 47 language ranges. Each buyer range is evaluated against a user's language-preference tag with RFC 4647 section 3.3.1 Basic Filtering: 'fr' matches 'fr', 'fr-CA', and 'fr-FR', while 'fr-CA' matches 'fr-CA' and more-specific descendants but not 'fr' or 'fr-FR'. Values use OR logic."), z.null().describe("Restrict to users with specific language preferences using canonical BCP 47 language ranges. Each buyer range is evaluated against a user's language-preference tag with RFC 4647 section 3.3.1 Basic Filtering: 'fr' matches 'fr', 'fr-CA', and 'fr-FR', while 'fr-CA' matches 'fr-CA' and more-specific descendants but not 'fr' or 'fr-FR'. Values use OR logic.")]).describe("Restrict to users with specific language preferences using canonical BCP 47 language ranges. Each buyer range is evaluated against a user's language-preference tag with RFC 4647 section 3.3.1 Basic Filtering: 'fr' matches 'fr', 'fr-CA', and 'fr-FR', while 'fr-CA' matches 'fr-CA' and more-specific descendants but not 'fr' or 'fr-FR'. Values use OR logic.").optional(), "keyword_targets": z.union([z.array(z.object({ "keyword": z.string().min(1).describe("The keyword to target"), "match_type": z.enum(["broad", "phrase", "exact"]).describe("Keyword targeting match type. broad: ads may serve on queries semantically related to the keyword. phrase: ads serve when the query contains the keyword phrase. exact: ads serve only when the query matches the keyword exactly."), "bid_price": z.number().gte(0).describe("Per-keyword bid price, denominated in the same currency as the package's pricing option. Overrides the package-level bid_price for this keyword. Inherits the max_bid interpretation from the pricing option: when max_bid is true, this is the keyword's bid ceiling; when false, this is the exact bid. If omitted, the package bid_price applies.").optional() }).strict()).min(1).describe("Keyword targeting for search and retail media platforms. Restricts delivery to queries matching the specified keywords. Each keyword is identified by the tuple (keyword, match_type) \u2014 the same keyword string with different match types are distinct targets. Sellers SHOULD reject duplicate (keyword, match_type) pairs within a single request. Seller must declare support in get_adcp_capabilities."), z.null().describe("Keyword targeting for search and retail media platforms. Restricts delivery to queries matching the specified keywords. Each keyword is identified by the tuple (keyword, match_type) \u2014 the same keyword string with different match types are distinct targets. Sellers SHOULD reject duplicate (keyword, match_type) pairs within a single request. Seller must declare support in get_adcp_capabilities.")]).describe("Keyword targeting for search and retail media platforms. Restricts delivery to queries matching the specified keywords. Each keyword is identified by the tuple (keyword, match_type) \u2014 the same keyword string with different match types are distinct targets. Sellers SHOULD reject duplicate (keyword, match_type) pairs within a single request. Seller must declare support in get_adcp_capabilities.").optional(), "negative_keywords": z.union([z.array(z.object({ "keyword": z.string().min(1).describe("The keyword to exclude"), "match_type": z.enum(["broad", "phrase", "exact"]).describe("Keyword targeting match type. broad: ads may serve on queries semantically related to the keyword. phrase: ads serve when the query contains the keyword phrase. exact: ads serve only when the query matches the keyword exactly.") }).strict().describe("An excluded keyword.")).min(1).describe("Keywords to exclude from delivery. Queries matching these keywords will not trigger the ad. Each negative keyword is identified by the tuple (keyword, match_type). Seller must declare support in get_adcp_capabilities."), z.null().describe("Keywords to exclude from delivery. Queries matching these keywords will not trigger the ad. Each negative keyword is identified by the tuple (keyword, match_type). Seller must declare support in get_adcp_capabilities.")]).describe("Keywords to exclude from delivery. Queries matching these keywords will not trigger the ad. Each negative keyword is identified by the tuple (keyword, match_type). Seller must declare support in get_adcp_capabilities.").optional() }).catchall(z.any()).describe("Request-only targeting mutation input. Each known dimension has three states: omission inherits the product default on create or leaves the stored dimension unchanged on update; null explicitly suppresses the product default on create or clears the stored dimension on update; and a non-null value replaces that dimension and MUST satisfy the corresponding strict targeting.json constraint. Null is a command and MUST NOT appear in discovery criteria, accepted commercial terms, package responses, or package readback. Sellers apply all supplied dimensions atomically and return only the resulting non-null effective targeting state.");
13907
+ const exactSchema = objectSchema.superRefine((value, ctx) => {
13908
+ const checked = z.intersection(z.union([z.any().refine((value2) => !z.object({ "demographics": z.any().refine((value3) => value3 !== void 0, "Required"), "age_restriction": z.any().refine((value3) => value3 !== void 0, "Required") }).passthrough().safeParse(value2).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "demographics": z.any().refine((value2) => value2 !== void 0, "Required"), "age_restriction": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough(), z.object({ "demographics": z.object({ "age": z.object({ "include_unknown": z.literal(false).optional() }).optional() }).optional() }))]).describe("Unknown-age delivery cannot satisfy a minimum-age eligibility policy. When demographic audience targeting and age_restriction are both present, include_unknown must be false."), z.union([z.any().refine((value2) => !z.object({ "age_restriction": z.object({ "verification_required": z.literal(true) }), "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value3) => value3 !== void 0, "Required") }).passthrough() }) }).safeParse(value2).success, "Invalid input: Should NOT be valid against schema"), z.intersection(z.object({ "age_restriction": z.object({ "verification_required": z.literal(true) }), "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value2) => value2 !== void 0, "Required") }).passthrough() }) }), z.object({ "demographics": z.object({ "age": z.object({ "accepted_bases": z.any().refine((value2) => !z.array(z.any().refine((value3) => !z.literal("verified").safeParse(value3).success, "Invalid input: Should NOT be valid against schema")).safeParse(value2).success, "Invalid input: Should NOT be valid against schema").optional() }).optional() }).optional() }))]).describe("A legal verification requirement always narrows demographic targeting. When the buyer supplies accepted_bases and age_restriction requires verification, verified must be accepted; otherwise the constraints have an empty intersection and the request is invalid.")).safeParse(value);
13909
+ if (!checked.success) {
13910
+ for (const issue of checked.error.issues) {
13911
+ ctx.addIssue({ code: "custom", path: issue.path, message: issue.message });
13912
+ }
13913
+ }
13914
+ });
13915
+ return Object.assign(exactSchema, {
13916
+ pick: objectSchema.pick.bind(objectSchema),
13917
+ omit: objectSchema.omit.bind(objectSchema),
13918
+ extend: objectSchema.extend.bind(objectSchema)
13919
+ });
13920
+ })();
13168
13921
  const ProductDiscoveryCriteriaSchema = z.object({
13169
13922
  product_ids: z.array(z.string()).optional(),
13170
13923
  offer_filters: ProductOfferFiltersSchema.optional(),
@@ -19559,12 +20312,18 @@ export {
19559
20312
  TargetLocalizationReadbackSchema,
19560
20313
  TargetingCollectionListSchema,
19561
20314
  TargetingCollectionSelectionSchema,
20315
+ TargetingDevicePlatformsInputSchema,
20316
+ TargetingDeviceTypesInputSchema,
19562
20317
  TargetingFrequencyCapSchema,
20318
+ TargetingGeoMetrosInputSchema,
19563
20319
  TargetingGeoMetrosSchema,
20320
+ TargetingKeywordsInputSchema,
19564
20321
  TargetingKeywordsSchema,
19565
20322
  TargetingKvsSchema,
20323
+ TargetingLanguagesInputSchema,
19566
20324
  TargetingLanguagesSchema,
19567
20325
  TargetingModificationSchema,
20326
+ TargetingNegativeKeywordsInputSchema,
19568
20327
  TargetingNegativeKeywordsSchema,
19569
20328
  TargetingOverlayInputSchema,
19570
20329
  TargetingOverlayRequirementsSchema,