@adcp/sdk 12.1.1 → 13.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/README.md +19 -3
  2. package/bin/adcp-fuzz.js +3 -1
  3. package/dist/lib/adapters/content-standards-adapter.d.mts +9 -9
  4. package/dist/lib/adapters/content-standards-adapter.d.ts +9 -9
  5. package/dist/lib/adapters/content-standards-adapter.d.ts.map +1 -1
  6. package/dist/lib/adapters/content-standards-adapter.js +22 -22
  7. package/dist/lib/adapters/content-standards-adapter.js.map +1 -1
  8. package/dist/lib/adapters/content-standards-adapter.mjs +18 -18
  9. package/dist/lib/adapters/content-standards-adapter.mjs.map +1 -1
  10. package/dist/lib/adapters/index.d.mts +2 -2
  11. package/dist/lib/adapters/index.d.ts +2 -2
  12. package/dist/lib/adapters/index.d.ts.map +1 -1
  13. package/dist/lib/adapters/index.js +10 -10
  14. package/dist/lib/adapters/index.js.map +1 -1
  15. package/dist/lib/adapters/index.mjs +9 -9
  16. package/dist/lib/adapters/index.mjs.map +1 -1
  17. package/dist/lib/auth/oauth/provider-cache.d.mts +7 -0
  18. package/dist/lib/auth/oauth/provider-cache.d.ts +8 -0
  19. package/dist/lib/auth/oauth/provider-cache.d.ts.map +1 -0
  20. package/dist/lib/auth/oauth/provider-cache.js +44 -0
  21. package/dist/lib/auth/oauth/provider-cache.js.map +1 -0
  22. package/dist/lib/auth/oauth/provider-cache.mjs +19 -0
  23. package/dist/lib/auth/oauth/provider-cache.mjs.map +1 -0
  24. package/dist/lib/conformance/invariants/uniformError.js +1 -1
  25. package/dist/lib/conformance/invariants/uniformError.js.map +1 -1
  26. package/dist/lib/conformance/invariants/uniformError.mjs +1 -1
  27. package/dist/lib/conformance/invariants/uniformError.mjs.map +1 -1
  28. package/dist/lib/conformance/runners.js +1 -1
  29. package/dist/lib/conformance/runners.js.map +1 -1
  30. package/dist/lib/conformance/runners.mjs +1 -1
  31. package/dist/lib/conformance/runners.mjs.map +1 -1
  32. package/dist/lib/conformance/seeder.js +5 -5
  33. package/dist/lib/conformance/seeder.js.map +1 -1
  34. package/dist/lib/conformance/seeder.mjs +5 -5
  35. package/dist/lib/conformance/seeder.mjs.map +1 -1
  36. package/dist/lib/core/ADCPMultiAgentClient.d.mts +26 -29
  37. package/dist/lib/core/ADCPMultiAgentClient.d.ts +26 -29
  38. package/dist/lib/core/ADCPMultiAgentClient.d.ts.map +1 -1
  39. package/dist/lib/core/ADCPMultiAgentClient.js +27 -19
  40. package/dist/lib/core/ADCPMultiAgentClient.js.map +1 -1
  41. package/dist/lib/core/ADCPMultiAgentClient.mjs +27 -19
  42. package/dist/lib/core/ADCPMultiAgentClient.mjs.map +1 -1
  43. package/dist/lib/core/AgentClient.d.mts +148 -138
  44. package/dist/lib/core/AgentClient.d.ts +148 -138
  45. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  46. package/dist/lib/core/AgentClient.js +174 -85
  47. package/dist/lib/core/AgentClient.js.map +1 -1
  48. package/dist/lib/core/AgentClient.mjs +174 -85
  49. package/dist/lib/core/AgentClient.mjs.map +1 -1
  50. package/dist/lib/core/AsyncHandler.d.mts +18 -16
  51. package/dist/lib/core/AsyncHandler.d.ts +18 -16
  52. package/dist/lib/core/AsyncHandler.d.ts.map +1 -1
  53. package/dist/lib/core/AsyncHandler.js +22 -1
  54. package/dist/lib/core/AsyncHandler.js.map +1 -1
  55. package/dist/lib/core/AsyncHandler.mjs +22 -1
  56. package/dist/lib/core/AsyncHandler.mjs.map +1 -1
  57. package/dist/lib/core/ConversationTypes.d.mts +6 -2
  58. package/dist/lib/core/ConversationTypes.d.ts +6 -2
  59. package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
  60. package/dist/lib/core/ConversationTypes.js.map +1 -1
  61. package/dist/lib/core/CreativeAgentClient.d.mts +41 -17
  62. package/dist/lib/core/CreativeAgentClient.d.ts +41 -17
  63. package/dist/lib/core/CreativeAgentClient.d.ts.map +1 -1
  64. package/dist/lib/core/CreativeAgentClient.js +39 -12
  65. package/dist/lib/core/CreativeAgentClient.js.map +1 -1
  66. package/dist/lib/core/CreativeAgentClient.mjs +39 -12
  67. package/dist/lib/core/CreativeAgentClient.mjs.map +1 -1
  68. package/dist/lib/core/SingleAgentClient.d.mts +127 -50
  69. package/dist/lib/core/SingleAgentClient.d.ts +127 -50
  70. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  71. package/dist/lib/core/SingleAgentClient.js +1617 -177
  72. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  73. package/dist/lib/core/SingleAgentClient.mjs +1627 -177
  74. package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
  75. package/dist/lib/core/TaskExecutor.d.mts +9 -0
  76. package/dist/lib/core/TaskExecutor.d.ts +9 -0
  77. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  78. package/dist/lib/core/TaskExecutor.js +136 -43
  79. package/dist/lib/core/TaskExecutor.js.map +1 -1
  80. package/dist/lib/core/TaskExecutor.mjs +136 -43
  81. package/dist/lib/core/TaskExecutor.mjs.map +1 -1
  82. package/dist/lib/index.d.mts +111 -17
  83. package/dist/lib/index.d.ts +111 -17
  84. package/dist/lib/index.d.ts.map +1 -1
  85. package/dist/lib/index.js +94 -94
  86. package/dist/lib/index.js.map +1 -1
  87. package/dist/lib/index.mjs +93 -94
  88. package/dist/lib/index.mjs.map +1 -1
  89. package/dist/lib/protocols/index.d.ts.map +1 -1
  90. package/dist/lib/protocols/index.js +6 -15
  91. package/dist/lib/protocols/index.js.map +1 -1
  92. package/dist/lib/protocols/index.mjs +6 -16
  93. package/dist/lib/protocols/index.mjs.map +1 -1
  94. package/dist/lib/protocols/mcp-modern.d.ts.map +1 -1
  95. package/dist/lib/protocols/mcp-modern.js +87 -12
  96. package/dist/lib/protocols/mcp-modern.js.map +1 -1
  97. package/dist/lib/protocols/mcp-modern.mjs +89 -12
  98. package/dist/lib/protocols/mcp-modern.mjs.map +1 -1
  99. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  100. package/dist/lib/server/create-adcp-server.d.mts +6 -0
  101. package/dist/lib/server/create-adcp-server.d.ts +6 -0
  102. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  103. package/dist/lib/server/create-adcp-server.js +295 -48
  104. package/dist/lib/server/create-adcp-server.js.map +1 -1
  105. package/dist/lib/server/create-adcp-server.mjs +301 -50
  106. package/dist/lib/server/create-adcp-server.mjs.map +1 -1
  107. package/dist/lib/server/decisioning/assembly-helpers.d.mts +27 -13
  108. package/dist/lib/server/decisioning/assembly-helpers.d.ts +27 -13
  109. package/dist/lib/server/decisioning/assembly-helpers.d.ts.map +1 -1
  110. package/dist/lib/server/decisioning/assembly-helpers.js +136 -14
  111. package/dist/lib/server/decisioning/assembly-helpers.js.map +1 -1
  112. package/dist/lib/server/decisioning/assembly-helpers.mjs +134 -13
  113. package/dist/lib/server/decisioning/assembly-helpers.mjs.map +1 -1
  114. package/dist/lib/server/decisioning/index.d.mts +13 -12
  115. package/dist/lib/server/decisioning/index.d.ts +13 -12
  116. package/dist/lib/server/decisioning/index.d.ts.map +1 -1
  117. package/dist/lib/server/decisioning/index.js +6 -0
  118. package/dist/lib/server/decisioning/index.js.map +1 -1
  119. package/dist/lib/server/decisioning/index.mjs +9 -3
  120. package/dist/lib/server/decisioning/index.mjs.map +1 -1
  121. package/dist/lib/server/decisioning/list-helpers.d.mts +13 -3
  122. package/dist/lib/server/decisioning/list-helpers.d.ts +13 -3
  123. package/dist/lib/server/decisioning/list-helpers.d.ts.map +1 -1
  124. package/dist/lib/server/decisioning/list-helpers.js +13 -3
  125. package/dist/lib/server/decisioning/list-helpers.js.map +1 -1
  126. package/dist/lib/server/decisioning/list-helpers.mjs +11 -2
  127. package/dist/lib/server/decisioning/list-helpers.mjs.map +1 -1
  128. package/dist/lib/server/decisioning/manifest-helpers.d.mts +5 -3
  129. package/dist/lib/server/decisioning/manifest-helpers.d.ts +5 -3
  130. package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
  131. package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
  132. package/dist/lib/server/decisioning/manifest-helpers.mjs.map +1 -1
  133. package/dist/lib/server/decisioning/proposal/dispatch.d.mts +2 -2
  134. package/dist/lib/server/decisioning/proposal/dispatch.d.ts +2 -2
  135. package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
  136. package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
  137. package/dist/lib/server/decisioning/proposal/dispatch.mjs.map +1 -1
  138. package/dist/lib/server/decisioning/proposal/index.d.mts +1 -1
  139. package/dist/lib/server/decisioning/proposal/index.d.ts +1 -1
  140. package/dist/lib/server/decisioning/proposal/index.d.ts.map +1 -1
  141. package/dist/lib/server/decisioning/proposal/index.js.map +1 -1
  142. package/dist/lib/server/decisioning/proposal/index.mjs.map +1 -1
  143. package/dist/lib/server/decisioning/proposal/lifecycle.d.mts +3 -2
  144. package/dist/lib/server/decisioning/proposal/lifecycle.d.ts +3 -2
  145. package/dist/lib/server/decisioning/proposal/lifecycle.d.ts.map +1 -1
  146. package/dist/lib/server/decisioning/proposal/lifecycle.js.map +1 -1
  147. package/dist/lib/server/decisioning/proposal/lifecycle.mjs.map +1 -1
  148. package/dist/lib/server/decisioning/proposal/mock-manager.d.mts +3 -3
  149. package/dist/lib/server/decisioning/proposal/mock-manager.d.ts +3 -3
  150. package/dist/lib/server/decisioning/proposal/mock-manager.d.ts.map +1 -1
  151. package/dist/lib/server/decisioning/proposal/mock-manager.js.map +1 -1
  152. package/dist/lib/server/decisioning/proposal/mock-manager.mjs.map +1 -1
  153. package/dist/lib/server/decisioning/proposal/types.d.mts +10 -6
  154. package/dist/lib/server/decisioning/proposal/types.d.ts +10 -6
  155. package/dist/lib/server/decisioning/proposal/types.d.ts.map +1 -1
  156. package/dist/lib/server/decisioning/proposal/types.js.map +1 -1
  157. package/dist/lib/server/decisioning/proposal/types.mjs.map +1 -1
  158. package/dist/lib/server/decisioning/runtime/from-platform.d.mts +21 -2
  159. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +21 -2
  160. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  161. package/dist/lib/server/decisioning/runtime/from-platform.js +754 -81
  162. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  163. package/dist/lib/server/decisioning/runtime/from-platform.mjs +763 -81
  164. package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
  165. package/dist/lib/server/decisioning/specialisms/brand-rights.d.mts +9 -9
  166. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +9 -9
  167. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
  168. package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
  169. package/dist/lib/server/decisioning/specialisms/content-standards.d.mts +16 -16
  170. package/dist/lib/server/decisioning/specialisms/content-standards.d.ts +16 -16
  171. package/dist/lib/server/decisioning/specialisms/content-standards.d.ts.map +1 -1
  172. package/dist/lib/server/decisioning/specialisms/content-standards.js.map +1 -1
  173. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.mts +15 -13
  174. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +15 -13
  175. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
  176. package/dist/lib/server/decisioning/specialisms/creative-ad-server.js.map +1 -1
  177. package/dist/lib/server/decisioning/specialisms/creative.d.mts +12 -11
  178. package/dist/lib/server/decisioning/specialisms/creative.d.ts +12 -11
  179. package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
  180. package/dist/lib/server/decisioning/specialisms/creative.js.map +1 -1
  181. package/dist/lib/server/decisioning/specialisms/sales.d.mts +25 -15
  182. package/dist/lib/server/decisioning/specialisms/sales.d.ts +25 -15
  183. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  184. package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
  185. package/dist/lib/server/index.d.mts +3 -3
  186. package/dist/lib/server/index.d.ts +3 -3
  187. package/dist/lib/server/index.d.ts.map +1 -1
  188. package/dist/lib/server/index.js +72 -72
  189. package/dist/lib/server/index.js.map +1 -1
  190. package/dist/lib/server/index.mjs +36 -36
  191. package/dist/lib/server/index.mjs.map +1 -1
  192. package/dist/lib/server/legacy/v5/index.d.mts +1 -0
  193. package/dist/lib/server/legacy/v5/index.d.ts +1 -0
  194. package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
  195. package/dist/lib/server/legacy/v5/index.js +74 -1
  196. package/dist/lib/server/legacy/v5/index.js.map +1 -1
  197. package/dist/lib/server/legacy/v5/index.mjs +75 -1
  198. package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
  199. package/dist/lib/server/responses.d.mts +2 -2
  200. package/dist/lib/server/responses.d.ts +2 -2
  201. package/dist/lib/server/responses.js.map +1 -1
  202. package/dist/lib/server/responses.mjs.map +1 -1
  203. package/dist/lib/testing/client.js +1 -1
  204. package/dist/lib/testing/client.js.map +1 -1
  205. package/dist/lib/testing/client.mjs +1 -1
  206. package/dist/lib/testing/client.mjs.map +1 -1
  207. package/dist/lib/testing/scenarios/brand-rights.js +6 -6
  208. package/dist/lib/testing/scenarios/brand-rights.js.map +1 -1
  209. package/dist/lib/testing/scenarios/brand-rights.mjs +6 -6
  210. package/dist/lib/testing/scenarios/brand-rights.mjs.map +1 -1
  211. package/dist/lib/testing/scenarios/creative.js +7 -7
  212. package/dist/lib/testing/scenarios/creative.js.map +1 -1
  213. package/dist/lib/testing/scenarios/creative.mjs +7 -7
  214. package/dist/lib/testing/scenarios/creative.mjs.map +1 -1
  215. package/dist/lib/testing/scenarios/discovery.js +2 -2
  216. package/dist/lib/testing/scenarios/discovery.js.map +1 -1
  217. package/dist/lib/testing/scenarios/discovery.mjs +2 -2
  218. package/dist/lib/testing/scenarios/discovery.mjs.map +1 -1
  219. package/dist/lib/testing/scenarios/edge-cases.js +11 -11
  220. package/dist/lib/testing/scenarios/edge-cases.js.map +1 -1
  221. package/dist/lib/testing/scenarios/edge-cases.mjs +11 -11
  222. package/dist/lib/testing/scenarios/edge-cases.mjs.map +1 -1
  223. package/dist/lib/testing/scenarios/governance.d.ts.map +1 -1
  224. package/dist/lib/testing/scenarios/governance.js +16 -22
  225. package/dist/lib/testing/scenarios/governance.js.map +1 -1
  226. package/dist/lib/testing/scenarios/governance.mjs +16 -22
  227. package/dist/lib/testing/scenarios/governance.mjs.map +1 -1
  228. package/dist/lib/testing/scenarios/media-buy.js +5 -5
  229. package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
  230. package/dist/lib/testing/scenarios/media-buy.mjs +5 -5
  231. package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
  232. package/dist/lib/testing/scenarios/schema-compliance.js +1 -1
  233. package/dist/lib/testing/scenarios/schema-compliance.js.map +1 -1
  234. package/dist/lib/testing/scenarios/schema-compliance.mjs +1 -1
  235. package/dist/lib/testing/scenarios/schema-compliance.mjs.map +1 -1
  236. package/dist/lib/testing/scenarios/trusted-match.d.ts.map +1 -1
  237. package/dist/lib/testing/scenarios/trusted-match.js +4 -3
  238. package/dist/lib/testing/scenarios/trusted-match.js.map +1 -1
  239. package/dist/lib/testing/scenarios/trusted-match.mjs +4 -3
  240. package/dist/lib/testing/scenarios/trusted-match.mjs.map +1 -1
  241. package/dist/lib/testing/storyboard/shape-drift-hints.d.mts +3 -4
  242. package/dist/lib/testing/storyboard/shape-drift-hints.d.ts +3 -4
  243. package/dist/lib/testing/storyboard/shape-drift-hints.d.ts.map +1 -1
  244. package/dist/lib/testing/storyboard/shape-drift-hints.js +27 -27
  245. package/dist/lib/testing/storyboard/shape-drift-hints.js.map +1 -1
  246. package/dist/lib/testing/storyboard/shape-drift-hints.mjs +27 -27
  247. package/dist/lib/testing/storyboard/shape-drift-hints.mjs.map +1 -1
  248. package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
  249. package/dist/lib/testing/storyboard/task-map.js +43 -5
  250. package/dist/lib/testing/storyboard/task-map.js.map +1 -1
  251. package/dist/lib/testing/storyboard/task-map.mjs +43 -5
  252. package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
  253. package/dist/lib/testing/test-helpers.d.mts +2 -2
  254. package/dist/lib/testing/test-helpers.d.ts +2 -2
  255. package/dist/lib/testing/test-helpers.js.map +1 -1
  256. package/dist/lib/testing/test-helpers.mjs.map +1 -1
  257. package/dist/lib/types/adcp.d.mts +14 -14
  258. package/dist/lib/types/adcp.d.ts +14 -14
  259. package/dist/lib/types/adcp.d.ts.map +1 -1
  260. package/dist/lib/types/adcp.js.map +1 -1
  261. package/dist/lib/types/adcp.mjs.map +1 -1
  262. package/dist/lib/types/index.d.mts +2 -2
  263. package/dist/lib/types/index.d.ts +2 -2
  264. package/dist/lib/types/index.d.ts.map +1 -1
  265. package/dist/lib/types/index.js.map +1 -1
  266. package/dist/lib/types/index.mjs.map +1 -1
  267. package/dist/lib/utils/capabilities.d.mts +6 -0
  268. package/dist/lib/utils/capabilities.d.ts +6 -0
  269. package/dist/lib/utils/capabilities.d.ts.map +1 -1
  270. package/dist/lib/utils/capabilities.js +4 -0
  271. package/dist/lib/utils/capabilities.js.map +1 -1
  272. package/dist/lib/utils/capabilities.mjs +4 -0
  273. package/dist/lib/utils/capabilities.mjs.map +1 -1
  274. package/dist/lib/utils/creative-delivery.d.mts +52 -10
  275. package/dist/lib/utils/creative-delivery.d.ts +52 -10
  276. package/dist/lib/utils/creative-delivery.d.ts.map +1 -1
  277. package/dist/lib/utils/creative-delivery.js +104 -9
  278. package/dist/lib/utils/creative-delivery.js.map +1 -1
  279. package/dist/lib/utils/creative-delivery.mjs +104 -8
  280. package/dist/lib/utils/creative-delivery.mjs.map +1 -1
  281. package/dist/lib/utils/format-assets.d.mts +41 -38
  282. package/dist/lib/utils/format-assets.d.ts +41 -38
  283. package/dist/lib/utils/format-assets.d.ts.map +1 -1
  284. package/dist/lib/utils/format-assets.js +3 -1
  285. package/dist/lib/utils/format-assets.js.map +1 -1
  286. package/dist/lib/utils/format-assets.mjs +3 -1
  287. package/dist/lib/utils/format-assets.mjs.map +1 -1
  288. package/dist/lib/utils/index.d.mts +8 -8
  289. package/dist/lib/utils/index.d.ts +8 -8
  290. package/dist/lib/utils/index.d.ts.map +1 -1
  291. package/dist/lib/utils/index.js +11 -9
  292. package/dist/lib/utils/index.js.map +1 -1
  293. package/dist/lib/utils/index.mjs +9 -8
  294. package/dist/lib/utils/index.mjs.map +1 -1
  295. package/dist/lib/utils/preview-utils.d.mts +11 -8
  296. package/dist/lib/utils/preview-utils.d.ts +11 -8
  297. package/dist/lib/utils/preview-utils.d.ts.map +1 -1
  298. package/dist/lib/utils/preview-utils.js +4 -4
  299. package/dist/lib/utils/preview-utils.js.map +1 -1
  300. package/dist/lib/utils/preview-utils.mjs +3 -3
  301. package/dist/lib/utils/preview-utils.mjs.map +1 -1
  302. package/dist/lib/utils/tool-request-schemas.d.mts +2 -2
  303. package/dist/lib/utils/tool-request-schemas.d.ts +2 -2
  304. package/dist/lib/v2/projection/aao-reference-formats.json +492 -0
  305. package/dist/lib/v2/projection/augment-response.d.mts +31 -11
  306. package/dist/lib/v2/projection/augment-response.d.ts +31 -11
  307. package/dist/lib/v2/projection/augment-response.d.ts.map +1 -1
  308. package/dist/lib/v2/projection/augment-response.js +233 -27
  309. package/dist/lib/v2/projection/augment-response.js.map +1 -1
  310. package/dist/lib/v2/projection/augment-response.mjs +232 -27
  311. package/dist/lib/v2/projection/augment-response.mjs.map +1 -1
  312. package/dist/lib/v2/projection/builders.d.mts +7 -6
  313. package/dist/lib/v2/projection/builders.d.ts +7 -6
  314. package/dist/lib/v2/projection/builders.d.ts.map +1 -1
  315. package/dist/lib/v2/projection/builders.js +11 -8
  316. package/dist/lib/v2/projection/builders.js.map +1 -1
  317. package/dist/lib/v2/projection/builders.mjs +9 -6
  318. package/dist/lib/v2/projection/builders.mjs.map +1 -1
  319. package/dist/lib/v2/projection/catalog-snapshot.d.mts +47 -0
  320. package/dist/lib/v2/projection/catalog-snapshot.d.ts +48 -0
  321. package/dist/lib/v2/projection/catalog-snapshot.d.ts.map +1 -0
  322. package/dist/lib/v2/projection/catalog-snapshot.js +291 -0
  323. package/dist/lib/v2/projection/catalog-snapshot.js.map +1 -0
  324. package/dist/lib/v2/projection/catalog-snapshot.mjs +265 -0
  325. package/dist/lib/v2/projection/catalog-snapshot.mjs.map +1 -0
  326. package/dist/lib/v2/projection/catalog.d.mts +23 -2
  327. package/dist/lib/v2/projection/catalog.d.ts +23 -2
  328. package/dist/lib/v2/projection/catalog.d.ts.map +1 -1
  329. package/dist/lib/v2/projection/catalog.js +34 -10
  330. package/dist/lib/v2/projection/catalog.js.map +1 -1
  331. package/dist/lib/v2/projection/catalog.mjs +33 -10
  332. package/dist/lib/v2/projection/catalog.mjs.map +1 -1
  333. package/dist/lib/v2/projection/creative-delivery.d.mts +157 -0
  334. package/dist/lib/v2/projection/creative-delivery.d.ts +158 -0
  335. package/dist/lib/v2/projection/creative-delivery.d.ts.map +1 -0
  336. package/dist/lib/v2/projection/creative-delivery.js +967 -0
  337. package/dist/lib/v2/projection/creative-delivery.js.map +1 -0
  338. package/dist/lib/v2/projection/creative-delivery.mjs +941 -0
  339. package/dist/lib/v2/projection/creative-delivery.mjs.map +1 -0
  340. package/dist/lib/v2/projection/index.d.mts +8 -6
  341. package/dist/lib/v2/projection/index.d.ts +8 -6
  342. package/dist/lib/v2/projection/index.d.ts.map +1 -1
  343. package/dist/lib/v2/projection/index.js +26 -4
  344. package/dist/lib/v2/projection/index.js.map +1 -1
  345. package/dist/lib/v2/projection/index.mjs +28 -4
  346. package/dist/lib/v2/projection/index.mjs.map +1 -1
  347. package/dist/lib/v2/projection/legacy-metadata.d.mts +21 -0
  348. package/dist/lib/v2/projection/legacy-metadata.d.ts +22 -0
  349. package/dist/lib/v2/projection/legacy-metadata.d.ts.map +1 -0
  350. package/dist/lib/v2/projection/legacy-metadata.js +73 -0
  351. package/dist/lib/v2/projection/legacy-metadata.js.map +1 -0
  352. package/dist/lib/v2/projection/legacy-metadata.mjs +45 -0
  353. package/dist/lib/v2/projection/legacy-metadata.mjs.map +1 -0
  354. package/dist/lib/v2/projection/types.d.mts +29 -23
  355. package/dist/lib/v2/projection/types.d.ts +29 -23
  356. package/dist/lib/v2/projection/types.d.ts.map +1 -1
  357. package/dist/lib/v2/projection/types.js.map +1 -1
  358. package/dist/lib/v2/projection/v1-to-v2.d.mts +29 -6
  359. package/dist/lib/v2/projection/v1-to-v2.d.ts +29 -6
  360. package/dist/lib/v2/projection/v1-to-v2.d.ts.map +1 -1
  361. package/dist/lib/v2/projection/v1-to-v2.js +218 -9
  362. package/dist/lib/v2/projection/v1-to-v2.js.map +1 -1
  363. package/dist/lib/v2/projection/v1-to-v2.mjs +219 -10
  364. package/dist/lib/v2/projection/v1-to-v2.mjs.map +1 -1
  365. package/dist/lib/v2/projection/v2-to-v1.d.mts +31 -2
  366. package/dist/lib/v2/projection/v2-to-v1.d.ts +31 -2
  367. package/dist/lib/v2/projection/v2-to-v1.d.ts.map +1 -1
  368. package/dist/lib/v2/projection/v2-to-v1.js +138 -7
  369. package/dist/lib/v2/projection/v2-to-v1.js.map +1 -1
  370. package/dist/lib/v2/projection/v2-to-v1.mjs +135 -6
  371. package/dist/lib/v2/projection/v2-to-v1.mjs.map +1 -1
  372. package/dist/lib/v2/projection/write-side.d.mts +12 -13
  373. package/dist/lib/v2/projection/write-side.d.ts +12 -13
  374. package/dist/lib/v2/projection/write-side.d.ts.map +1 -1
  375. package/dist/lib/v2/projection/write-side.js +16 -12
  376. package/dist/lib/v2/projection/write-side.js.map +1 -1
  377. package/dist/lib/v2/projection/write-side.mjs +16 -12
  378. package/dist/lib/v2/projection/write-side.mjs.map +1 -1
  379. package/dist/lib/version.d.mts +3 -3
  380. package/dist/lib/version.d.ts +3 -3
  381. package/dist/lib/version.d.ts.map +1 -1
  382. package/dist/lib/version.js +3 -3
  383. package/dist/lib/version.js.map +1 -1
  384. package/dist/lib/version.mjs +3 -3
  385. package/dist/lib/version.mjs.map +1 -1
  386. package/docs/guides/BUILD-AN-AGENT.md +7 -2
  387. package/docs/guides/PREVIEW-ASSET-DURABILITY.md +6 -2
  388. package/docs/llms.txt +1 -0
  389. package/examples/README.md +1 -1
  390. package/examples/batch-preview-test.ts +3 -3
  391. package/examples/conversation-client.ts +2 -2
  392. package/examples/debug-preview-response.ts +1 -1
  393. package/examples/decisioning-platform-broadcast-tv.ts +10 -4
  394. package/examples/decisioning-platform-mock-seller.ts +16 -9
  395. package/examples/decisioning-platform-programmatic.ts +18 -7
  396. package/examples/error-compliant-server.ts +26 -16
  397. package/examples/generative-creative-demo.ts +7 -19
  398. package/examples/hello_creative_adapter_ad_server.ts +37 -16
  399. package/examples/hello_creative_adapter_template.ts +12 -10
  400. package/examples/hello_seller_adapter_guaranteed.ts +52 -23
  401. package/examples/hello_seller_adapter_multi_tenant.ts +6 -3
  402. package/examples/hello_seller_adapter_non_guaranteed.ts +54 -26
  403. package/examples/hello_seller_adapter_proposal_mode.ts +40 -14
  404. package/examples/hello_seller_adapter_social.ts +2 -7
  405. package/examples/inspect-card-formats.ts +1 -1
  406. package/examples/simple-getting-started.ts +1 -1
  407. package/examples/test-helpers-demo.ts +1 -1
  408. package/package.json +2 -2
  409. package/skills/build-decisioning-creative-template/SKILL.md +11 -11
  410. package/skills/build-decisioning-platform/advanced/REFERENCE.md +8 -2
