prebid.js 8.3.0 → 8.5.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 (354) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/a1MediaRtdProvider.js +1 -0
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adfBidAdapter.js +1 -1
  7. package/dist/adgenerationBidAdapter.js +1 -1
  8. package/dist/adkernelAdnBidAdapter.js +1 -1
  9. package/dist/adkernelBidAdapter.js +1 -1
  10. package/dist/admanBidAdapter.js +1 -1
  11. package/dist/admixerIdSystem.js +1 -1
  12. package/dist/adnuntiusBidAdapter.js +1 -1
  13. package/dist/adqueryBidAdapter.js +1 -1
  14. package/dist/adqueryIdSystem.js +1 -1
  15. package/dist/adrelevantisBidAdapter.js +1 -1
  16. package/dist/adtelligentIdSystem.js +1 -1
  17. package/dist/adtrgtmeBidAdapter.js +1 -1
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adyoulikeBidAdapter.js +1 -1
  20. package/dist/ajaBidAdapter.js +1 -1
  21. package/dist/amxBidAdapter.js +1 -1
  22. package/dist/amxIdSystem.js +1 -1
  23. package/dist/appierAnalyticsAdapter.js +1 -1
  24. package/dist/appnexusBidAdapter.js +1 -1
  25. package/dist/asoBidAdapter.js +1 -1
  26. package/dist/axonixBidAdapter.js +1 -1
  27. package/dist/beachfrontBidAdapter.js +1 -1
  28. package/dist/bidglassBidAdapter.js +1 -1
  29. package/dist/big-richmediaBidAdapter.js +1 -1
  30. package/dist/brandmetricsRtdProvider.js +1 -1
  31. package/dist/bridBidAdapter.js +1 -1
  32. package/dist/bridgewellBidAdapter.js +1 -1
  33. package/dist/brightMountainMediaBidAdapter.js +1 -1
  34. package/dist/britepoolIdSystem.js +1 -1
  35. package/dist/carodaBidAdapter.js +1 -1
  36. package/dist/chtnwBidAdapter.js +1 -1
  37. package/dist/concertBidAdapter.js +1 -1
  38. package/dist/connectIdSystem.js +1 -1
  39. package/dist/connectadBidAdapter.js +1 -1
  40. package/dist/consentManagementGpp.js +1 -1
  41. package/dist/consumableBidAdapter.js +1 -1
  42. package/dist/conversantAnalyticsAdapter.js +1 -1
  43. package/dist/conversantBidAdapter.js +1 -1
  44. package/dist/craftBidAdapter.js +1 -1
  45. package/dist/criteoBidAdapter.js +1 -1
  46. package/dist/criteoIdSystem.js +1 -1
  47. package/dist/cwireBidAdapter.js +1 -1
  48. package/dist/czechAdIdSystem.js +1 -1
  49. package/dist/dacIdSystem.js +1 -1
  50. package/dist/deepintentDpesIdSystem.js +1 -1
  51. package/dist/dependencies.json +6 -0
  52. package/dist/dmdIdSystem.js +1 -1
  53. package/dist/dspxBidAdapter.js +1 -1
  54. package/dist/eplanningBidAdapter.js +1 -1
  55. package/dist/euidIdSystem.js +1 -1
  56. package/dist/fabrickIdSystem.js +1 -1
  57. package/dist/feedadBidAdapter.js +1 -1
  58. package/dist/finativeBidAdapter.js +1 -1
  59. package/dist/freewheel-sspBidAdapter.js +1 -1
  60. package/dist/ftrackIdSystem.js +1 -1
  61. package/dist/gdprEnforcement.js +1 -1
  62. package/dist/geolocationRtdProvider.js +1 -0
  63. package/dist/gmosspBidAdapter.js +1 -1
  64. package/dist/goldbachBidAdapter.js +1 -1
  65. package/dist/gravitoIdSystem.js +1 -1
  66. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  67. package/dist/greenbidsRtdProvider.js +1 -1
  68. package/dist/gridBidAdapter.js +1 -1
  69. package/dist/growthCodeIdSystem.js +1 -1
  70. package/dist/gumgumBidAdapter.js +1 -1
  71. package/dist/h12mediaBidAdapter.js +1 -1
  72. package/dist/hadronIdSystem.js +1 -1
  73. package/dist/hypelabBidAdapter.js +1 -1
  74. package/dist/id5IdSystem.js +1 -1
  75. package/dist/identityLinkIdSystem.js +1 -1
  76. package/dist/idxIdSystem.js +1 -1
  77. package/dist/imdsBidAdapter.js +1 -1
  78. package/dist/improvedigitalBidAdapter.js +1 -1
  79. package/dist/imuIdSystem.js +1 -1
  80. package/dist/insticatorBidAdapter.js +1 -1
  81. package/dist/intentIqIdSystem.js +1 -1
  82. package/dist/invibesBidAdapter.js +1 -1
  83. package/dist/ixBidAdapter.js +1 -1
  84. package/dist/justIdSystem.js +1 -1
  85. package/dist/justpremiumBidAdapter.js +1 -1
  86. package/dist/kargoBidAdapter.js +1 -1
  87. package/dist/kinessoIdSystem.js +1 -1
  88. package/dist/konduitAnalyticsAdapter.js +1 -1
  89. package/dist/kueezBidAdapter.js +1 -1
  90. package/dist/kueezRtbBidAdapter.js +1 -1
  91. package/dist/kulturemediaBidAdapter.js +1 -1
  92. package/dist/lassoBidAdapter.js +1 -1
  93. package/dist/lifestreetBidAdapter.js +1 -1
  94. package/dist/liveIntentIdSystem.js +1 -1
  95. package/dist/logicadBidAdapter.js +1 -1
  96. package/dist/loglyliftBidAdapter.js +1 -1
  97. package/dist/lotamePanoramaIdSystem.js +1 -1
  98. package/dist/magniteAnalyticsAdapter.js +1 -1
  99. package/dist/malltvAnalyticsAdapter.js +1 -1
  100. package/dist/marsmediaBidAdapter.js +1 -1
  101. package/dist/mediafuseBidAdapter.js +1 -1
  102. package/dist/mediasquareBidAdapter.js +1 -1
  103. package/dist/merkleIdSystem.js +1 -1
  104. package/dist/mgidBidAdapter.js +1 -1
  105. package/dist/minutemediaBidAdapter.js +1 -1
  106. package/dist/minutemediaplusBidAdapter.js +1 -1
  107. package/dist/mwOpenLinkIdSystem.js +1 -1
  108. package/dist/naveggIdSystem.js +1 -1
  109. package/dist/netIdSystem.js +1 -1
  110. package/dist/nexx360BidAdapter.js +1 -1
  111. package/dist/not-for-prod/prebid.js +185 -182
  112. package/dist/novatiqIdSystem.js +1 -1
  113. package/dist/oguryBidAdapter.js +1 -1
  114. package/dist/oneKeyIdSystem.js +1 -1
  115. package/dist/onetagBidAdapter.js +1 -1
  116. package/dist/ooloAnalyticsAdapter.js +1 -1
  117. package/dist/optidigitalBidAdapter.js +1 -1
  118. package/dist/outbrainBidAdapter.js +1 -1
  119. package/dist/ozoneBidAdapter.js +1 -1
  120. package/dist/pairIdSystem.js +1 -1
  121. package/dist/parrableIdSystem.js +1 -1
  122. package/dist/pixfutureBidAdapter.js +1 -1
  123. package/dist/prebid-core.js +2 -2
  124. package/dist/publinkIdSystem.js +1 -1
  125. package/dist/pubmaticBidAdapter.js +1 -1
  126. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  127. package/dist/pulsepointBidAdapter.js +1 -1
  128. package/dist/pxyzBidAdapter.js +1 -1
  129. package/dist/quantcastBidAdapter.js +1 -1
  130. package/dist/quantcastIdSystem.js +1 -1
  131. package/dist/readpeakBidAdapter.js +1 -1
  132. package/dist/relaidoBidAdapter.js +1 -1
  133. package/dist/retailspotBidAdapter.js +1 -1
  134. package/dist/rhythmoneBidAdapter.js +1 -1
  135. package/dist/riseBidAdapter.js +1 -1
  136. package/dist/rubiconBidAdapter.js +1 -1
  137. package/dist/seedingAllianceBidAdapter.js +1 -1
  138. package/dist/seedtagBidAdapter.js +1 -1
  139. package/dist/sharedIdSystem.js +1 -1
  140. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  141. package/dist/sharethroughBidAdapter.js +1 -1
  142. package/dist/shinezBidAdapter.js +1 -1
  143. package/dist/silverpushBidAdapter.js +1 -1
  144. package/dist/smaatoBidAdapter.js +1 -1
  145. package/dist/smartadserverBidAdapter.js +1 -1
  146. package/dist/smartxBidAdapter.js +1 -1
  147. package/dist/smilewantedBidAdapter.js +1 -1
  148. package/dist/sonobiBidAdapter.js +1 -1
  149. package/dist/sovrnAnalyticsAdapter.js +1 -1
  150. package/dist/sovrnBidAdapter.js +1 -1
  151. package/dist/ssmasBidAdapter.js +1 -0
  152. package/dist/sspBCBidAdapter.js +1 -1
  153. package/dist/stroeerCoreBidAdapter.js +1 -1
  154. package/dist/stvBidAdapter.js +1 -1
  155. package/dist/sublimeBidAdapter.js +1 -1
  156. package/dist/tapadIdSystem.js +1 -1
  157. package/dist/targetVideoBidAdapter.js +1 -1
  158. package/dist/teadsBidAdapter.js +1 -1
  159. package/dist/tncIdSystem.js +1 -1
  160. package/dist/topicsFpdModule.js +1 -1
  161. package/dist/trionBidAdapter.js +1 -1
  162. package/dist/tripleliftBidAdapter.js +1 -1
  163. package/dist/ttdBidAdapter.js +1 -1
  164. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  165. package/dist/uid2IdSystem.js +1 -1
  166. package/dist/underdogmediaBidAdapter.js +1 -1
  167. package/dist/undertoneBidAdapter.js +1 -1
  168. package/dist/unifiedIdSystem.js +1 -1
  169. package/dist/userId.js +1 -1
  170. package/dist/utiqSystem.js +1 -1
  171. package/dist/verizonMediaIdSystem.js +1 -1
  172. package/dist/vidazooBidAdapter.js +1 -1
  173. package/dist/videobyteBidAdapter.js +1 -1
  174. package/dist/visxBidAdapter.js +1 -1
  175. package/dist/voxBidAdapter.js +1 -1
  176. package/dist/vrtcalBidAdapter.js +1 -1
  177. package/dist/vuukleBidAdapter.js +1 -1
  178. package/dist/widespaceBidAdapter.js +1 -1
  179. package/dist/winrBidAdapter.js +1 -1
  180. package/dist/yahoosspBidAdapter.js +1 -1
  181. package/dist/yandexBidAdapter.js +1 -1
  182. package/dist/yieldmoBidAdapter.js +1 -1
  183. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  184. package/dist/zeotapIdPlusIdSystem.js +1 -1
  185. package/integrationExamples/gpt/adUnitFloors.html +0 -1
  186. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  187. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  188. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  189. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  190. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  191. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  192. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  193. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  194. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  195. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  196. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  197. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  198. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  199. package/modules/.submodules.json +1 -0
  200. package/modules/33acrossBidAdapter.js +24 -14
  201. package/modules/33acrossIdSystem.js +24 -4
  202. package/modules/a1MediaRtdProvider.js +92 -0
  203. package/modules/a1MediaRtdProvider.md +46 -0
  204. package/modules/adagioBidAdapter.js +0 -1
  205. package/modules/adfBidAdapter.js +4 -1
  206. package/modules/adkernelAdnBidAdapter.js +1 -1
  207. package/modules/adkernelBidAdapter.js +10 -3
  208. package/modules/admanBidAdapter.js +4 -0
  209. package/modules/admixerIdSystem.js +6 -0
  210. package/modules/adnuntiusBidAdapter.js +5 -13
  211. package/modules/adqueryIdSystem.js +6 -0
  212. package/modules/adtelligentIdSystem.js +6 -0
  213. package/modules/adyoulikeBidAdapter.js +6 -3
  214. package/modules/amxIdSystem.js +6 -0
  215. package/modules/beachfrontBidAdapter.js +32 -6
  216. package/modules/brandmetricsRtdProvider.js +36 -2
  217. package/modules/brandmetricsRtdProvider.md +17 -2
  218. package/modules/britepoolIdSystem.js +6 -0
  219. package/modules/connectIdSystem.js +6 -0
  220. package/modules/consentManagementGpp.js +10 -1
  221. package/modules/consumableBidAdapter.js +9 -1
  222. package/modules/criteoIdSystem.js +6 -0
  223. package/modules/czechAdIdSystem.js +6 -0
  224. package/modules/dacIdSystem.js +6 -0
  225. package/modules/deepintentDpesIdSystem.js +7 -2
  226. package/modules/dmdIdSystem.js +6 -0
  227. package/modules/euidIdSystem.js +9 -0
  228. package/modules/fabrickIdSystem.js +6 -0
  229. package/modules/ftrackIdSystem.js +16 -0
  230. package/modules/gdprEnforcement.js +27 -22
  231. package/modules/geolocationRtdProvider.js +65 -0
  232. package/modules/gravitoIdSystem.js +6 -0
  233. package/modules/greenbidsRtdProvider.js +1 -1
  234. package/modules/gridBidAdapter.js +19 -0
  235. package/modules/growthCodeIdSystem.js +20 -1
  236. package/modules/hadronIdSystem.js +6 -0
  237. package/modules/id5IdSystem.js +34 -8
  238. package/modules/identityLinkIdSystem.js +6 -0
  239. package/modules/idxIdSystem.js +6 -0
  240. package/modules/imdsBidAdapter.js +38 -14
  241. package/modules/imuIdSystem.js +10 -0
  242. package/modules/intentIqIdSystem.js +6 -0
  243. package/modules/invibesBidAdapter.js +5 -5
  244. package/modules/ixBidAdapter.js +56 -2
  245. package/modules/justIdSystem.js +6 -0
  246. package/modules/kargoBidAdapter.js +4 -0
  247. package/modules/kinessoIdSystem.js +7 -2
  248. package/modules/liveIntentIdSystem.js +53 -0
  249. package/modules/lotamePanoramaIdSystem.js +6 -0
  250. package/modules/merkleIdSystem.js +24 -0
  251. package/modules/minutemediaBidAdapter.js +17 -2
  252. package/modules/mwOpenLinkIdSystem.js +6 -0
  253. package/modules/naveggIdSystem.js +6 -0
  254. package/modules/netIdSystem.js +6 -0
  255. package/modules/novatiqIdSystem.js +12 -0
  256. package/modules/oguryBidAdapter.js +29 -16
  257. package/modules/oneKeyIdSystem.js +26 -0
  258. package/modules/ozoneBidAdapter.js +65 -18
  259. package/modules/ozoneBidAdapter.md +3 -1
  260. package/modules/pairIdSystem.js +6 -0
  261. package/modules/parrableIdSystem.js +38 -2
  262. package/modules/publinkIdSystem.js +7 -1
  263. package/modules/pubmaticBidAdapter.js +16 -1
  264. package/modules/pulsepointBidAdapter.js +63 -424
  265. package/modules/pulsepointBidAdapter.md +39 -45
  266. package/modules/quantcastIdSystem.js +6 -0
  267. package/modules/rubiconBidAdapter.js +9 -0
  268. package/modules/sharedIdSystem.js +7 -1
  269. package/modules/silverpushBidAdapter.js +2 -2
  270. package/modules/sovrnBidAdapter.js +5 -1
  271. package/modules/ssmasBidAdapter.js +126 -0
  272. package/modules/ssmasBidAdapter.md +35 -0
  273. package/modules/sspBCBidAdapter.js +36 -13
  274. package/modules/stroeerCoreBidAdapter.js +2 -3
  275. package/modules/tapadIdSystem.js +6 -0
  276. package/modules/teadsBidAdapter.js +2 -0
  277. package/modules/tncIdSystem.js +6 -0
  278. package/modules/topicsFpdModule.js +4 -1
  279. package/modules/topicsFpdModule.md +4 -0
  280. package/modules/tripleliftBidAdapter.js +5 -0
  281. package/modules/uid2IdSystem.js +14 -0
  282. package/modules/unifiedIdSystem.js +11 -0
  283. package/modules/userId/eids.js +6 -445
  284. package/modules/userId/index.js +38 -26
  285. package/modules/utiqSystem.js +9 -0
  286. package/modules/verizonMediaIdSystem.js +6 -0
  287. package/modules/vidazooBidAdapter.js +5 -7
  288. package/modules/voxBidAdapter.js +16 -5
  289. package/modules/vrtcalBidAdapter.js +10 -6
  290. package/modules/yahoosspBidAdapter.js +38 -33
  291. package/modules/yahoosspBidAdapter.md +96 -95
  292. package/modules/yandexBidAdapter.js +12 -15
  293. package/modules/zeotapIdPlusIdSystem.js +6 -0
  294. package/package.json +1 -1
  295. package/src/activities/redactor.js +1 -1
  296. package/src/adapters/bidderFactory.js +15 -6
  297. package/src/adloader.js +2 -1
  298. package/src/auction.js +24 -2
  299. package/src/constants.json +3 -1
  300. package/src/fpd/sua.js +8 -2
  301. package/test/spec/auctionmanager_spec.js +29 -1
  302. package/test/spec/fpd/enrichment_spec.js +7 -1
  303. package/test/spec/fpd/sua_spec.js +12 -0
  304. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  305. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  306. package/test/spec/modules/a1MediaRtdProvider_spec.js +105 -0
  307. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  308. package/test/spec/modules/adfBidAdapter_spec.js +47 -0
  309. package/test/spec/modules/adkernelAdnBidAdapter_spec.js +1 -2
  310. package/test/spec/modules/adkernelBidAdapter_spec.js +7 -2
  311. package/test/spec/modules/adnuntiusBidAdapter_spec.js +116 -64
  312. package/test/spec/modules/adyoulikeBidAdapter_spec.js +13 -24
  313. package/test/spec/modules/beachfrontBidAdapter_spec.js +35 -2
  314. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  315. package/test/spec/modules/consentManagementGpp_spec.js +16 -0
  316. package/test/spec/modules/consumableBidAdapter_spec.js +15 -0
  317. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -5
  318. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  319. package/test/spec/modules/geolocationRtdProvider_spec.js +119 -0
  320. package/test/spec/modules/greenbidsRtdProvider_spec.js +1 -1
  321. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  322. package/test/spec/modules/id5IdSystem_spec.js +18 -0
  323. package/test/spec/modules/imdsBidAdapter_spec.js +98 -17
  324. package/test/spec/modules/invibesBidAdapter_spec.js +123 -32
  325. package/test/spec/modules/ixBidAdapter_spec.js +95 -5
  326. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  327. package/test/spec/modules/medianetBidAdapter_spec.js +117 -0
  328. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  329. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  330. package/test/spec/modules/outbrainBidAdapter_spec.js +3 -5
  331. package/test/spec/modules/ozoneBidAdapter_spec.js +27 -1
  332. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -20
  333. package/test/spec/modules/priceFloors_spec.js +14 -0
  334. package/test/spec/modules/pubmaticBidAdapter_spec.js +125 -373
  335. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  336. package/test/spec/modules/rubiconBidAdapter_spec.js +220 -9
  337. package/test/spec/modules/smaatoBidAdapter_spec.js +4 -6
  338. package/test/spec/modules/sovrnBidAdapter_spec.js +24 -4
  339. package/test/spec/modules/ssmasBidAdapter_spec.js +244 -0
  340. package/test/spec/modules/sspBCBidAdapter_spec.js +18 -19
  341. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  342. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  343. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  344. package/test/spec/modules/tripleliftBidAdapter_spec.js +40 -0
  345. package/test/spec/modules/userId_spec.js +116 -7
  346. package/test/spec/modules/vidazooBidAdapter_spec.js +0 -5
  347. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  348. package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -4
  349. package/test/spec/modules/xeBidAdapter_spec.js +366 -368
  350. package/test/spec/modules/yahoosspBidAdapter_spec.js +405 -330
  351. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  352. package/test/spec/unit/core/bidderFactory_spec.js +61 -14
  353. package/integrationExamples/gpt/inskin_example.html +0 -100
  354. package/integrationExamples/gpt/pbjs_video_adUnit.html +0 -109