@@ -18,14 +18,15 @@ import type { Account, NoAccountCtx } from '../account.mjs';
18
18
  import type { RequestContext } from '../context.mjs';
19
19
  import type { TaskHandoff } from '../async-outcome.mjs';
20
20
  import type { ServerPayload } from '../../../types/server-payload.mjs';
21
- import type { CreativeAsset, CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/tools.generated.mjs';
21
+ import type { CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/tools.generated.mjs';
22
+ import type { CanonicalCreativeAsset } from '../../../v2/projection/creative-delivery.mjs';
22
23
  import type { SyncCreativesRow } from './sales.mjs';
23
- type Creative = CreativeAsset;
24
+ type Creative = CanonicalCreativeAsset;
24
25
  type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
25
- export type BuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
26
- export type BuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
27
- export type PreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
28
- export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
26
+ export type LegacyBuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
27
+ export type LegacyBuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
28
+ export type LegacyPreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
29
+ export type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
29
30
  /**
30
31
  * Adopter return shape for `buildCreative`. Discriminated by the wire
31
32
  * spec's Single vs Multi response arms — pick whichever matches the
@@ -51,7 +52,7 @@ export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsRespon
51
52
  * multi-format request, is an adopter contract violation that surfaces
52
53
  * as schema-validation failure on the wire response.
53
54
  */
54
- export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] | BuildCreativePayload | BuildCreativeMultiPayload;
55
+ export type LegacyBuildCreativeReturn = CreativeManifest | CreativeManifest[] | LegacyBuildCreativePayload | LegacyBuildCreativeMultiPayload;
55
56
  export type { SyncCreativesRow };
56
57
  /**
57
58
  * Creative-builder agent. Produces creatives from buyer inputs — equally
@@ -98,7 +99,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
98
99
  * `BuildCreativeMultiPayload` payload when you need to set
99
100
  * `sandbox` / `expires_at` / `preview`.
100
101
  */
101
- buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;
102
+ buildCreativeLegacy(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<LegacyBuildCreativeReturn>;
102
103
  /**
103
104
  * Preview-only variant — sandbox URL or inline HTML, expires. Always
104
105
  * sync. Optional because generative-only adopters that don't render
@@ -111,7 +112,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
111
112
  * when `accounts.resolve(undefined)` returned null. Narrow before reading
112
113
  * `ctx.account.ctx_metadata`. See {@link NoAccountCtx}.
113
114
  */
114
- previewCreative?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<PreviewCreativePayload>;
115
+ previewCreativeLegacy?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyPreviewCreativePayload>;
115
116
  /**
116
117
  * Format catalog. Buyers call `list_creative_formats` to discover the
117
118
  * formats this agent supports. Optional because adopters who declare
@@ -135,7 +136,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
135
136
  * claiming only creative specialisms (`creative-template`, `creative-
136
137
  * generative`, `creative-ad-server`) without a sales platform attached.
137
138
  */
138
- listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
139
+ listCreativeFormatsLegacy?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyListCreativeFormatsPayload>;
139
140
  /**
140
141
  * Refine a prior generation. `taskId` references a prior submission.
141
142
  * Sync — refinement is a mutation on existing state, not a new task
@@ -143,7 +144,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
143
144
  * re-calling `buildCreative` with different inputs and don't carry
144
145
  * generation state across calls.
145
146
  */
146
- refineCreative?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;
147
+ refineCreativeLegacy?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;
147
148
  /**
148
149
  * Sync review surface. Stateless platforms typically auto-approve;
149
150
  * adopters needing mandatory pre-persist review return
@@ -18,14 +18,15 @@ import type { Account, NoAccountCtx } from '../account';
18
18
  import type { RequestContext } from '../context';
19
19
  import type { TaskHandoff } from '../async-outcome';
20
20
  import type { ServerPayload } from '../../../types/server-payload';
21
- import type { CreativeAsset, CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/tools.generated';
21
+ import type { CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse, ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/tools.generated';
22
+ import type { CanonicalCreativeAsset } from '../../../v2/projection/creative-delivery';
22
23
  import type { SyncCreativesRow } from './sales';
23
- type Creative = CreativeAsset;
24
+ type Creative = CanonicalCreativeAsset;
24
25
  type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
25
- export type BuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
26
- export type BuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
27
- export type PreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
28
- export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
26
+ export type LegacyBuildCreativePayload = ServerPayload<BuildCreativeSuccess>;
27
+ export type LegacyBuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;
28
+ export type LegacyPreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;
29
+ export type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
29
30
  /**
30
31
  * Adopter return shape for `buildCreative`. Discriminated by the wire
31
32
  * spec's Single vs Multi response arms — pick whichever matches the
@@ -51,7 +52,7 @@ export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsRespon
51
52
  * multi-format request, is an adopter contract violation that surfaces
52
53
  * as schema-validation failure on the wire response.
53
54
  */
54
- export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] | BuildCreativePayload | BuildCreativeMultiPayload;
55
+ export type LegacyBuildCreativeReturn = CreativeManifest | CreativeManifest[] | LegacyBuildCreativePayload | LegacyBuildCreativeMultiPayload;
55
56
  export type { SyncCreativesRow };
56
57
  /**
57
58
  * Creative-builder agent. Produces creatives from buyer inputs — equally
@@ -98,7 +99,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
98
99
  * `BuildCreativeMultiPayload` payload when you need to set
99
100
  * `sandbox` / `expires_at` / `preview`.
100
101
  */
101
- buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;
102
+ buildCreativeLegacy(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<LegacyBuildCreativeReturn>;
102
103
  /**
103
104
  * Preview-only variant — sandbox URL or inline HTML, expires. Always
104
105
  * sync. Optional because generative-only adopters that don't render
@@ -111,7 +112,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
111
112
  * when `accounts.resolve(undefined)` returned null. Narrow before reading
112
113
  * `ctx.account.ctx_metadata`. See {@link NoAccountCtx}.
113
114
  */
114
- previewCreative?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<PreviewCreativePayload>;
115
+ previewCreativeLegacy?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyPreviewCreativePayload>;
115
116
  /**
116
117
  * Format catalog. Buyers call `list_creative_formats` to discover the
117
118
  * formats this agent supports. Optional because adopters who declare
@@ -135,7 +136,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
135
136
  * claiming only creative specialisms (`creative-template`, `creative-
136
137
  * generative`, `creative-ad-server`) without a sales platform attached.
137
138
  */
138
- listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
139
+ listCreativeFormatsLegacy?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyListCreativeFormatsPayload>;
139
140
  /**
140
141
  * Refine a prior generation. `taskId` references a prior submission.
141
142
  * Sync — refinement is a mutation on existing state, not a new task
@@ -143,7 +144,7 @@ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
143
144
  * re-calling `buildCreative` with different inputs and don't carry
144
145
  * generation state across calls.
145
146
  */
146
- refineCreative?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;
147
+ refineCreativeLegacy?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;
147
148
  /**
148
149
  * Sync review surface. Stateless platforms typically auto-approve;
149
150
  * adopters needing mandatory pre-persist review return
@@ -1 +1 @@
1
- {"version":3,"file":"creative.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAA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,EAC/B,GAAG,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC1B,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAE7C;;;;;;OAMG;IACH,oBAAoB,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEpH;;;;;OAKG;IACH,aAAa,CAAC,CACZ,SAAS,EAAE,QAAQ,EAAE,EACrB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;CAClE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAE7G;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAM/G,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"sourcesContent":["/**\n * Creative specialism platform interfaces (v2 dual-method shape).\n *\n * Three creative archetypes:\n * - CreativeTemplatePlatform: stateless transform (AudioStack, Celtra)\n * - CreativeGenerativePlatform: brief-to-creative (DALL-E-style)\n * - CreativeAdServerPlatform: stateful library + tags (Innovid, GAM-creative; v1.1)\n *\n * `buildCreative` and `syncCreatives` each have sync OR task variants;\n * adopter implements exactly one per pair. `validatePlatform()` enforces\n * exactly-one at construction time.\n *\n * Status: Preview / 6.0.\n *\n * @public\n */\n\nimport type { Account, NoAccountCtx } from '../account';\nimport type { RequestContext } from '../context';\nimport type { TaskHandoff } from '../async-outcome';\nimport type { ServerPayload } from '../../../types/server-payload';\nimport type {\n CreativeAsset,\n CreativeManifest,\n BuildCreativeRequest,\n BuildCreativeSuccess,\n BuildCreativeMultiSuccess,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n} from '../../../types/tools.generated';\nimport type { SyncCreativesRow } from './sales';\n\ntype Creative = CreativeAsset;\ntype Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;\n\nexport type BuildCreativePayload = ServerPayload<BuildCreativeSuccess>;\nexport type BuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;\nexport type PreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;\nexport type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;\n\n/**\n * Adopter return shape for `buildCreative`. Discriminated by the wire\n * spec's Single vs Multi response arms — pick whichever matches the\n * request the framework dispatched:\n *\n * - **Single manifest, no metadata**: return a `CreativeManifest`\n * directly. Framework wraps as `{ creative_manifest: <manifest> }`.\n * Use this for single-format requests (`target_format_id`) when\n * you don't need to set `sandbox` / `expires_at` / `preview`.\n * - **Multi-format manifests, no metadata**: return a\n * `CreativeManifest[]`. Framework wraps as\n * `{ creative_manifests: [...] }`. Use this for multi-format\n * requests (`target_format_ids`) when you don't need rich metadata.\n * - **Fully-shaped envelope**: return a `BuildCreativePayload` (single)\n * or `BuildCreativeMultiPayload` (multi) with `sandbox` /\n * `expires_at` / `preview` populated. Framework passes through\n * unchanged. Detected by the presence of `creative_manifest` (single\n * envelope) or `creative_manifests` (multi envelope) at the top level.\n *\n * Adopters route on `req.target_format_ids` (multi) vs `req.target_format_id`\n * (single) and return the matching arm. Returning a `CreativeManifest[]`\n * for a single-format request, or a single `CreativeManifest` for a\n * multi-format request, is an adopter contract violation that surfaces\n * as schema-validation failure on the wire response.\n */\nexport type BuildCreativeReturn =\n | CreativeManifest\n | CreativeManifest[]\n | BuildCreativePayload\n | BuildCreativeMultiPayload;\n\n// Re-export SyncCreativesRow so creative-specialism adopters don't need to\n// reach into the sales module to import the shared row type.\nexport type { SyncCreativesRow };\n\n// ---------------------------------------------------------------------------\n// CreativeBuilderPlatform — produces creatives (template-driven OR generative)\n// ---------------------------------------------------------------------------\n\n/**\n * Creative-builder agent. Produces creatives from buyer inputs — equally\n * suited to template-driven dynamic creative platforms (Bannerflow,\n * Celtra), brief-to-creative AI agents (Pencil, Omneky, AdCreative.ai),\n * and hybrids that mix both modes. The wire shape doesn't distinguish\n * \"transform a template\" from \"generate from a brief\" — both produce a\n * `CreativeManifest` from a `BuildCreativeRequest`. The previous v6\n * preview separated them into `CreativeTemplatePlatform` and\n * `CreativeGenerativePlatform`, but every interface field is the same;\n * the only meaningful difference was whether `refineCreative` was\n * supported, which is now optional on the unified shape.\n *\n * Spec defines a Submitted arm via `async-response-data.json`\n * (`BuildCreativeAsyncSubmitted`) but the per-tool\n * `build-creative-response.json` `oneOf` doesn't include it — a SPEC\n * inconsistency tracked as adcontextprotocol/adcp#3392. Until the spec\n * rolls Submitted into the `oneOf`, slow operations (TTS, audio mixing,\n * long-running generation) await in-request; status changes surface via\n * `publishStatusChange` on `resource_type: 'creative'`.\n *\n * Both `creative-template` and `creative-generative` specialism claims\n * map to this interface in `RequiredPlatformsFor<S>` — the discovery\n * distinction is preserved at the buyer-facing spec level (so buyers\n * filtering for \"AI brief-to-creative\" still find generative agents)\n * while implementation surface stays unified.\n *\n * Adopters that ALSO want library + tag generation + delivery reporting\n * (i.e., a full ad server on top of the builder) declare\n * `CreativeAdServerPlatform` instead. Multi-archetype omni agents\n * (rare in the wild) front each archetype as a separate tenant via\n * `TenantRegistry`.\n */\nexport interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {\n /**\n * Build the creative. Single method covers template-driven transform\n * (`req.template_id` + asset slots), brief-to-creative generation\n * (`req.brief`), and any hybrid the platform supports — adopters\n * route internally on `req` shape.\n *\n * Return shape is discriminated; see {@link BuildCreativeReturn}:\n * single `CreativeManifest`, `CreativeManifest[]` for multi-format\n * requests, OR a fully-shaped `BuildCreativePayload` /\n * `BuildCreativeMultiPayload` payload when you need to set\n * `sandbox` / `expires_at` / `preview`.\n */\n buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;\n\n /**\n * Preview-only variant — sandbox URL or inline HTML, expires. Always\n * sync. Optional because generative-only adopters that don't render\n * preview ahead of generation can omit it; the framework returns\n * `UNSUPPORTED_FEATURE` to buyers calling `preview_creative` against\n * a platform that didn't wire this.\n *\n * ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n * does not carry an `account` field, so `ctx.account` may be `undefined`\n * when `accounts.resolve(undefined)` returned null. Narrow before reading\n * `ctx.account.ctx_metadata`. See {@link NoAccountCtx}.\n */\n previewCreative?(req: PreviewCreativeRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<PreviewCreativePayload>;\n\n /**\n * Format catalog. Buyers call `list_creative_formats` to discover the\n * formats this agent supports. Optional because adopters who declare\n * their formats via `capabilities.creative_agents` (delegating to a\n * separate creative agent) don't own format definitions; the framework\n * surfaces `UNSUPPORTED_FEATURE` when omitted.\n *\n * ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n * does not carry an `account` field. The framework dispatches with\n * `ctx.account === undefined` for `'explicit'`-resolution adopters that\n * don't return a synthetic singleton from `accounts.resolve(undefined)`.\n * Format catalogs are typically publisher-wide; if yours is per-tenant\n * (Bannerflow / Celtra-style multi-tenant catalogs), return a synthetic\n * account from `accounts.resolve(undefined)` keyed on\n * `ctx.authInfo.clientId` and narrow `ctx.account` inside the handler.\n *\n * **Precedence:** when an adopter ALSO wires `SalesPlatform.listCreativeFormats`\n * on the same platform, the sales-side handler wins (mediaBuy domain\n * registers before creative). Don't wire both — pick the surface that\n * matches your specialism. This creative-side wiring exists for adopters\n * claiming only creative specialisms (`creative-template`, `creative-\n * generative`, `creative-ad-server`) without a sales platform attached.\n */\n listCreativeFormats?(\n req: ListCreativeFormatsRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<ListCreativeFormatsPayload>;\n\n /**\n * Refine a prior generation. `taskId` references a prior submission.\n * Sync — refinement is a mutation on existing state, not a new task\n * creation. Optional because pure template platforms iterate by\n * re-calling `buildCreative` with different inputs and don't carry\n * generation state across calls.\n */\n refineCreative?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;\n\n /**\n * Sync review surface. Stateless platforms typically auto-approve;\n * adopters needing mandatory pre-persist review return\n * `ctx.handoffToTask(fn)` to defer to a background task. Unified\n * hybrid shape — return rows OR `ctx.handoffToTask(fn)`.\n */\n syncCreatives?(\n creatives: Creative[],\n ctx: Ctx<TCtxMeta>\n ): Promise<SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>>;\n}\n\n/**\n * @deprecated Use `CreativeBuilderPlatform` — the unified interface\n * covering both template-driven and brief-to-creative agents. The\n * v6 preview's separation of `CreativeTemplatePlatform` and\n * `CreativeGenerativePlatform` had no meaningful interface\n * distinction; this alias preserves source compatibility for one\n * release while adopters migrate. Will be removed in a future\n * release.\n */\nexport type CreativeTemplatePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;\n\n/**\n * @deprecated Use `CreativeBuilderPlatform` — the unified interface\n * covering both template-driven and brief-to-creative agents. See\n * `CreativeTemplatePlatform` deprecation note. Will be removed in a\n * future release.\n */\nexport type CreativeGenerativePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;\n\n// ---------------------------------------------------------------------------\n// Shared shapes\n// ---------------------------------------------------------------------------\n\nexport interface RefinementMessage {\n /** Free-text instruction from the buyer. */\n message: string;\n /** Optional structured changes (e.g., \"make headline say X\"). */\n changes?: Record<string, unknown>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"sourcesContent":["/**\n * Creative specialism platform interfaces (v2 dual-method shape).\n *\n * Three creative archetypes:\n * - CreativeTemplatePlatform: stateless transform (AudioStack, Celtra)\n * - CreativeGenerativePlatform: brief-to-creative (DALL-E-style)\n * - CreativeAdServerPlatform: stateful library + tags (Innovid, GAM-creative; v1.1)\n *\n * `buildCreative` and `syncCreatives` each have sync OR task variants;\n * adopter implements exactly one per pair. `validatePlatform()` enforces\n * exactly-one at construction time.\n *\n * Status: Preview / 6.0.\n *\n * @public\n */\n\nimport type { Account, NoAccountCtx } from '../account';\nimport type { RequestContext } from '../context';\nimport type { TaskHandoff } from '../async-outcome';\nimport type { ServerPayload } from '../../../types/server-payload';\nimport type {\n CreativeManifest,\n BuildCreativeRequest,\n BuildCreativeSuccess,\n BuildCreativeMultiSuccess,\n PreviewCreativeRequest,\n PreviewCreativeResponse,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n} from '../../../types/tools.generated';\nimport type { CanonicalCreativeAsset } from '../../../v2/projection/creative-delivery';\nimport type { SyncCreativesRow } from './sales';\n\ntype Creative = CanonicalCreativeAsset;\ntype Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;\n\nexport type LegacyBuildCreativePayload = ServerPayload<BuildCreativeSuccess>;\nexport type LegacyBuildCreativeMultiPayload = ServerPayload<BuildCreativeMultiSuccess>;\nexport type LegacyPreviewCreativePayload = ServerPayload<PreviewCreativeResponse>;\nexport type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;\n\n/**\n * Adopter return shape for `buildCreative`. Discriminated by the wire\n * spec's Single vs Multi response arms — pick whichever matches the\n * request the framework dispatched:\n *\n * - **Single manifest, no metadata**: return a `CreativeManifest`\n * directly. Framework wraps as `{ creative_manifest: <manifest> }`.\n * Use this for single-format requests (`target_format_id`) when\n * you don't need to set `sandbox` / `expires_at` / `preview`.\n * - **Multi-format manifests, no metadata**: return a\n * `CreativeManifest[]`. Framework wraps as\n * `{ creative_manifests: [...] }`. Use this for multi-format\n * requests (`target_format_ids`) when you don't need rich metadata.\n * - **Fully-shaped envelope**: return a `BuildCreativePayload` (single)\n * or `BuildCreativeMultiPayload` (multi) with `sandbox` /\n * `expires_at` / `preview` populated. Framework passes through\n * unchanged. Detected by the presence of `creative_manifest` (single\n * envelope) or `creative_manifests` (multi envelope) at the top level.\n *\n * Adopters route on `req.target_format_ids` (multi) vs `req.target_format_id`\n * (single) and return the matching arm. Returning a `CreativeManifest[]`\n * for a single-format request, or a single `CreativeManifest` for a\n * multi-format request, is an adopter contract violation that surfaces\n * as schema-validation failure on the wire response.\n */\nexport type LegacyBuildCreativeReturn =\n | CreativeManifest\n | CreativeManifest[]\n | LegacyBuildCreativePayload\n | LegacyBuildCreativeMultiPayload;\n\n// Re-export SyncCreativesRow so creative-specialism adopters don't need to\n// reach into the sales module to import the shared row type.\nexport type { SyncCreativesRow };\n\n// ---------------------------------------------------------------------------\n// CreativeBuilderPlatform — produces creatives (template-driven OR generative)\n// ---------------------------------------------------------------------------\n\n/**\n * Creative-builder agent. Produces creatives from buyer inputs — equally\n * suited to template-driven dynamic creative platforms (Bannerflow,\n * Celtra), brief-to-creative AI agents (Pencil, Omneky, AdCreative.ai),\n * and hybrids that mix both modes. The wire shape doesn't distinguish\n * \"transform a template\" from \"generate from a brief\" — both produce a\n * `CreativeManifest` from a `BuildCreativeRequest`. The previous v6\n * preview separated them into `CreativeTemplatePlatform` and\n * `CreativeGenerativePlatform`, but every interface field is the same;\n * the only meaningful difference was whether `refineCreative` was\n * supported, which is now optional on the unified shape.\n *\n * Spec defines a Submitted arm via `async-response-data.json`\n * (`BuildCreativeAsyncSubmitted`) but the per-tool\n * `build-creative-response.json` `oneOf` doesn't include it — a SPEC\n * inconsistency tracked as adcontextprotocol/adcp#3392. Until the spec\n * rolls Submitted into the `oneOf`, slow operations (TTS, audio mixing,\n * long-running generation) await in-request; status changes surface via\n * `publishStatusChange` on `resource_type: 'creative'`.\n *\n * Both `creative-template` and `creative-generative` specialism claims\n * map to this interface in `RequiredPlatformsFor<S>` — the discovery\n * distinction is preserved at the buyer-facing spec level (so buyers\n * filtering for \"AI brief-to-creative\" still find generative agents)\n * while implementation surface stays unified.\n *\n * Adopters that ALSO want library + tag generation + delivery reporting\n * (i.e., a full ad server on top of the builder) declare\n * `CreativeAdServerPlatform` instead. Multi-archetype omni agents\n * (rare in the wild) front each archetype as a separate tenant via\n * `TenantRegistry`.\n */\nexport interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {\n /**\n * Build the creative. Single method covers template-driven transform\n * (`req.template_id` + asset slots), brief-to-creative generation\n * (`req.brief`), and any hybrid the platform supports — adopters\n * route internally on `req` shape.\n *\n * Return shape is discriminated; see {@link BuildCreativeReturn}:\n * single `CreativeManifest`, `CreativeManifest[]` for multi-format\n * requests, OR a fully-shaped `BuildCreativePayload` /\n * `BuildCreativeMultiPayload` payload when you need to set\n * `sandbox` / `expires_at` / `preview`.\n */\n buildCreativeLegacy(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<LegacyBuildCreativeReturn>;\n\n /**\n * Preview-only variant — sandbox URL or inline HTML, expires. Always\n * sync. Optional because generative-only adopters that don't render\n * preview ahead of generation can omit it; the framework returns\n * `UNSUPPORTED_FEATURE` to buyers calling `preview_creative` against\n * a platform that didn't wire this.\n *\n * ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n * does not carry an `account` field, so `ctx.account` may be `undefined`\n * when `accounts.resolve(undefined)` returned null. Narrow before reading\n * `ctx.account.ctx_metadata`. See {@link NoAccountCtx}.\n */\n previewCreativeLegacy?(\n req: PreviewCreativeRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<LegacyPreviewCreativePayload>;\n\n /**\n * Format catalog. Buyers call `list_creative_formats` to discover the\n * formats this agent supports. Optional because adopters who declare\n * their formats via `capabilities.creative_agents` (delegating to a\n * separate creative agent) don't own format definitions; the framework\n * surfaces `UNSUPPORTED_FEATURE` when omitted.\n *\n * ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n * does not carry an `account` field. The framework dispatches with\n * `ctx.account === undefined` for `'explicit'`-resolution adopters that\n * don't return a synthetic singleton from `accounts.resolve(undefined)`.\n * Format catalogs are typically publisher-wide; if yours is per-tenant\n * (Bannerflow / Celtra-style multi-tenant catalogs), return a synthetic\n * account from `accounts.resolve(undefined)` keyed on\n * `ctx.authInfo.clientId` and narrow `ctx.account` inside the handler.\n *\n * **Precedence:** when an adopter ALSO wires `SalesPlatform.listCreativeFormats`\n * on the same platform, the sales-side handler wins (mediaBuy domain\n * registers before creative). Don't wire both — pick the surface that\n * matches your specialism. This creative-side wiring exists for adopters\n * claiming only creative specialisms (`creative-template`, `creative-\n * generative`, `creative-ad-server`) without a sales platform attached.\n */\n listCreativeFormatsLegacy?(\n req: ListCreativeFormatsRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<LegacyListCreativeFormatsPayload>;\n\n /**\n * Refine a prior generation. `taskId` references a prior submission.\n * Sync — refinement is a mutation on existing state, not a new task\n * creation. Optional because pure template platforms iterate by\n * re-calling `buildCreative` with different inputs and don't carry\n * generation state across calls.\n */\n refineCreativeLegacy?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;\n\n /**\n * Sync review surface. Stateless platforms typically auto-approve;\n * adopters needing mandatory pre-persist review return\n * `ctx.handoffToTask(fn)` to defer to a background task. Unified\n * hybrid shape — return rows OR `ctx.handoffToTask(fn)`.\n */\n syncCreatives?(\n creatives: Creative[],\n ctx: Ctx<TCtxMeta>\n ): Promise<SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>>;\n}\n\n/**\n * @deprecated Use `CreativeBuilderPlatform` — the unified interface\n * covering both template-driven and brief-to-creative agents. The\n * v6 preview's separation of `CreativeTemplatePlatform` and\n * `CreativeGenerativePlatform` had no meaningful interface\n * distinction; this alias preserves source compatibility for one\n * release while adopters migrate. Will be removed in a future\n * release.\n */\nexport type CreativeTemplatePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;\n\n/**\n * @deprecated Use `CreativeBuilderPlatform` — the unified interface\n * covering both template-driven and brief-to-creative agents. See\n * `CreativeTemplatePlatform` deprecation note. Will be removed in a\n * future release.\n */\nexport type CreativeGenerativePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;\n\n// ---------------------------------------------------------------------------\n// Shared shapes\n// ---------------------------------------------------------------------------\n\nexport interface RefinementMessage {\n /** Free-text instruction from the buyer. */\n message: string;\n /** Optional structured changes (e.g., \"make headline say X\"). */\n changes?: Record<string, unknown>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -63,17 +63,27 @@ import type { Account, NoAccountCtx } from '../account.mjs';
63
63
  import type { RequestContext } from '../context.mjs';
64
64
  import type { TaskHandoff } from '../async-outcome.mjs';
65
65
  import type { RequireCacheScopeWhenProducts, ServerPayload } from '../../../types/server-payload.mjs';
66
- import type { GetProductsRequest, GetProductsResponse, CreateMediaBuyRequest, CreateMediaBuySuccess, UpdateMediaBuyRequest, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesRequest, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesError, SyncCreativesSuccess, CreativeAsset } from '../../../types/tools.generated.mjs';
67
- type Creative = CreativeAsset;
66
+ import type { GetProductsResponse, CreateMediaBuySuccess, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesError, SyncCreativesSuccess } from '../../../types/tools.generated.mjs';
67
+ import type { CanonicalCreativeAsset, CanonicalCreateMediaBuyRequest, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalProduct, CanonicalUpdateMediaBuyRequest } from '../../../v2/projection/creative-delivery.mjs';
68
+ type Creative = CanonicalCreativeAsset;
68
69
  type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
69
- export type GetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;
70
- export type CreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;
71
- export type UpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;
72
- export type GetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;
73
- export type GetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;
70
+ type CanonicalGetProductsPayload = Omit<ServerPayload<CanonicalCreativeResponse<GetProductsResponse>>, 'products'> & {
71
+ products?: CanonicalProduct[];
72
+ };
73
+ export type GetProductsPayload = RequireCacheScopeWhenProducts<CanonicalGetProductsPayload>;
74
+ export type CreateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<CreateMediaBuySuccess>>;
75
+ export type UpdateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<UpdateMediaBuySuccess>>;
76
+ export type GetMediaBuyDeliveryPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuyDeliveryResponse>>;
77
+ export type GetMediaBuysPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuysResponse>>;
74
78
  export type ProvidePerformanceFeedbackPayload = ServerPayload<ProvidePerformanceFeedbackSuccess>;
75
- export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
76
- export type ListCreativesPayload = ServerPayload<ListCreativesResponse>;
79
+ export type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
80
+ export type ListCreativesPayload = ServerPayload<CanonicalListCreativesResponse>;
81
+ export type LegacyGetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;
82
+ export type LegacyCreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;
83
+ export type LegacyUpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;
84
+ export type LegacyGetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;
85
+ export type LegacyGetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;
86
+ export type LegacyListCreativesPayload = ServerPayload<ListCreativesResponse>;
77
87
  export type SyncCreativesSuccessPayload = ServerPayload<SyncCreativesSuccess>;
78
88
  export type SyncCreativesErrorPayload = ServerPayload<SyncCreativesError>;
79
89
  export type SyncCreativesPayload = SyncCreativesSuccessPayload | SyncCreativesErrorPayload;
@@ -92,7 +102,7 @@ export type UpdateMediaBuyHandlerResult = UpdateMediaBuyPayload | TaskHandoff<Up
92
102
  export type SyncCreativesHandlerResult = SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>;
93
103
  export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
94
104
  /** Catalog discovery: return products directly or hand off curated discovery to a background task. */
95
- getProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;
105
+ getProducts?(req: CanonicalGetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;
96
106
  /**
97
107
  * Create a media buy. Return the wire success-arm shape (sync fast path)
98
108
  * OR `ctx.handoffToTask(fn)` to promote the call to a background task
@@ -139,14 +149,14 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
139
149
  * }
140
150
  * ```
141
151
  */
142
- createMediaBuy?(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;
152
+ createMediaBuy?(req: CanonicalCreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;
143
153
  /**
144
154
  * Update a media buy. Return the patched buy immediately (sync fast path)
145
155
  * OR `ctx.handoffToTask(fn)` when the upstream activation or approval flow
146
156
  * must continue in the background. The framework owns task registration,
147
157
  * caller scoping, polling, and completion webhooks on the handoff path.
148
158
  */
149
- updateMediaBuy?(buyId: string, patch: UpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuyHandlerResult>;
159
+ updateMediaBuy?(buyId: string, patch: CanonicalUpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuyHandlerResult>;
150
160
  /**
151
161
  * Push creatives. Return the array of wire success rows (sync fast
152
162
  * path) OR `ctx.handoffToTask(fn)` to defer to a background task
@@ -250,8 +260,8 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
250
260
  getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysPayload>;
251
261
  /** Accept buyer-side performance signals on a media buy / creative. */
252
262
  providePerformanceFeedback?(req: ProvidePerformanceFeedbackRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ProvidePerformanceFeedbackPayload>;
253
- listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
254
- listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
263
+ listCreativeFormatsLegacy?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyListCreativeFormatsPayload>;
264
+ listCreatives?(req: CanonicalListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
255
265
  syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsPayload>;
256
266
  logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventPayload>;
257
267
  syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesPayload>;
@@ -288,5 +298,5 @@ export type SalesCorePlatform<TCtxMeta = Record<string, unknown>> = Required<Pic
288
298
  *
289
299
  * @public
290
300
  */
291
- export type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<SalesPlatform<TCtxMeta>, 'syncCreatives' | 'syncCatalogs' | 'syncEventSources' | 'logEvent' | 'listCreativeFormats' | 'listCreatives' | 'providePerformanceFeedback'>;
301
+ export type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<SalesPlatform<TCtxMeta>, 'syncCreatives' | 'syncCatalogs' | 'syncEventSources' | 'logEvent' | 'listCreativeFormatsLegacy' | 'listCreatives' | 'providePerformanceFeedback'>;
292
302
  export {};
@@ -63,17 +63,27 @@ import type { Account, NoAccountCtx } from '../account';
63
63
  import type { RequestContext } from '../context';
64
64
  import type { TaskHandoff } from '../async-outcome';
65
65
  import type { RequireCacheScopeWhenProducts, ServerPayload } from '../../../types/server-payload';
66
- import type { GetProductsRequest, GetProductsResponse, CreateMediaBuyRequest, CreateMediaBuySuccess, UpdateMediaBuyRequest, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesRequest, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesError, SyncCreativesSuccess, CreativeAsset } from '../../../types/tools.generated';
67
- type Creative = CreativeAsset;
66
+ import type { GetProductsResponse, CreateMediaBuySuccess, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesError, SyncCreativesSuccess } from '../../../types/tools.generated';
67
+ import type { CanonicalCreativeAsset, CanonicalCreateMediaBuyRequest, CanonicalCreativeResponse, CanonicalGetProductsRequest, CanonicalListCreativesRequest, CanonicalListCreativesResponse, CanonicalProduct, CanonicalUpdateMediaBuyRequest } from '../../../v2/projection/creative-delivery';
68
+ type Creative = CanonicalCreativeAsset;
68
69
  type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
69
- export type GetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;
70
- export type CreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;
71
- export type UpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;
72
- export type GetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;
73
- export type GetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;
70
+ type CanonicalGetProductsPayload = Omit<ServerPayload<CanonicalCreativeResponse<GetProductsResponse>>, 'products'> & {
71
+ products?: CanonicalProduct[];
72
+ };
73
+ export type GetProductsPayload = RequireCacheScopeWhenProducts<CanonicalGetProductsPayload>;
74
+ export type CreateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<CreateMediaBuySuccess>>;
75
+ export type UpdateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<UpdateMediaBuySuccess>>;
76
+ export type GetMediaBuyDeliveryPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuyDeliveryResponse>>;
77
+ export type GetMediaBuysPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuysResponse>>;
74
78
  export type ProvidePerformanceFeedbackPayload = ServerPayload<ProvidePerformanceFeedbackSuccess>;
75
- export type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
76
- export type ListCreativesPayload = ServerPayload<ListCreativesResponse>;
79
+ export type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;
80
+ export type ListCreativesPayload = ServerPayload<CanonicalListCreativesResponse>;
81
+ export type LegacyGetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;
82
+ export type LegacyCreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;
83
+ export type LegacyUpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;
84
+ export type LegacyGetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;
85
+ export type LegacyGetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;
86
+ export type LegacyListCreativesPayload = ServerPayload<ListCreativesResponse>;
77
87
  export type SyncCreativesSuccessPayload = ServerPayload<SyncCreativesSuccess>;
78
88
  export type SyncCreativesErrorPayload = ServerPayload<SyncCreativesError>;
79
89
  export type SyncCreativesPayload = SyncCreativesSuccessPayload | SyncCreativesErrorPayload;
@@ -92,7 +102,7 @@ export type UpdateMediaBuyHandlerResult = UpdateMediaBuyPayload | TaskHandoff<Up
92
102
  export type SyncCreativesHandlerResult = SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>;
93
103
  export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
94
104
  /** Catalog discovery: return products directly or hand off curated discovery to a background task. */
95
- getProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;
105
+ getProducts?(req: CanonicalGetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;
96
106
  /**
97
107
  * Create a media buy. Return the wire success-arm shape (sync fast path)
98
108
  * OR `ctx.handoffToTask(fn)` to promote the call to a background task
@@ -139,14 +149,14 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
139
149
  * }
140
150
  * ```
141
151
  */
142
- createMediaBuy?(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;
152
+ createMediaBuy?(req: CanonicalCreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;
143
153
  /**
144
154
  * Update a media buy. Return the patched buy immediately (sync fast path)
145
155
  * OR `ctx.handoffToTask(fn)` when the upstream activation or approval flow
146
156
  * must continue in the background. The framework owns task registration,
147
157
  * caller scoping, polling, and completion webhooks on the handoff path.
148
158
  */
149
- updateMediaBuy?(buyId: string, patch: UpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuyHandlerResult>;
159
+ updateMediaBuy?(buyId: string, patch: CanonicalUpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuyHandlerResult>;
150
160
  /**
151
161
  * Push creatives. Return the array of wire success rows (sync fast
152
162
  * path) OR `ctx.handoffToTask(fn)` to defer to a background task
@@ -250,8 +260,8 @@ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
250
260
  getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysPayload>;
251
261
  /** Accept buyer-side performance signals on a media buy / creative. */
252
262
  providePerformanceFeedback?(req: ProvidePerformanceFeedbackRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ProvidePerformanceFeedbackPayload>;
253
- listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<ListCreativeFormatsPayload>;
254
- listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
263
+ listCreativeFormatsLegacy?(req: ListCreativeFormatsRequest, ctx: NoAccountCtx<TCtxMeta>): Promise<LegacyListCreativeFormatsPayload>;
264
+ listCreatives?(req: CanonicalListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;
255
265
  syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsPayload>;
256
266
  logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventPayload>;
257
267
  syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesPayload>;
@@ -288,6 +298,6 @@ export type SalesCorePlatform<TCtxMeta = Record<string, unknown>> = Required<Pic
288
298
  *
289
299
  * @public
290
300
  */
291
- export type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<SalesPlatform<TCtxMeta>, 'syncCreatives' | 'syncCatalogs' | 'syncEventSources' | 'logEvent' | 'listCreativeFormats' | 'listCreatives' | 'providePerformanceFeedback'>;
301
+ export type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<SalesPlatform<TCtxMeta>, 'syncCreatives' | 'syncCatalogs' | 'syncEventSources' | 'logEvent' | 'listCreativeFormatsLegacy' | 'listCreatives' | 'providePerformanceFeedback'>;
292
302
  export {};
293
303
  //# sourceMappingURL=sales.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,6BA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/specialisms/sales.ts"],"sourcesContent":["/**\n * SalesPlatform — sales specialism platform interface.\n *\n * **Unified hybrid shape.** `get_products`, `create_media_buy`, and `sync_creatives` use a\n * single method each. The method returns the wire success arm (sync fast\n * path) OR `ctx.handoffToTask(fn)` to promote the call to a background\n * task (HITL slow path). Branch per-call — the same method handles\n * programmatic remnant, guaranteed inventory, curated discovery, and hybrid\n * sellers. Every other tool is sync-only:\n *\n * - `get_products` — sync OR `ctx.handoffToTask(...)` for curated brief/refine flows.\n * - `create_media_buy` — sync OR `ctx.handoffToTask(...)`.\n * - `update_media_buy` — sync only. Re-approval flows that need HITL run\n * out-of-band; `publishStatusChange` carries the result.\n * - `sync_creatives` — sync OR `ctx.handoffToTask(...)`.\n * - `get_media_buy_delivery` — sync only.\n *\n * Sync-only tools that need long-running semantics use `publishStatusChange`\n * (see `status-changes.ts`) — that's the spec-aligned channel for tools\n * whose wire response unions don't define a Submitted arm.\n *\n * Each method either returns the value or throws `AdcpError` for structured\n * rejection. Generic thrown errors map to `SERVICE_UNAVAILABLE`.\n *\n * **Method groups** — implement the group(s) matching your specialism:\n *\n * | Group | Methods | Claim when |\n * |---|---|---|\n * | Core sales (required) | `getProducts`, `updateMediaBuy`, `getMediaBuyDelivery` | Any `sales-*` specialism |\n * | Core sales (unified hybrid) | `createMediaBuy` | Any `sales-*` specialism |\n * | Core sales (unified hybrid) | `syncCreatives` | Any `sales-*` specialism |\n * | Read / feedback | `getMediaBuys`, `providePerformanceFeedback`, `listCreativeFormats`, `listCreatives` | Most sellers; optional |\n * | Retail-media extensions | `syncCatalogs`, `logEvent`, `syncEventSources` | `sales-catalog-driven`, `sales-retail-media` |\n *\n * New adopters implementing a non-retail seller (GAM, FreeWheel, a social\n * platform) only need the three core-required methods plus `createMediaBuy`\n * and `syncCreatives`. The retail-media extension methods (`syncCatalogs`,\n * `logEvent`, `syncEventSources`) are unnecessary unless you claim\n * `sales-catalog-driven` or `sales-retail-media`.\n *\n * **No-account tools (`providePerformanceFeedback`, `listCreativeFormats`):**\n * the wire requests for these two tools don't carry an `account` field, so\n * `ctx.account` may be `undefined` when `accounts.resolution === 'explicit'`.\n * Three safe patterns:\n *\n * 1. **`'derived'` resolution** — `accounts.resolve(undefined)` returns a\n * singleton; `ctx.account` is always set. Best for single-tenant\n * deployers.\n * 2. **Don't implement the method** — the framework returns\n * `UNSUPPORTED_FEATURE`; buyers using the merge-seam custom handler or\n * external creative agents still receive a response.\n * 3. **Explicit-mode with defensive read** — cast `ctx.account as Account |\n * undefined` and derive the account from the request body (e.g., via a\n * `media_buy_id` lookup), or throw `AdcpError('ACCOUNT_NOT_FOUND')`.\n * Full `resolveAccount(undefined, { authInfo, toolName })` support for\n * explicit-mode lands in rc.1.\n *\n * Status: Preview / 6.0.\n *\n * @public\n */\n\nimport type { Account, NoAccountCtx } from '../account';\nimport type { RequestContext } from '../context';\nimport type { TaskHandoff } from '../async-outcome';\nimport type { RequireCacheScopeWhenProducts, ServerPayload } from '../../../types/server-payload';\nimport type {\n GetProductsRequest,\n GetProductsResponse,\n CreateMediaBuyRequest,\n CreateMediaBuySuccess,\n UpdateMediaBuyRequest,\n UpdateMediaBuySuccess,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackSuccess,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n ListCreativesRequest,\n ListCreativesResponse,\n SyncCatalogsRequest,\n SyncCatalogsSuccess,\n LogEventRequest,\n LogEventSuccess,\n SyncEventSourcesRequest,\n SyncEventSourcesSuccess,\n SyncCreativesError,\n SyncCreativesSuccess,\n CreativeAsset,\n} from '../../../types/tools.generated';\n\ntype Creative = CreativeAsset;\ntype Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;\n\nexport type GetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;\nexport type CreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;\nexport type UpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;\nexport type GetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;\nexport type GetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;\nexport type ProvidePerformanceFeedbackPayload = ServerPayload<ProvidePerformanceFeedbackSuccess>;\nexport type ListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;\nexport type ListCreativesPayload = ServerPayload<ListCreativesResponse>;\nexport type SyncCreativesSuccessPayload = ServerPayload<SyncCreativesSuccess>;\nexport type SyncCreativesErrorPayload = ServerPayload<SyncCreativesError>;\nexport type SyncCreativesPayload = SyncCreativesSuccessPayload | SyncCreativesErrorPayload;\nexport type SyncCatalogsPayload = ServerPayload<SyncCatalogsSuccess>;\nexport type LogEventPayload = ServerPayload<LogEventSuccess>;\nexport type SyncEventSourcesPayload = ServerPayload<SyncEventSourcesSuccess>;\n\n/**\n * Wire success-row shape for `sync_creatives`. Returning the array of these\n * rows from `syncCreatives` is what adopters write — the framework wraps\n * with `{ creatives: [...] }` to form `SyncCreativesSuccess`.\n */\nexport type SyncCreativesRow = SyncCreativesSuccess['creatives'][number];\nexport type GetProductsHandlerResult = GetProductsPayload | TaskHandoff<GetProductsPayload>;\nexport type CreateMediaBuyHandlerResult = CreateMediaBuyPayload | TaskHandoff<CreateMediaBuyPayload>;\nexport type UpdateMediaBuyHandlerResult = UpdateMediaBuyPayload | TaskHandoff<UpdateMediaBuyPayload>;\nexport type SyncCreativesHandlerResult = SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>;\n\nexport interface SalesPlatform<TCtxMeta = Record<string, unknown>> {\n // **Method shape — all optional, enforced per-specialism.** Every method on\n // `SalesPlatform` is declared optional so the type accommodates non-media-\n // buy walled gardens (sales-social, audience-sync, sales-proposal-mode)\n // that don't accept inbound media buys but compose ingestion methods on\n // this same surface. Compile-time enforcement of \"you claimed\n // sales-non-guaranteed, therefore you MUST implement getProducts /\n // createMediaBuy / updateMediaBuy / getMediaBuyDelivery / getMediaBuys\"\n // moves up to `RequiredPlatformsFor<S>` — see the {@link SalesCorePlatform}\n // type alias and the per-specialism mapping in `platform.ts`. Runtime\n // enforcement is preserved: the dispatcher returns `UNSUPPORTED_FEATURE`\n // for tools whose method is absent, and `validateSpecialismRequiredTools`\n // throws / warns when a specialism's required tools aren't implemented.\n //\n // Adopters who implement the full media-buy surface keep working — their\n // implementation is a superset of every per-specialism requirement.\n // Adopters who only do ingestion (e.g. a Meta CAPI integration claiming\n // `sales-social`) drop the 5 core stubs without compile errors.\n\n // ── get_products: unified hybrid shape ────────────────────────────\n // get_products is a CATALOG LOOKUP — fast read against the seller's\n // existing inventory. rc8 allows curated brief/refine lookups to return a\n // Submitted arm when the seller needs async enrichment. Adopters express\n // that by returning ctx.handoffToTask(fn); the framework owns task_id\n // allocation, polling state, and optional completion webhook delivery.\n //\n // Wholesale catalog dumps remain sync: if the seller cannot serve the\n // full catalog directly, it should maintain an internal cache and return\n // the current catalog view instead of turning wholesale discovery into a\n // long-running operation.\n /** Catalog discovery: return products directly or hand off curated discovery to a background task. */\n getProducts?(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;\n\n // ── create_media_buy: unified hybrid shape ──────────────────────────\n\n /**\n * Create a media buy. Return the wire success-arm shape (sync fast path)\n * OR `ctx.handoffToTask(fn)` to promote the call to a background task\n * (HITL slow path). Adopters can branch per-call: hybrid sellers route\n * programmatic remnant sync, guaranteed inventory through HITL, all\n * from the same method.\n *\n * Buyers pattern-match on the wire response shape (`media_buy_id` on\n * the immediate response → sync; `task_id` + `status: 'submitted'` →\n * poll `tasks_get` or receive webhook). Predictable per request,\n * dynamic per call.\n *\n * Status changes flow via `publishStatusChange(...)` regardless of\n * which path was taken.\n *\n * The handoff function's return value is persisted as JSONB in the\n * task registry. Postgres-backed registries cap row size at 4MB —\n * offload large payloads to blob storage and return references.\n *\n * @example Sync-only adopter (no HITL inventory)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * return await this.commitSync(req);\n * }\n * ```\n *\n * @example HITL-only adopter (every call goes through trafficker review)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * return ctx.handoffToTask(async (taskCtx) => {\n * await taskCtx.update({ message: 'Awaiting trafficker' });\n * return await this.runHITL(req);\n * });\n * }\n * ```\n *\n * @example Hybrid adopter (programmatic + guaranteed in same tenant)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * if (this.requiresHITL(req)) {\n * return ctx.handoffToTask(async (taskCtx) => await this.runHITL(req));\n * }\n * return await this.commitSync(req);\n * }\n * ```\n */\n createMediaBuy?(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;\n\n // ── update_media_buy: unified hybrid shape\n /**\n * Update a media buy. Return the patched buy immediately (sync fast path)\n * OR `ctx.handoffToTask(fn)` when the upstream activation or approval flow\n * must continue in the background. The framework owns task registration,\n * caller scoping, polling, and completion webhooks on the handoff path.\n */\n updateMediaBuy?(\n buyId: string,\n patch: UpdateMediaBuyRequest,\n ctx: Ctx<TCtxMeta>\n ): Promise<UpdateMediaBuyHandlerResult>;\n\n // ── sync_creatives: unified hybrid shape ────────────────────────────\n\n /**\n * Push creatives. Return the array of wire success rows (sync fast\n * path) OR `ctx.handoffToTask(fn)` to defer to a background task\n * (HITL slow path — manual review, brand-suitability gates, etc.).\n * Hybrid: branch per-batch — auto-approve simple creatives sync,\n * route everything else to HITL.\n *\n * Each row carries `action` (CRUD outcome) and optional `status`\n * (review state). Buyers see mixed `approved` / `pending_review`\n * rows on the sync path; subsequent review changes flow via\n * `publishStatusChange(...)`.\n *\n * @example Hybrid adopter\n * ```ts\n * syncCreatives: async (creatives, ctx) => {\n * if (creatives.some(c => this.needsReview(c))) {\n * return ctx.handoffToTask(async (taskCtx) => {\n * return await this.reviewAndPersist(creatives);\n * });\n * }\n * return creatives.map(c => ({ creative_id: c.creative_id, action: 'created', status: 'approved' }));\n * }\n * ```\n */\n syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<SyncCreativesHandlerResult>;\n\n // ── get_media_buy_delivery: sync only ───────────────────────────────\n\n /**\n * Per-media-buy delivery actuals (impressions, spend, pacing,\n * conversions). Sync — report-running platforms with manual report\n * cycles return the latest cached actuals and emit `delivery_report`\n * status changes via `publishStatusChange` when fresh reports are\n * available.\n *\n * **Multi-id contract.** `filter.media_buy_ids` is an array — buyers\n * routinely request delivery for multiple buys in one call. The\n * platform MUST iterate every id and return one element per id in\n * `media_buy_deliveries[]`. Implementations that read only\n * `media_buy_ids[0]` silently truncate the buyer's request — a\n * correctness bug that has bitten multiple adopters (closes #1342).\n *\n * Pass-through is the framework contract: the platform owns fan-out\n * because `aggregated_totals` requires platform-domain knowledge —\n * `reach` (cross-buy dedup capability), `new_to_brand_rate` (weighted\n * across buys, not a per-buy average), and `frequency` (depends on\n * dedup) cannot be synthesized correctly by a naive framework loop.\n * Sellers that can't compute the cross-buy fields omit them and emit\n * the safely-summable fields (`impressions`, `spend`, `clicks`,\n * `media_buy_count`); buyers fall back to per-buy values when needed.\n *\n * Recommended pattern — prefer the upstream's native multi-id query\n * over a per-id loop. Most reporting APIs (GAM ReportService's\n * `WHERE LINE_ITEM_ID IN (...)`, TTD, DV360, Magnite, PubMatic, retail\n * media) take an id list in one round-trip; iterating one-id-at-a-time\n * is an N-roundtrip pattern that triggers upstream rate limits on\n * 50-buy reports.\n *\n * ```ts\n * getMediaBuyDelivery: async (req, ctx) => {\n * const ids = req.media_buy_ids ?? [];\n * // Native multi-id: one upstream round-trip.\n * const rows = await this.upstream.report({\n * mediaBuyIds: ids,\n * start: req.start_date,\n * end: req.end_date,\n * });\n * return {\n * reporting_period: { start, end },\n * currency: 'USD',\n * media_buy_deliveries: rows,\n * aggregated_totals: this.upstream.aggregate(rows),\n * };\n * }\n * ```\n *\n * **Single-id fallback** — only if your upstream is genuinely single-id:\n *\n * ```ts\n * const deliveries = await Promise.all(ids.map(id => fetchOne(id, ctx)));\n * ```\n *\n * When `media_buy_ids` is omitted, return a paginated set of\n * accessible media buys per the wire schema. `status_filter`\n * defaults to `['active']` when omitted; honor the filter in your\n * iteration.\n */\n getMediaBuyDelivery?(filter: GetMediaBuyDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuyDeliveryPayload>;\n\n // ── get_media_buys: sync only — REQUIRED ──────────────────────────────\n // Read tool — buyers fetch a list of their media buys (often filtered by\n // status / time window). Required because:\n // 1. Every seller needs to support reading back what they created.\n // 2. Idempotent retries depend on it (replay safe-by-design).\n // 3. The 6.2 patch-decomposition redesign needs single-id reads;\n // `getMediaBuys` is the foundation.\n // 4. Framework auto-stores returned media buys for hydration on\n // subsequent updateMediaBuy calls (see `hydratePackagesWithProducts`\n // pattern in `from-platform.ts`).\n //\n // Proposal-mode adopters (write-only via push channels) return an empty\n // `media_buys: []` array — that's a valid response.\n /**\n * List media buys this account owns. Filter + pagination per the wire shape.\n *\n * **Multi-id contract.** `req.media_buy_ids` is an array — buyers\n * routinely request a specific set of buys in one call. The platform\n * MUST iterate every id and return one element per id in the response\n * `media_buys[]` array. Reading only `media_buy_ids[0]` silently\n * truncates the buyer's request — same correctness bug that #1342\n * documented for `getMediaBuyDelivery`. Same recommended pattern: prefer\n * an upstream multi-id query (one round-trip), fall back to per-id loop\n * only when the upstream is single-id-only.\n *\n * When `media_buy_ids` is omitted, return a paginated set of accessible\n * buys filtered by `status_filter` (defaults to `['active']`).\n */\n getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysPayload>;\n\n // ── provide_performance_feedback: sync only ─────────────────────────\n // Write tool — buyers report aggregate creative-level performance\n // (impressions, clicks, conversions) to help the seller's optimizer learn.\n // Optional because not every sales agent runs an optimizer, but every\n // buyer expects to be able to call it. Framework returns UNSUPPORTED_FEATURE\n // when omitted.\n //\n // ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n // does not carry an `account` field. `ctx.account` may be `undefined` for\n // `'explicit'`-resolution adopters; narrow before reading\n // `ctx.account.ctx_metadata`. See {@link NoAccountCtx} and the\n // `SalesPlatform` JSDoc (\"No-account tools\") for safe patterns.\n /** Accept buyer-side performance signals on a media buy / creative. */\n providePerformanceFeedback?(\n req: ProvidePerformanceFeedbackRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<ProvidePerformanceFeedbackPayload>;\n\n // ── list_creative_formats: sync only ────────────────────────────────\n // Discovery tool — buyers query what creative formats this seller\n // accepts. Optional because sellers that delegate to external\n // `creative_agents` (declared in `capabilities.creative_agents[]`) don't\n // own format definitions; framework can resolve from the declared agents.\n // Self-hosted sellers (own creative library) implement this directly.\n //\n // ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. See\n // `providePerformanceFeedback` note above.\n listCreativeFormats?(\n req: ListCreativeFormatsRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<ListCreativeFormatsPayload>;\n\n // ── list_creatives: sync only ───────────────────────────────────────\n // Read tool — buyers query the seller's creative library. Optional\n // because most sales adopters delegate creative state to the\n // `creative_agents` declared in capabilities; ad-server-style sales\n // platforms implement directly. Note: also lives on `CreativeAdServerPlatform.listCreatives`\n // for the standalone-creative-agent shape.\n listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;\n\n // ── sync_catalogs: sync only ────────────────────────────────────────\n // Retail-media catalog sync. Buyers push product catalogs (SKUs, ASINs,\n // store-ids) for `sales-catalog-driven` agents (Amazon, Criteo, Citrusad,\n // Walmart Connect, Shopify ad surfaces). Optional — non-retail sales\n // adopters omit. Idempotent on the buyer's `idempotency_key`.\n syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsPayload>;\n\n // ── log_event: sync only ────────────────────────────────────────────\n // Conversion / engagement event logging. Buyers post events tied to\n // a `media_buy_id` for performance attribution. Used by retail-media\n // (post-purchase events) and conversion-tracked sales (Snap pixel,\n // Meta CAPI, LinkedIn conversions API). Optional.\n logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventPayload>;\n\n // ── sync_event_sources: sync only ──────────────────────────────────\n // Register conversion event sources (websites, apps, offline pixel\n // IDs) so subsequent `log_event` calls can be attributed correctly.\n // Optional — adopters who don't expose conversion tracking omit.\n syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesPayload>;\n}\n\n/**\n * Names the **core sales surface** — bidding + media-buy lifecycle. Required\n * for `sales-*` specialisms that own pricing/pacing\n * (`sales-non-guaranteed`, `sales-guaranteed`, `sales-broadcast-tv`,\n * `sales-streaming-tv`, `sales-exchange`, `sales-catalog-driven`,\n * `sales-retail-media`).\n *\n * Walled-garden specialisms whose value surface is asset ingestion\n * (`sales-social`, the `audience-sync` track, pure conversion-tracking\n * adopters) DON'T need to implement these — see {@link SalesIngestionPlatform}.\n *\n * Used by `RequiredPlatformsFor<S>` to pick the right slice of `SalesPlatform`\n * per claimed specialism.\n *\n * @public\n */\nexport type SalesCorePlatform<TCtxMeta = Record<string, unknown>> = Required<\n Pick<\n SalesPlatform<TCtxMeta>,\n 'getProducts' | 'createMediaBuy' | 'updateMediaBuy' | 'getMediaBuyDelivery' | 'getMediaBuys'\n >\n>;\n\n/**\n * Names the **asset-ingestion surface** — sync surfaces for creatives,\n * audiences (via {@link import('./audiences').AudiencePlatform}), catalogs,\n * events, plus the read/feedback tools. Walled-garden specialisms\n * (`sales-social`) live here.\n *\n * Every method is optional individually. Adopters claiming `sales-social`\n * pick whichever ingestion surfaces apply (typically `syncCreatives` +\n * `logEvent` + `syncEventSources`); the rest stay omitted.\n *\n * Used by `RequiredPlatformsFor<S>` so claiming `sales-social` only requires\n * this slice of `SalesPlatform`, not the full {@link SalesCorePlatform}.\n *\n * @public\n */\nexport type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<\n SalesPlatform<TCtxMeta>,\n | 'syncCreatives'\n | 'syncCatalogs'\n | 'syncEventSources'\n | 'logEvent'\n | 'listCreativeFormats'\n | 'listCreatives'\n | 'providePerformanceFeedback'\n>;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"sourcesContent":["/**\n * SalesPlatform — sales specialism platform interface.\n *\n * **Unified hybrid shape.** `get_products`, `create_media_buy`, and `sync_creatives` use a\n * single method each. The method returns the wire success arm (sync fast\n * path) OR `ctx.handoffToTask(fn)` to promote the call to a background\n * task (HITL slow path). Branch per-call — the same method handles\n * programmatic remnant, guaranteed inventory, curated discovery, and hybrid\n * sellers. Every other tool is sync-only:\n *\n * - `get_products` — sync OR `ctx.handoffToTask(...)` for curated brief/refine flows.\n * - `create_media_buy` — sync OR `ctx.handoffToTask(...)`.\n * - `update_media_buy` — sync only. Re-approval flows that need HITL run\n * out-of-band; `publishStatusChange` carries the result.\n * - `sync_creatives` — sync OR `ctx.handoffToTask(...)`.\n * - `get_media_buy_delivery` — sync only.\n *\n * Sync-only tools that need long-running semantics use `publishStatusChange`\n * (see `status-changes.ts`) — that's the spec-aligned channel for tools\n * whose wire response unions don't define a Submitted arm.\n *\n * Each method either returns the value or throws `AdcpError` for structured\n * rejection. Generic thrown errors map to `SERVICE_UNAVAILABLE`.\n *\n * **Method groups** — implement the group(s) matching your specialism:\n *\n * | Group | Methods | Claim when |\n * |---|---|---|\n * | Core sales (required) | `getProducts`, `updateMediaBuy`, `getMediaBuyDelivery` | Any `sales-*` specialism |\n * | Core sales (unified hybrid) | `createMediaBuy` | Any `sales-*` specialism |\n * | Core sales (unified hybrid) | `syncCreatives` | Any `sales-*` specialism |\n * | Read / feedback | `getMediaBuys`, `providePerformanceFeedback`, `listCreativeFormats`, `listCreatives` | Most sellers; optional |\n * | Retail-media extensions | `syncCatalogs`, `logEvent`, `syncEventSources` | `sales-catalog-driven`, `sales-retail-media` |\n *\n * New adopters implementing a non-retail seller (GAM, FreeWheel, a social\n * platform) only need the three core-required methods plus `createMediaBuy`\n * and `syncCreatives`. The retail-media extension methods (`syncCatalogs`,\n * `logEvent`, `syncEventSources`) are unnecessary unless you claim\n * `sales-catalog-driven` or `sales-retail-media`.\n *\n * **No-account tools (`providePerformanceFeedback`, `listCreativeFormats`):**\n * the wire requests for these two tools don't carry an `account` field, so\n * `ctx.account` may be `undefined` when `accounts.resolution === 'explicit'`.\n * Three safe patterns:\n *\n * 1. **`'derived'` resolution** — `accounts.resolve(undefined)` returns a\n * singleton; `ctx.account` is always set. Best for single-tenant\n * deployers.\n * 2. **Don't implement the method** — the framework returns\n * `UNSUPPORTED_FEATURE`; buyers using the merge-seam custom handler or\n * external creative agents still receive a response.\n * 3. **Explicit-mode with defensive read** — cast `ctx.account as Account |\n * undefined` and derive the account from the request body (e.g., via a\n * `media_buy_id` lookup), or throw `AdcpError('ACCOUNT_NOT_FOUND')`.\n * Full `resolveAccount(undefined, { authInfo, toolName })` support for\n * explicit-mode lands in rc.1.\n *\n * Status: Preview / 6.0.\n *\n * @public\n */\n\nimport type { Account, NoAccountCtx } from '../account';\nimport type { RequestContext } from '../context';\nimport type { TaskHandoff } from '../async-outcome';\nimport type { RequireCacheScopeWhenProducts, ServerPayload } from '../../../types/server-payload';\nimport type {\n GetProductsRequest,\n GetProductsResponse,\n CreateMediaBuySuccess,\n UpdateMediaBuySuccess,\n GetMediaBuysRequest,\n GetMediaBuysResponse,\n GetMediaBuyDeliveryRequest,\n GetMediaBuyDeliveryResponse,\n ProvidePerformanceFeedbackRequest,\n ProvidePerformanceFeedbackSuccess,\n ListCreativeFormatsRequest,\n ListCreativeFormatsResponse,\n ListCreativesRequest,\n ListCreativesResponse,\n SyncCatalogsRequest,\n SyncCatalogsSuccess,\n LogEventRequest,\n LogEventSuccess,\n SyncEventSourcesRequest,\n SyncEventSourcesSuccess,\n SyncCreativesError,\n SyncCreativesSuccess,\n} from '../../../types/tools.generated';\nimport type {\n CanonicalCreativeAsset,\n CanonicalCreateMediaBuyRequest,\n CanonicalCreativeResponse,\n CanonicalGetProductsRequest,\n CanonicalListCreativesRequest,\n CanonicalListCreativesResponse,\n CanonicalProduct,\n CanonicalUpdateMediaBuyRequest,\n} from '../../../v2/projection/creative-delivery';\n\ntype Creative = CanonicalCreativeAsset;\ntype Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;\n\ntype CanonicalGetProductsPayload = Omit<ServerPayload<CanonicalCreativeResponse<GetProductsResponse>>, 'products'> & {\n products?: CanonicalProduct[];\n};\nexport type GetProductsPayload = RequireCacheScopeWhenProducts<CanonicalGetProductsPayload>;\nexport type CreateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<CreateMediaBuySuccess>>;\nexport type UpdateMediaBuyPayload = ServerPayload<CanonicalCreativeResponse<UpdateMediaBuySuccess>>;\nexport type GetMediaBuyDeliveryPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuyDeliveryResponse>>;\nexport type GetMediaBuysPayload = ServerPayload<CanonicalCreativeResponse<GetMediaBuysResponse>>;\nexport type ProvidePerformanceFeedbackPayload = ServerPayload<ProvidePerformanceFeedbackSuccess>;\nexport type LegacyListCreativeFormatsPayload = ServerPayload<ListCreativeFormatsResponse>;\nexport type ListCreativesPayload = ServerPayload<CanonicalListCreativesResponse>;\nexport type LegacyGetProductsPayload = RequireCacheScopeWhenProducts<ServerPayload<GetProductsResponse>>;\nexport type LegacyCreateMediaBuyPayload = ServerPayload<CreateMediaBuySuccess>;\nexport type LegacyUpdateMediaBuyPayload = ServerPayload<UpdateMediaBuySuccess>;\nexport type LegacyGetMediaBuyDeliveryPayload = ServerPayload<GetMediaBuyDeliveryResponse>;\nexport type LegacyGetMediaBuysPayload = ServerPayload<GetMediaBuysResponse>;\nexport type LegacyListCreativesPayload = ServerPayload<ListCreativesResponse>;\nexport type SyncCreativesSuccessPayload = ServerPayload<SyncCreativesSuccess>;\nexport type SyncCreativesErrorPayload = ServerPayload<SyncCreativesError>;\nexport type SyncCreativesPayload = SyncCreativesSuccessPayload | SyncCreativesErrorPayload;\nexport type SyncCatalogsPayload = ServerPayload<SyncCatalogsSuccess>;\nexport type LogEventPayload = ServerPayload<LogEventSuccess>;\nexport type SyncEventSourcesPayload = ServerPayload<SyncEventSourcesSuccess>;\n\n/**\n * Wire success-row shape for `sync_creatives`. Returning the array of these\n * rows from `syncCreatives` is what adopters write — the framework wraps\n * with `{ creatives: [...] }` to form `SyncCreativesSuccess`.\n */\nexport type SyncCreativesRow = SyncCreativesSuccess['creatives'][number];\nexport type GetProductsHandlerResult = GetProductsPayload | TaskHandoff<GetProductsPayload>;\nexport type CreateMediaBuyHandlerResult = CreateMediaBuyPayload | TaskHandoff<CreateMediaBuyPayload>;\nexport type UpdateMediaBuyHandlerResult = UpdateMediaBuyPayload | TaskHandoff<UpdateMediaBuyPayload>;\nexport type SyncCreativesHandlerResult = SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>;\n\nexport interface SalesPlatform<TCtxMeta = Record<string, unknown>> {\n // **Method shape — all optional, enforced per-specialism.** Every method on\n // `SalesPlatform` is declared optional so the type accommodates non-media-\n // buy walled gardens (sales-social, audience-sync, sales-proposal-mode)\n // that don't accept inbound media buys but compose ingestion methods on\n // this same surface. Compile-time enforcement of \"you claimed\n // sales-non-guaranteed, therefore you MUST implement getProducts /\n // createMediaBuy / updateMediaBuy / getMediaBuyDelivery / getMediaBuys\"\n // moves up to `RequiredPlatformsFor<S>` — see the {@link SalesCorePlatform}\n // type alias and the per-specialism mapping in `platform.ts`. Runtime\n // enforcement is preserved: the dispatcher returns `UNSUPPORTED_FEATURE`\n // for tools whose method is absent, and `validateSpecialismRequiredTools`\n // throws / warns when a specialism's required tools aren't implemented.\n //\n // Adopters who implement the full media-buy surface keep working — their\n // implementation is a superset of every per-specialism requirement.\n // Adopters who only do ingestion (e.g. a Meta CAPI integration claiming\n // `sales-social`) drop the 5 core stubs without compile errors.\n\n // ── get_products: unified hybrid shape ────────────────────────────\n // get_products is a CATALOG LOOKUP — fast read against the seller's\n // existing inventory. rc8 allows curated brief/refine lookups to return a\n // Submitted arm when the seller needs async enrichment. Adopters express\n // that by returning ctx.handoffToTask(fn); the framework owns task_id\n // allocation, polling state, and optional completion webhook delivery.\n //\n // Wholesale catalog dumps remain sync: if the seller cannot serve the\n // full catalog directly, it should maintain an internal cache and return\n // the current catalog view instead of turning wholesale discovery into a\n // long-running operation.\n /** Catalog discovery: return products directly or hand off curated discovery to a background task. */\n getProducts?(req: CanonicalGetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsHandlerResult>;\n\n // ── create_media_buy: unified hybrid shape ──────────────────────────\n\n /**\n * Create a media buy. Return the wire success-arm shape (sync fast path)\n * OR `ctx.handoffToTask(fn)` to promote the call to a background task\n * (HITL slow path). Adopters can branch per-call: hybrid sellers route\n * programmatic remnant sync, guaranteed inventory through HITL, all\n * from the same method.\n *\n * Buyers pattern-match on the wire response shape (`media_buy_id` on\n * the immediate response → sync; `task_id` + `status: 'submitted'` →\n * poll `tasks_get` or receive webhook). Predictable per request,\n * dynamic per call.\n *\n * Status changes flow via `publishStatusChange(...)` regardless of\n * which path was taken.\n *\n * The handoff function's return value is persisted as JSONB in the\n * task registry. Postgres-backed registries cap row size at 4MB —\n * offload large payloads to blob storage and return references.\n *\n * @example Sync-only adopter (no HITL inventory)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * return await this.commitSync(req);\n * }\n * ```\n *\n * @example HITL-only adopter (every call goes through trafficker review)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * return ctx.handoffToTask(async (taskCtx) => {\n * await taskCtx.update({ message: 'Awaiting trafficker' });\n * return await this.runHITL(req);\n * });\n * }\n * ```\n *\n * @example Hybrid adopter (programmatic + guaranteed in same tenant)\n * ```ts\n * createMediaBuy: async (req, ctx) => {\n * if (this.requiresHITL(req)) {\n * return ctx.handoffToTask(async (taskCtx) => await this.runHITL(req));\n * }\n * return await this.commitSync(req);\n * }\n * ```\n */\n createMediaBuy?(req: CanonicalCreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuyHandlerResult>;\n\n // ── update_media_buy: unified hybrid shape\n /**\n * Update a media buy. Return the patched buy immediately (sync fast path)\n * OR `ctx.handoffToTask(fn)` when the upstream activation or approval flow\n * must continue in the background. The framework owns task registration,\n * caller scoping, polling, and completion webhooks on the handoff path.\n */\n updateMediaBuy?(\n buyId: string,\n patch: CanonicalUpdateMediaBuyRequest,\n ctx: Ctx<TCtxMeta>\n ): Promise<UpdateMediaBuyHandlerResult>;\n\n // ── sync_creatives: unified hybrid shape ────────────────────────────\n\n /**\n * Push creatives. Return the array of wire success rows (sync fast\n * path) OR `ctx.handoffToTask(fn)` to defer to a background task\n * (HITL slow path — manual review, brand-suitability gates, etc.).\n * Hybrid: branch per-batch — auto-approve simple creatives sync,\n * route everything else to HITL.\n *\n * Each row carries `action` (CRUD outcome) and optional `status`\n * (review state). Buyers see mixed `approved` / `pending_review`\n * rows on the sync path; subsequent review changes flow via\n * `publishStatusChange(...)`.\n *\n * @example Hybrid adopter\n * ```ts\n * syncCreatives: async (creatives, ctx) => {\n * if (creatives.some(c => this.needsReview(c))) {\n * return ctx.handoffToTask(async (taskCtx) => {\n * return await this.reviewAndPersist(creatives);\n * });\n * }\n * return creatives.map(c => ({ creative_id: c.creative_id, action: 'created', status: 'approved' }));\n * }\n * ```\n */\n syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<SyncCreativesHandlerResult>;\n\n // ── get_media_buy_delivery: sync only ───────────────────────────────\n\n /**\n * Per-media-buy delivery actuals (impressions, spend, pacing,\n * conversions). Sync — report-running platforms with manual report\n * cycles return the latest cached actuals and emit `delivery_report`\n * status changes via `publishStatusChange` when fresh reports are\n * available.\n *\n * **Multi-id contract.** `filter.media_buy_ids` is an array — buyers\n * routinely request delivery for multiple buys in one call. The\n * platform MUST iterate every id and return one element per id in\n * `media_buy_deliveries[]`. Implementations that read only\n * `media_buy_ids[0]` silently truncate the buyer's request — a\n * correctness bug that has bitten multiple adopters (closes #1342).\n *\n * Pass-through is the framework contract: the platform owns fan-out\n * because `aggregated_totals` requires platform-domain knowledge —\n * `reach` (cross-buy dedup capability), `new_to_brand_rate` (weighted\n * across buys, not a per-buy average), and `frequency` (depends on\n * dedup) cannot be synthesized correctly by a naive framework loop.\n * Sellers that can't compute the cross-buy fields omit them and emit\n * the safely-summable fields (`impressions`, `spend`, `clicks`,\n * `media_buy_count`); buyers fall back to per-buy values when needed.\n *\n * Recommended pattern — prefer the upstream's native multi-id query\n * over a per-id loop. Most reporting APIs (GAM ReportService's\n * `WHERE LINE_ITEM_ID IN (...)`, TTD, DV360, Magnite, PubMatic, retail\n * media) take an id list in one round-trip; iterating one-id-at-a-time\n * is an N-roundtrip pattern that triggers upstream rate limits on\n * 50-buy reports.\n *\n * ```ts\n * getMediaBuyDelivery: async (req, ctx) => {\n * const ids = req.media_buy_ids ?? [];\n * // Native multi-id: one upstream round-trip.\n * const rows = await this.upstream.report({\n * mediaBuyIds: ids,\n * start: req.start_date,\n * end: req.end_date,\n * });\n * return {\n * reporting_period: { start, end },\n * currency: 'USD',\n * media_buy_deliveries: rows,\n * aggregated_totals: this.upstream.aggregate(rows),\n * };\n * }\n * ```\n *\n * **Single-id fallback** — only if your upstream is genuinely single-id:\n *\n * ```ts\n * const deliveries = await Promise.all(ids.map(id => fetchOne(id, ctx)));\n * ```\n *\n * When `media_buy_ids` is omitted, return a paginated set of\n * accessible media buys per the wire schema. `status_filter`\n * defaults to `['active']` when omitted; honor the filter in your\n * iteration.\n */\n getMediaBuyDelivery?(filter: GetMediaBuyDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuyDeliveryPayload>;\n\n // ── get_media_buys: sync only — REQUIRED ──────────────────────────────\n // Read tool — buyers fetch a list of their media buys (often filtered by\n // status / time window). Required because:\n // 1. Every seller needs to support reading back what they created.\n // 2. Idempotent retries depend on it (replay safe-by-design).\n // 3. The 6.2 patch-decomposition redesign needs single-id reads;\n // `getMediaBuys` is the foundation.\n // 4. Framework auto-stores returned media buys for hydration on\n // subsequent updateMediaBuy calls (see `hydratePackagesWithProducts`\n // pattern in `from-platform.ts`).\n //\n // Proposal-mode adopters (write-only via push channels) return an empty\n // `media_buys: []` array — that's a valid response.\n /**\n * List media buys this account owns. Filter + pagination per the wire shape.\n *\n * **Multi-id contract.** `req.media_buy_ids` is an array — buyers\n * routinely request a specific set of buys in one call. The platform\n * MUST iterate every id and return one element per id in the response\n * `media_buys[]` array. Reading only `media_buy_ids[0]` silently\n * truncates the buyer's request — same correctness bug that #1342\n * documented for `getMediaBuyDelivery`. Same recommended pattern: prefer\n * an upstream multi-id query (one round-trip), fall back to per-id loop\n * only when the upstream is single-id-only.\n *\n * When `media_buy_ids` is omitted, return a paginated set of accessible\n * buys filtered by `status_filter` (defaults to `['active']`).\n */\n getMediaBuys?(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysPayload>;\n\n // ── provide_performance_feedback: sync only ─────────────────────────\n // Write tool — buyers report aggregate creative-level performance\n // (impressions, clicks, conversions) to help the seller's optimizer learn.\n // Optional because not every sales agent runs an optimizer, but every\n // buyer expects to be able to call it. Framework returns UNSUPPORTED_FEATURE\n // when omitted.\n //\n // ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. The wire request\n // does not carry an `account` field. `ctx.account` may be `undefined` for\n // `'explicit'`-resolution adopters; narrow before reading\n // `ctx.account.ctx_metadata`. See {@link NoAccountCtx} and the\n // `SalesPlatform` JSDoc (\"No-account tools\") for safe patterns.\n /** Accept buyer-side performance signals on a media buy / creative. */\n providePerformanceFeedback?(\n req: ProvidePerformanceFeedbackRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<ProvidePerformanceFeedbackPayload>;\n\n // ── list_creative_formats: sync only ────────────────────────────────\n // Discovery tool — buyers query what creative formats this seller\n // accepts. Optional because sellers that delegate to external\n // `creative_agents` (declared in `capabilities.creative_agents[]`) don't\n // own format definitions; framework can resolve from the declared agents.\n // Self-hosted sellers (own creative library) implement this directly.\n //\n // ⚠️ NO-ACCOUNT TOOL — `ctx: NoAccountCtx<TCtxMeta>`. See\n // `providePerformanceFeedback` note above.\n listCreativeFormatsLegacy?(\n req: ListCreativeFormatsRequest,\n ctx: NoAccountCtx<TCtxMeta>\n ): Promise<LegacyListCreativeFormatsPayload>;\n\n // ── list_creatives: sync only ───────────────────────────────────────\n // Read tool — buyers query the seller's creative library. Optional\n // because most sales adopters delegate creative state to the\n // `creative_agents` declared in capabilities; ad-server-style sales\n // platforms implement directly. Note: also lives on `CreativeAdServerPlatform.listCreatives`\n // for the standalone-creative-agent shape.\n listCreatives?(req: CanonicalListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesPayload>;\n\n // ── sync_catalogs: sync only ────────────────────────────────────────\n // Retail-media catalog sync. Buyers push product catalogs (SKUs, ASINs,\n // store-ids) for `sales-catalog-driven` agents (Amazon, Criteo, Citrusad,\n // Walmart Connect, Shopify ad surfaces). Optional — non-retail sales\n // adopters omit. Idempotent on the buyer's `idempotency_key`.\n syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsPayload>;\n\n // ── log_event: sync only ────────────────────────────────────────────\n // Conversion / engagement event logging. Buyers post events tied to\n // a `media_buy_id` for performance attribution. Used by retail-media\n // (post-purchase events) and conversion-tracked sales (Snap pixel,\n // Meta CAPI, LinkedIn conversions API). Optional.\n logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventPayload>;\n\n // ── sync_event_sources: sync only ──────────────────────────────────\n // Register conversion event sources (websites, apps, offline pixel\n // IDs) so subsequent `log_event` calls can be attributed correctly.\n // Optional — adopters who don't expose conversion tracking omit.\n syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesPayload>;\n}\n\n/**\n * Names the **core sales surface** — bidding + media-buy lifecycle. Required\n * for `sales-*` specialisms that own pricing/pacing\n * (`sales-non-guaranteed`, `sales-guaranteed`, `sales-broadcast-tv`,\n * `sales-streaming-tv`, `sales-exchange`, `sales-catalog-driven`,\n * `sales-retail-media`).\n *\n * Walled-garden specialisms whose value surface is asset ingestion\n * (`sales-social`, the `audience-sync` track, pure conversion-tracking\n * adopters) DON'T need to implement these — see {@link SalesIngestionPlatform}.\n *\n * Used by `RequiredPlatformsFor<S>` to pick the right slice of `SalesPlatform`\n * per claimed specialism.\n *\n * @public\n */\nexport type SalesCorePlatform<TCtxMeta = Record<string, unknown>> = Required<\n Pick<\n SalesPlatform<TCtxMeta>,\n 'getProducts' | 'createMediaBuy' | 'updateMediaBuy' | 'getMediaBuyDelivery' | 'getMediaBuys'\n >\n>;\n\n/**\n * Names the **asset-ingestion surface** — sync surfaces for creatives,\n * audiences (via {@link import('./audiences').AudiencePlatform}), catalogs,\n * events, plus the read/feedback tools. Walled-garden specialisms\n * (`sales-social`) live here.\n *\n * Every method is optional individually. Adopters claiming `sales-social`\n * pick whichever ingestion surfaces apply (typically `syncCreatives` +\n * `logEvent` + `syncEventSources`); the rest stay omitted.\n *\n * Used by `RequiredPlatformsFor<S>` so claiming `sales-social` only requires\n * this slice of `SalesPlatform`, not the full {@link SalesCorePlatform}.\n *\n * @public\n */\nexport type SalesIngestionPlatform<TCtxMeta = Record<string, unknown>> = Pick<\n SalesPlatform<TCtxMeta>,\n | 'syncCreatives'\n | 'syncCatalogs'\n | 'syncEventSources'\n | 'logEvent'\n | 'listCreativeFormatsLegacy'\n | 'listCreatives'\n | 'providePerformanceFeedback'\n>;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -16,10 +16,10 @@ export type { OperationalPlatform, OperationalContext } from './operational-plat
16
16
  export { pickWireSpecFields, scrubExtensions, WIRE_SPEC_FIELDS } from './wire-safe.mjs';
17
17
  export type { WireSafe, WireSpecRequestName, ScrubExtensionsOptions } from './wire-safe.mjs';
18
18
  export type { RequireCacheScopeWhenProducts, ServerPayload } from '../types/server-payload.mjs';
19
- export type { ActivateSignalPayload, AcquireRightsAcquiredPayload, AcquireRightsPayload, AcquireRightsPendingApprovalPayload, AcquireRightsRejectedPayload, BuildCreativeMultiPayload, BuildCreativePayload, CalibrateContentPayload, CheckGovernancePayload, CreateCollectionListPayload, CreateContentStandardsPayload, CreateMediaBuyPayload, CreatePropertyListPayload, CreativeApprovalPayload, CreativeApprovedPayload, CreativePendingReviewPayload, CreativeRejectedPayload, DeleteCollectionListPayload, DeletePropertyListPayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, GetAdCPCapabilitiesPayload, GetBrandIdentityPayload, GetCollectionListPayload, GetContentStandardsPayload, GetCreativeDeliveryPayload, GetCreativeFeaturesPayload, GetMediaBuyArtifactsPayload, GetMediaBuyDeliveryPayload, GetMediaBuysPayload, GetPlanAuditLogsPayload, GetProductsPayload, GetPropertyListPayload, GetRightsPayload, GetRightsResponsePayload, GetSignalsPayload, ListAccountsPayload, ListCollectionListsPayload, ListContentStandardsPayload, ListCreativeFormatsPayload, ListCreativeFormatsResponsePayload, ListCreativeFormatsServerPayload, ListCreativesPayload, ListPropertyListsPayload, LogEventPayload, PreviewCreativePayload, ProvidePerformanceFeedbackPayload, ReportPlanOutcomePayload, ReportUsagePayload, SIGetOfferingPayload, SIInitiateSessionPayload, SISendMessagePayload, SITerminateSessionPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAudiencesPayload, SyncCatalogsPayload, SyncCreativesErrorPayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncEventSourcesPayload, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncPlansPayload, UpdateCollectionListPayload, UpdateContentStandardsPayload, UpdateMediaBuyPayload, UpdatePropertyListPayload, UpdateRightsPayload, ValidateContentDeliveryPayload, } from '../types/server-payload-aliases.mjs';
19
+ export type { ActivateSignalPayload, AcquireRightsAcquiredPayload as LegacyAcquireRightsAcquiredPayload, AcquireRightsPayload as LegacyAcquireRightsPayload, AcquireRightsPendingApprovalPayload as LegacyAcquireRightsPendingApprovalPayload, AcquireRightsRejectedPayload as LegacyAcquireRightsRejectedPayload, BuildCreativeMultiPayload as LegacyBuildCreativeMultiPayload, BuildCreativePayload as LegacyBuildCreativePayload, CalibrateContentPayload as LegacyCalibrateContentPayload, CheckGovernancePayload, CreateCollectionListPayload, CreateContentStandardsPayload as LegacyCreateContentStandardsPayload, CreateMediaBuyPayload as LegacyCreateMediaBuyPayload, CreatePropertyListPayload, CreativeApprovalPayload, CreativeApprovedPayload, CreativePendingReviewPayload, CreativeRejectedPayload, DeleteCollectionListPayload, DeletePropertyListPayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, GetAdCPCapabilitiesPayload, GetBrandIdentityPayload, GetCollectionListPayload, GetContentStandardsPayload as LegacyGetContentStandardsPayload, GetCreativeDeliveryPayload as LegacyGetCreativeDeliveryPayload, GetCreativeFeaturesPayload as LegacyGetCreativeFeaturesPayload, GetMediaBuyArtifactsPayload as LegacyGetMediaBuyArtifactsPayload, GetMediaBuyDeliveryPayload as LegacyGetMediaBuyDeliveryPayload, GetMediaBuysPayload as LegacyGetMediaBuysPayload, GetPlanAuditLogsPayload, GetProductsPayload as LegacyGetProductsPayload, GetPropertyListPayload, GetRightsPayload as LegacyGetRightsPayload, GetRightsResponsePayload as LegacyGetRightsResponsePayload, GetSignalsPayload, ListAccountsPayload, ListCollectionListsPayload, ListContentStandardsPayload as LegacyListContentStandardsPayload, ListCreativeFormatsPayload as LegacyListCreativeFormatsPayload, ListCreativeFormatsResponsePayload as LegacyListCreativeFormatsResponsePayload, ListCreativeFormatsServerPayload as LegacyListCreativeFormatsServerPayload, ListCreativesPayload as LegacyListCreativesPayload, ListPropertyListsPayload, LogEventPayload, PreviewCreativePayload as LegacyPreviewCreativePayload, ProvidePerformanceFeedbackPayload, ReportPlanOutcomePayload, ReportUsagePayload, SIGetOfferingPayload, SIInitiateSessionPayload, SISendMessagePayload, SITerminateSessionPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAudiencesPayload, SyncCatalogsPayload, SyncCreativesErrorPayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncEventSourcesPayload, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncPlansPayload, UpdateCollectionListPayload, UpdateContentStandardsPayload as LegacyUpdateContentStandardsPayload, UpdateMediaBuyPayload as LegacyUpdateMediaBuyPayload, UpdatePropertyListPayload, UpdateRightsPayload as LegacyUpdateRightsPayload, ValidateContentDeliveryPayload as LegacyValidateContentDeliveryPayload, } from '../types/server-payload-aliases.mjs';
20
20
  export { assertNoExampleTlds } from './example-tld-guard.mjs';
21
21
  export type { AssertNoExampleTldsOptions } from './example-tld-guard.mjs';
22
- export { capabilitiesResponse, productsResponse, mediaBuyResponse, deliveryResponse, listAccountsResponse, listCreativeFormatsResponse, updateMediaBuyResponse, getMediaBuysResponse, performanceFeedbackResponse, buildCreativeResponse, buildCreativeMultiResponse, previewCreativeResponse, creativeDeliveryResponse, listCreativesResponse, listPropertyListsResponse, listCollectionListsResponse, listContentStandardsResponse, getPlanAuditLogsResponse, syncCreativesResponse, getSignalsResponse, activateSignalResponse, cancelMediaBuyResponse, acquireRightsResponse, acquireRightsAcquired, acquireRightsPendingApproval, acquireRightsRejected, updateRightsResponse, updateRightsSuccess, creativeApprovalResponse, creativeApprovalApproved, creativeApprovalRejected, creativeApprovalPendingReview, creativeApprovalError, syncAccountsResponse, syncGovernanceResponse, reportUsageResponse, toStructuredContent, } from './responses.mjs';
22
+ export { capabilitiesResponse as legacyCapabilitiesResponse, productsResponse as legacyProductsResponse, mediaBuyResponse as legacyMediaBuyResponse, deliveryResponse as legacyDeliveryResponse, listAccountsResponse as legacyListAccountsResponse, listCreativeFormatsResponse as legacyListCreativeFormatsResponse, updateMediaBuyResponse as legacyUpdateMediaBuyResponse, getMediaBuysResponse as legacyGetMediaBuysResponse, performanceFeedbackResponse as legacyPerformanceFeedbackResponse, buildCreativeResponse as legacyBuildCreativeResponse, buildCreativeMultiResponse as legacyBuildCreativeMultiResponse, previewCreativeResponse as legacyPreviewCreativeResponse, creativeDeliveryResponse as legacyCreativeDeliveryResponse, listCreativesResponse as legacyListCreativesResponse, listPropertyListsResponse as legacyListPropertyListsResponse, listCollectionListsResponse as legacyListCollectionListsResponse, listContentStandardsResponse as legacyListContentStandardsResponse, getPlanAuditLogsResponse as legacyGetPlanAuditLogsResponse, syncCreativesResponse as legacySyncCreativesResponse, getSignalsResponse as legacyGetSignalsResponse, activateSignalResponse as legacyActivateSignalResponse, cancelMediaBuyResponse as legacyCancelMediaBuyResponse, acquireRightsResponse as legacyAcquireRightsResponse, acquireRightsAcquired as legacyAcquireRightsAcquired, acquireRightsPendingApproval as legacyAcquireRightsPendingApproval, acquireRightsRejected as legacyAcquireRightsRejected, updateRightsResponse as legacyUpdateRightsResponse, updateRightsSuccess as legacyUpdateRightsSuccess, creativeApprovalResponse as legacyCreativeApprovalResponse, creativeApprovalApproved as legacyCreativeApprovalApproved, creativeApprovalRejected as legacyCreativeApprovalRejected, creativeApprovalPendingReview as legacyCreativeApprovalPendingReview, creativeApprovalError as legacyCreativeApprovalError, syncAccountsResponse as legacySyncAccountsResponse, syncGovernanceResponse as legacySyncGovernanceResponse, reportUsageResponse as legacyReportUsageResponse, toStructuredContent, } from './responses.mjs';
23
23
  export type { McpToolResponse } from './responses.mjs';
24
24
  export { validActionsForStatus } from './media-buy-helpers.mjs';
25
25
  export type { ValidAction, CancelMediaBuyInput } from './media-buy-helpers.mjs';
@@ -56,7 +56,7 @@ export type { AdcpMcpResourceDefinition, McpAppResourceCsp, McpAppResourcePermis
56
56
  export { requireSessionKey, ADCP_PRE_TRANSPORT, ADCP_SIGNED_REQUESTS_STATE, ADCP_INSTRUCTIONS_FN, } from './create-adcp-server.mjs';
57
57
  export type { SessionContext, OnInstructionsError, MaybePromise, BridgeMarker } from './create-adcp-server.mjs';
58
58
  export type { AdcpServer, AdcpServerComplianceApi, AdcpServerTransport, AdcpTestRequest, AdcpTestToolsCallRequest, AdcpTestResponse, } from './adcp-server.mjs';
59
- export type { AdcpServerConfig, WebhooksConfig, AdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, AdcpCapabilitiesOverrides, AdcpCustomToolConfig, McpAppUiMeta, McpAppMeta, AdcpLogger, SignedRequestsConfig, AdcpPreTransport, AdcpSignedRequestsState, HandlerContext, SessionKeyContext, MediaBuyHandlers, SignalsHandlers, CreativeHandlers, GovernanceHandlers, AccountHandlers, EventTrackingHandlers, SponsoredIntelligenceHandlers, ResolveAccountContext, } from './create-adcp-server.mjs';
59
+ export type { AdcpServerConfig as LegacyAdcpServerConfig, WebhooksConfig, AdcpToolMap as LegacyAdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, AdcpCapabilitiesOverrides, AdcpCustomToolConfig as LegacyAdcpCustomToolConfig, McpAppUiMeta, McpAppMeta, AdcpLogger, SignedRequestsConfig, AdcpPreTransport, AdcpSignedRequestsState, HandlerContext as LegacyHandlerContext, SessionKeyContext, MediaBuyHandlers as LegacyMediaBuyHandlers, SignalsHandlers as LegacySignalsHandlers, CreativeHandlers as LegacyCreativeHandlers, GovernanceHandlers as LegacyGovernanceHandlers, AccountHandlers as LegacyAccountHandlers, EventTrackingHandlers as LegacyEventTrackingHandlers, SponsoredIntelligenceHandlers as LegacySponsoredIntelligenceHandlers, ResolveAccountContext as LegacyResolveAccountContext, } from './create-adcp-server.mjs';
60
60
  export { DEFAULT_REPORTING_CAPABILITIES } from './product-defaults.mjs';
61
61
  export { isSandboxRequest, mergeSeededProductsIntoResponse, filterValidSeededProducts, filterValidSeededCreatives, filterValidSeededMediaBuys, filterValidSeededAccounts, filterValidSeededAccountFinancials, filterValidSeededCreativeFormats, mergeSeededCreativesIntoResponse, mergeSeededMediaBuysIntoResponse, mergeSeededAccountsIntoResponse, mergeSeededCreativeFormatsIntoResponse, pickSeededAccountFinancialsForRequest, replaceAccountFinancialsIfSeeded, bridgeFromTestControllerStore, bridgeFromSessionStore, } from './test-controller-bridge.mjs';
62
62
  export type { TestControllerBridge, TestControllerBridgeContext, BridgeFromSessionStoreOptions, SeededCreative, SeededMediaBuy, SeededAccountFinancials, } from './test-controller-bridge.mjs';