@@ -7,7 +7,17 @@
7
7
 
8
8
  // ci trigger: 1
9
9
 
10
- import {contains, deepClone, inIframe, isEmpty, isPlainObject, logError, logWarn, timestamp} from '../src/utils.js';
10
+ import {
11
+ contains,
12
+ deepClone,
13
+ inIframe,
14
+ isEmpty,
15
+ isPlainObject,
16
+ logError,
17
+ logWarn,
18
+ pick,
19
+ timestamp
20
+ } from '../src/utils.js';
11
21
  import {find} from '../src/polyfill.js';
12
22
  import {ajax} from '../src/ajax.js';
13
23
  import {submodule} from '../src/hook.js';
@@ -368,7 +378,33 @@ export const parrableIdSubmodule = {
368
378
  getId(config, gdprConsentData, currentStoredId) {
369
379
  const configParams = (config && config.params) || {};
370
380
  return fetchId(configParams, gdprConsentData);
371
- }
381
+ },
382
+ eids: {
383
+ 'parrableId': {
384
+ source: 'parrable.com',
385
+ atype: 1,
386
+ getValue: function(parrableId) {
387
+ if (parrableId.eid) {
388
+ return parrableId.eid;
389
+ }
390
+ if (parrableId.ccpaOptout) {
391
+ // If the EID was suppressed due to a non consenting ccpa optout then
392
+ // we still wish to provide this as a reason to the adapters
393
+ return '';
394
+ }
395
+ return null;
396
+ },
397
+ getUidExt: function(parrableId) {
398
+ const extendedData = pick(parrableId, [
399
+ 'ibaOptout',
400
+ 'ccpaOptout'
401
+ ]);
402
+ if (Object.keys(extendedData).length) {
403
+ return extendedData;
404
+ }
405
+ }
406
+ },
407
+ },
372
408
  };
373
409
 
374
410
  submodule('userId', parrableIdSubmodule);
@@ -140,6 +140,12 @@ export const publinkIdSubmodule = {
140
140
  if (!storedId) {
141
141
  return {callback: makeCallback(config, consentData)};
142
142
  }
143
- }
143
+ },
144
+ eids: {
145
+ 'publinkId': {
146
+ source: 'epsilon.com',
147
+ atype: 3
148
+ },
149
+ },
144
150
  };
145
151
  submodule('userId', publinkIdSubmodule);
@@ -1194,6 +1194,15 @@ export const spec = {
1194
1194
  deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent);
1195
1195
  }
1196
1196
 
1197
+ // Attaching GPP Consent Params
1198
+ if (bidderRequest?.gppConsent?.gppString) {
1199
+ deepSetValue(payload, 'regs.gpp', bidderRequest.gppConsent.gppString);
1200
+ deepSetValue(payload, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
1201
+ } else if (bidderRequest?.ortb2?.regs?.gpp) {
1202
+ deepSetValue(payload, 'regs.gpp', bidderRequest.ortb2.regs.gpp);
1203
+ deepSetValue(payload, 'regs.gpp_sid', bidderRequest.ortb2.regs.gpp_sid);
1204
+ }
1205
+
1197
1206
  // coppa compliance
1198
1207
  if (config.getConfig('coppa') === true) {
1199
1208
  deepSetValue(payload, 'regs.coppa', 1);
@@ -1352,7 +1361,7 @@ export const spec = {
1352
1361
  /**
1353
1362
  * Register User Sync.
1354
1363
  */
1355
- getUserSyncs: (syncOptions, responses, gdprConsent, uspConsent) => {
1364
+ getUserSyncs: (syncOptions, responses, gdprConsent, uspConsent, gppConsent) => {
1356
1365
  let syncurl = '' + publisherId;
1357
1366
 
1358
1367
  // Attaching GDPR Consent Params in UserSync url
@@ -1366,6 +1375,12 @@ export const spec = {
1366
1375
  syncurl += '&us_privacy=' + encodeURIComponent(uspConsent);
1367
1376
  }
1368
1377
 
1378
+ // GPP Consent
1379
+ if (gppConsent?.gppString && gppConsent?.applicableSections?.length) {
1380
+ syncurl += '&gpp=' + encodeURIComponent(gppConsent.gppString);
1381
+ syncurl += '&gpp_sid=' + encodeURIComponent(gppConsent?.applicableSections?.join(','));
1382
+ }
1383
+
1369
1384
  // coppa compliance
1370
1385
  if (config.getConfig('coppa') === true) {
1371
1386
  syncurl += '&coppa=1';
@@ -1,21 +1,9 @@
1
- import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
2
- /* eslint dot-notation:0, quote-props:0 */
3
- import {convertTypes, deepAccess, isArray, isFn, logError} from '../src/utils.js';
1
+ import { ortbConverter } from '../libraries/ortbConverter/converter.js';
2
+ import {convertTypes, isArray} from '../src/utils.js';
4
3
  import {registerBidder} from '../src/adapters/bidderFactory.js';
5
- import {Renderer} from '../src/Renderer.js';
6
4
 
7
- const NATIVE_DEFAULTS = {
8
- TITLE_LEN: 100,
9
- DESCR_LEN: 200,
10
- SPONSORED_BY_LEN: 50,
11
- IMG_MIN: 150,
12
- ICON_MIN: 50,
13
- };
14
-
15
- const DEFAULT_BID_TTL = 20;
16
5
  const DEFAULT_CURRENCY = 'USD';
17
- const DEFAULT_NET_REVENUE = true;
18
- const KNOWN_PARAMS = ['cp', 'ct', 'cf', 'video', 'battr', 'bcat', 'badv', 'bidfloor'];
6
+ const KNOWN_PARAMS = ['cp', 'ct', 'cf', 'battr', 'deals'];
19
7
  const DEFAULT_TMAX = 500;
20
8
 
21
9
  /**
@@ -41,33 +29,21 @@ export const spec = {
41
29
  ),
42
30
 
43
31
  buildRequests: (bidRequests, bidderRequest) => {
44
- // convert Native ORTB definition to old-style prebid native definition
45
- bidRequests = convertOrtbRequestToProprietaryNative(bidRequests);
46
-
47
- const request = {
48
- id: bidRequests[0].bidderRequestId,
49
- imp: bidRequests.map(slot => impression(slot)),
50
- site: site(bidRequests, bidderRequest),
51
- app: app(bidRequests),
52
- device: device(),
53
- bcat: deepAccess(bidderRequest.ortb2Imp, 'bcat') || bidRequests[0].params.bcat,
54
- badv: bidRequests[0].params.badv,
55
- user: user(bidRequests[0], bidderRequest),
56
- regs: regs(bidderRequest),
57
- source: source(bidRequests[0].schain),
58
- tmax: bidderRequest.timeout || DEFAULT_TMAX,
59
- };
32
+ const data = converter.toORTB({bidRequests, bidderRequest});
60
33
  return {
61
34
  method: 'POST',
62
35
  url: 'https://bid.contextweb.com/header/ortb?src=prebid',
63
- data: request,
36
+ data,
64
37
  bidderRequest
65
38
  };
66
39
  },
67
40
 
68
- interpretResponse: (response, request) => (
69
- bidResponseAvailable(request, response)
70
- ),
41
+ interpretResponse: (response, request) => {
42
+ if (response.body) {
43
+ return converter.fromORTB({response: response.body, request: request.data}).bids;
44
+ }
45
+ return [];
46
+ },
71
47
 
72
48
  getUserSyncs: syncOptions => {
73
49
  if (syncOptions.iframeEnabled) {
@@ -82,7 +58,7 @@ export const spec = {
82
58
  }];
83
59
  }
84
60
  },
85
- transformBidParams: function(params, isOpenRtb) {
61
+ transformBidParams: function(params) {
86
62
  return convertTypes({
87
63
  'cf': 'string',
88
64
  'cp': 'number',
@@ -91,124 +67,61 @@ export const spec = {
91
67
  }
92
68
  };
93
69
 
94
- /**
95
- * Callback for bids, after the call to PulsePoint completes.
96
- */
97
- function bidResponseAvailable(request, response) {
98
- const idToImpMap = {};
99
- const idToBidMap = {};
100
- const idToSlotConfig = {};
101
- const bidResponse = response.body;
102
- // extract the request bids and the response bids, keyed by impr-id
103
- const ortbRequest = request.data;
104
- ortbRequest.imp.forEach(imp => {
105
- idToImpMap[imp.id] = imp;
106
- });
107
- if (bidResponse) {
108
- bidResponse.seatbid.forEach(seatBid => seatBid.bid.forEach(bid => {
109
- idToBidMap[bid.impid] = bid;
110
- }));
111
- }
112
- if (request.bidderRequest && request.bidderRequest.bids) {
113
- request.bidderRequest.bids.forEach(bid => {
114
- idToSlotConfig[bid.bidId] = bid;
115
- });
116
- }
117
- const bids = [];
118
- Object.keys(idToImpMap).forEach(id => {
119
- if (idToBidMap[id]) {
120
- const bid = {
121
- requestId: id,
122
- cpm: idToBidMap[id].price,
123
- creative_id: idToBidMap[id].crid,
124
- creativeId: idToBidMap[id].crid,
125
- adId: id,
126
- ttl: idToBidMap[id].exp || DEFAULT_BID_TTL,
127
- netRevenue: DEFAULT_NET_REVENUE,
128
- currency: bidResponse.cur || DEFAULT_CURRENCY,
129
- meta: { advertiserDomains: idToBidMap[id].adomain || [] }
130
- };
131
- if (idToImpMap[id].video) {
132
- // for outstream, a renderer is specified
133
- if (idToSlotConfig[id] && deepAccess(idToSlotConfig[id], 'mediaTypes.video.context') === 'outstream') {
134
- bid.renderer = outstreamRenderer(deepAccess(idToSlotConfig[id], 'renderer.options'), deepAccess(idToBidMap[id], 'ext.outstream'));
70
+ const converter = ortbConverter({
71
+ context: {
72
+ netRevenue: true,
73
+ ttl: 300,
74
+ currency: 'USD'
75
+ },
76
+
77
+ imp(buildImp, bidRequest, context) {
78
+ const imp = buildImp(bidRequest, context);
79
+ // tagid
80
+ imp.tagid = bidRequest.params.ct.toString();
81
+ // unknown params
82
+ const unknownParams = slotUnknownParams(bidRequest);
83
+ if (imp.ext || unknownParams) {
84
+ imp.ext = Object.assign({}, imp.ext, unknownParams);
85
+ }
86
+ // battr
87
+ if (bidRequest.params.battr) {
88
+ ['banner', 'video', 'audio', 'native'].forEach(k => {
89
+ if (imp[k]) {
90
+ imp[k].battr = bidRequest.params.battr;
135
91
  }
136
- bid.vastXml = idToBidMap[id].adm;
137
- bid.mediaType = 'video';
138
- bid.width = idToBidMap[id].w;
139
- bid.height = idToBidMap[id].h;
140
- } else if (idToImpMap[id].banner) {
141
- bid.ad = idToBidMap[id].adm;
142
- bid.width = idToBidMap[id].w || idToImpMap[id].banner.w;
143
- bid.height = idToBidMap[id].h || idToImpMap[id].banner.h;
144
- } else if (idToImpMap[id]['native']) {
145
- bid['native'] = nativeResponse(idToImpMap[id], idToBidMap[id]);
146
- bid.mediaType = 'native';
147
- }
148
- bids.push(bid);
92
+ });
149
93
  }
150
- });
151
- return bids;
152
- }
153
-
154
- /**
155
- * Produces an OpenRTBImpression from a slot config.
156
- */
157
- function impression(slot) {
158
- var firstPartyData = slot.ortb2Imp?.ext || {};
159
- var ext = Object.assign({}, firstPartyData, slotUnknownParams(slot));
160
- return {
161
- id: slot.bidId,
162
- banner: banner(slot),
163
- 'native': nativeImpression(slot),
164
- tagid: slot.params.ct.toString(),
165
- video: video(slot),
166
- bidfloor: bidFloor(slot),
167
- ext: Object.keys(ext).length > 0 ? ext : null,
168
- };
169
- }
170
-
171
- /**
172
- * Produces an OpenRTB Banner object for the slot given.
173
- */
174
- function banner(slot) {
175
- const sizes = parseSizes(slot);
176
- const size = adSize(slot, sizes);
177
- return (slot.mediaTypes && slot.mediaTypes.banner) ? {
178
- w: size[0],
179
- h: size[1],
180
- battr: slot.params.battr,
181
- format: sizes
182
- } : null;
183
- }
94
+ // deals
95
+ if (bidRequest.params.deals && isArray(bidRequest.params.deals)) {
96
+ imp.pmp = {
97
+ private_auction: 0,
98
+ deals: bidRequest.params.deals
99
+ };
100
+ }
101
+ return imp;
102
+ },
184
103
 
185
- /**
186
- * Produce openrtb format objects based on the sizes configured for the slot.
187
- */
188
- function parseSizes(slot) {
189
- const sizes = deepAccess(slot, 'mediaTypes.banner.sizes');
190
- if (sizes && isArray(sizes)) {
191
- return sizes.filter(sz => isArray(sz) && sz.length === 2).map(sz => ({
192
- w: sz[0],
193
- h: sz[1]
194
- }));
195
- }
196
- return null;
197
- }
104
+ request(buildRequest, imps, bidderRequest, context) {
105
+ const request = buildRequest(imps, bidderRequest, context);
106
+ // publisher id
107
+ const siteOrApp = request.site || request.app;
108
+ const pubId = context.bidRequests && context.bidRequests.length > 0 ? context.bidRequests[0].params.cp : '0';
109
+ if (siteOrApp) {
110
+ siteOrApp.publisher = Object.assign({}, siteOrApp.publisher, {
111
+ id: pubId.toString()
112
+ });
113
+ }
114
+ // tmax
115
+ request.tmax = request.tmax || DEFAULT_TMAX;
116
+ return request;
117
+ },
198
118
 
199
- /**
200
- * Produces an OpenRTB Video object for the slot given
201
- */
202
- function video(slot) {
203
- if (slot.params.video) {
204
- return Object.assign({},
205
- slot.params.video, // previously supported as bidder param
206
- slot.mediaTypes && slot.mediaTypes.video ? slot.mediaTypes.video : {}, // params on mediaTypes.video
207
- {battr: slot.params.battr}
208
- );
209
- }
210
- return null;
211
- }
119
+ bidResponse(buildBidResponse, bid, context) {
120
+ const bidResponse = buildBidResponse(bid, context);
121
+ bidResponse.cur = bidResponse.cur || DEFAULT_CURRENCY;
122
+ return bidResponse;
123
+ },
124
+ });
212
125
 
213
126
  /**
214
127
  * Unknown params are captured and sent on ext
@@ -225,278 +138,4 @@ function slotUnknownParams(slot) {
225
138
  return Object.keys(ext).length > 0 ? { prebid: ext } : null;
226
139
  }
227
140
 
228
- /**
229
- * Sets up the renderer on the bid, for outstream bid responses.
230
- */
231
- function outstreamRenderer(rendererOptions, outstreamExtOptions) {
232
- const renderer = Renderer.install({
233
- url: outstreamExtOptions.rendererUrl,
234
- config: {
235
- defaultOptions: outstreamExtOptions.config,
236
- rendererOptions,
237
- type: outstreamExtOptions.type
238
- },
239
- loaded: false,
240
- });
241
- renderer.setRender((bid) => {
242
- bid.renderer.push(() => {
243
- const config = bid.renderer.getConfig();
244
- new window.PulsePointOutstreamRenderer().render({
245
- adUnitCode: bid.adUnitCode,
246
- vastXml: bid.vastXml,
247
- type: config.type,
248
- defaultOptions: config.defaultOptions,
249
- rendererOptions
250
- });
251
- });
252
- });
253
- return renderer;
254
- }
255
-
256
- /**
257
- * Produces an OpenRTB Native object for the slot given.
258
- */
259
- function nativeImpression(slot) {
260
- if (slot.nativeParams) {
261
- const assets = [];
262
- addAsset(assets, titleAsset(assets.length + 1, slot.nativeParams.title, NATIVE_DEFAULTS.TITLE_LEN));
263
- addAsset(assets, dataAsset(assets.length + 1, slot.nativeParams.body, 2, NATIVE_DEFAULTS.DESCR_LEN));
264
- addAsset(assets, dataAsset(assets.length + 1, slot.nativeParams.sponsoredBy, 1, NATIVE_DEFAULTS.SPONSORED_BY_LEN));
265
- addAsset(assets, imageAsset(assets.length + 1, slot.nativeParams.icon, 1, NATIVE_DEFAULTS.ICON_MIN, NATIVE_DEFAULTS.ICON_MIN));
266
- addAsset(assets, imageAsset(assets.length + 1, slot.nativeParams.image, 3, NATIVE_DEFAULTS.IMG_MIN, NATIVE_DEFAULTS.IMG_MIN));
267
- return {
268
- request: JSON.stringify({ assets }),
269
- ver: '1.1',
270
- battr: slot.params.battr,
271
- };
272
- }
273
- return null;
274
- }
275
-
276
- /**
277
- * Helper method to add an asset to the assets list.
278
- */
279
- function addAsset(assets, asset) {
280
- if (asset) {
281
- assets.push(asset);
282
- }
283
- }
284
-
285
- /**
286
- * Produces a Native Title asset for the configuration given.
287
- */
288
- function titleAsset(id, params, defaultLen) {
289
- if (params) {
290
- return {
291
- id,
292
- required: params.required ? 1 : 0,
293
- title: {
294
- len: params.len || defaultLen,
295
- },
296
- };
297
- }
298
- return null;
299
- }
300
-
301
- /**
302
- * Produces a Native Image asset for the configuration given.
303
- */
304
- function imageAsset(id, params, type, defaultMinWidth, defaultMinHeight) {
305
- return params ? {
306
- id,
307
- required: params.required ? 1 : 0,
308
- img: {
309
- type,
310
- wmin: params.wmin || defaultMinWidth,
311
- hmin: params.hmin || defaultMinHeight,
312
- }
313
- } : null;
314
- }
315
-
316
- /**
317
- * Produces a Native Data asset for the configuration given.
318
- */
319
- function dataAsset(id, params, type, defaultLen) {
320
- return params ? {
321
- id,
322
- required: params.required ? 1 : 0,
323
- data: {
324
- type,
325
- len: params.len || defaultLen,
326
- }
327
- } : null;
328
- }
329
-
330
- /**
331
- * Produces an OpenRTB site object.
332
- */
333
- function site(bidRequests, bidderRequest) {
334
- const pubId = bidRequests && bidRequests.length > 0 ? bidRequests[0].params.cp : '0';
335
- const appParams = bidRequests[0].params.app;
336
- if (!appParams) {
337
- // use the first party data if available, and override only publisher/ref/page properties
338
- var firstPartyData = bidderRequest?.ortb2?.site || {};
339
- return Object.assign({}, firstPartyData, {
340
- publisher: {
341
- id: pubId.toString(),
342
- },
343
- // TODO: does the fallback make sense here?
344
- ref: bidderRequest?.refererInfo?.ref || window.document.referrer,
345
- page: bidderRequest?.refererInfo?.page || ''
346
- });
347
- }
348
- return null;
349
- }
350
-
351
- /**
352
- * Produces an OpenRTB App object.
353
- */
354
- function app(bidderRequest) {
355
- const pubId = bidderRequest && bidderRequest.length > 0 ? bidderRequest[0].params.cp : '0';
356
- const appParams = bidderRequest[0].params.app;
357
- if (appParams) {
358
- return {
359
- publisher: {
360
- id: pubId.toString(),
361
- },
362
- bundle: appParams.bundle,
363
- storeurl: appParams.storeUrl,
364
- domain: appParams.domain,
365
- }
366
- }
367
- return null;
368
- }
369
-
370
- /**
371
- * Produces an OpenRTB Device object.
372
- */
373
- function device() {
374
- return {
375
- ua: navigator.userAgent,
376
- language: (navigator.language || navigator.browserLanguage || navigator.userLanguage || navigator.systemLanguage),
377
- };
378
- }
379
-
380
- /**
381
- * Safely parses the input given. Returns null on
382
- * parsing failure.
383
- */
384
- function parse(rawResponse) {
385
- try {
386
- if (rawResponse) {
387
- return JSON.parse(rawResponse);
388
- }
389
- } catch (ex) {
390
- logError('pulsepointLite.safeParse', 'ERROR', ex);
391
- }
392
- return null;
393
- }
394
-
395
- /**
396
- * Determines the AdSize for the slot.
397
- */
398
- function adSize(slot, sizes) {
399
- if (slot.params.cf) {
400
- const size = slot.params.cf.toUpperCase().split('X');
401
- const width = parseInt(slot.params.cw || size[0], 10);
402
- const height = parseInt(slot.params.ch || size[1], 10);
403
- return [width, height];
404
- } else if (sizes && sizes.length > 0) {
405
- return [sizes[0].w, sizes[0].h];
406
- }
407
- return [1, 1];
408
- }
409
-
410
- /**
411
- * Handles the user level attributes and produces
412
- * an openrtb User object.
413
- */
414
- function user(bidRequest, bidderRequest) {
415
- var user = bidderRequest?.ortb2?.user || { ext: {} };
416
- var ext = user.ext;
417
- if (bidderRequest) {
418
- if (bidderRequest.gdprConsent) {
419
- ext.consent = bidderRequest.gdprConsent.consentString;
420
- }
421
- }
422
- if (bidRequest) {
423
- let eids = bidRequest.userIdAsEids;
424
- if (eids) {
425
- ext.eids = eids;
426
- }
427
- }
428
- return user;
429
- }
430
-
431
- /**
432
- * Produces the regulations ortb object
433
- */
434
- function regs(bidderRequest) {
435
- if (bidderRequest.gdprConsent || bidderRequest.uspConsent) {
436
- var ext = {};
437
- // GDPR applies attribute (actual consent value is in user object)
438
- if (bidderRequest.gdprConsent) {
439
- ext.gdpr = bidderRequest.gdprConsent.gdprApplies ? 1 : 0;
440
- }
441
- // CCPA
442
- if (bidderRequest.uspConsent) {
443
- ext.us_privacy = bidderRequest.uspConsent;
444
- }
445
- return { ext };
446
- }
447
- return null;
448
- }
449
-
450
- /**
451
- * Creates source object with supply chain
452
- */
453
- function source(schain) {
454
- if (schain) {
455
- return {
456
- ext: { schain }
457
- };
458
- }
459
- return null;
460
- }
461
-
462
- /**
463
- * Parses the native response from the Bid given.
464
- */
465
- function nativeResponse(imp, bid) {
466
- if (imp['native']) {
467
- const nativeAd = parse(bid.adm);
468
- const keys = {};
469
- if (nativeAd && nativeAd['native'] && nativeAd['native'].assets) {
470
- nativeAd['native'].assets.forEach(asset => {
471
- keys.title = asset.title ? asset.title.text : keys.title;
472
- keys.body = asset.data && asset.data.type === 2 ? asset.data.value : keys.body;
473
- keys.sponsoredBy = asset.data && asset.data.type === 1 ? asset.data.value : keys.sponsoredBy;
474
- keys.image = asset.img && asset.img.type === 3 ? asset.img.url : keys.image;
475
- keys.icon = asset.img && asset.img.type === 1 ? asset.img.url : keys.icon;
476
- });
477
- if (nativeAd['native'].link) {
478
- keys.clickUrl = encodeURIComponent(nativeAd['native'].link.url);
479
- }
480
- keys.impressionTrackers = nativeAd['native'].imptrackers;
481
- return keys;
482
- }
483
- }
484
- return null;
485
- }
486
-
487
- function bidFloor(slot) {
488
- let floor = slot.params.bidfloor;
489
- if (isFn(slot.getFloor)) {
490
- const floorData = slot.getFloor({
491
- mediaType: slot.mediaTypes.banner ? 'banner' : slot.mediaTypes.video ? 'video' : 'Native',
492
- size: '*',
493
- currency: DEFAULT_CURRENCY,
494
- });
495
- if (floorData && floorData.floor) {
496
- floor = floorData.floor;
497
- }
498
- }
499
- return floor;
500
- }
501
-
502
141
  registerBidder(spec);