prebid.js 8.4.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 (285) 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/admixerIdSystem.js +1 -1
  11. package/dist/adnuntiusBidAdapter.js +1 -1
  12. package/dist/adqueryBidAdapter.js +1 -1
  13. package/dist/adqueryIdSystem.js +1 -1
  14. package/dist/adrelevantisBidAdapter.js +1 -1
  15. package/dist/adtelligentIdSystem.js +1 -1
  16. package/dist/adtrgtmeBidAdapter.js +1 -1
  17. package/dist/adxcgBidAdapter.js +1 -1
  18. package/dist/adyoulikeBidAdapter.js +1 -1
  19. package/dist/ajaBidAdapter.js +1 -1
  20. package/dist/amxBidAdapter.js +1 -1
  21. package/dist/amxIdSystem.js +1 -1
  22. package/dist/appierAnalyticsAdapter.js +1 -1
  23. package/dist/appnexusBidAdapter.js +1 -1
  24. package/dist/asoBidAdapter.js +1 -1
  25. package/dist/axonixBidAdapter.js +1 -1
  26. package/dist/beachfrontBidAdapter.js +1 -1
  27. package/dist/bidglassBidAdapter.js +1 -1
  28. package/dist/big-richmediaBidAdapter.js +1 -1
  29. package/dist/bridBidAdapter.js +1 -1
  30. package/dist/bridgewellBidAdapter.js +1 -1
  31. package/dist/brightMountainMediaBidAdapter.js +1 -1
  32. package/dist/britepoolIdSystem.js +1 -1
  33. package/dist/carodaBidAdapter.js +1 -1
  34. package/dist/chtnwBidAdapter.js +1 -1
  35. package/dist/concertBidAdapter.js +1 -1
  36. package/dist/connectIdSystem.js +1 -1
  37. package/dist/connectadBidAdapter.js +1 -1
  38. package/dist/consentManagementGpp.js +1 -1
  39. package/dist/consumableBidAdapter.js +1 -1
  40. package/dist/conversantAnalyticsAdapter.js +1 -1
  41. package/dist/conversantBidAdapter.js +1 -1
  42. package/dist/craftBidAdapter.js +1 -1
  43. package/dist/criteoBidAdapter.js +1 -1
  44. package/dist/criteoIdSystem.js +1 -1
  45. package/dist/cwireBidAdapter.js +1 -1
  46. package/dist/czechAdIdSystem.js +1 -1
  47. package/dist/dacIdSystem.js +1 -1
  48. package/dist/deepintentDpesIdSystem.js +1 -1
  49. package/dist/dependencies.json +3 -0
  50. package/dist/dmdIdSystem.js +1 -1
  51. package/dist/dspxBidAdapter.js +1 -1
  52. package/dist/eplanningBidAdapter.js +1 -1
  53. package/dist/euidIdSystem.js +1 -1
  54. package/dist/fabrickIdSystem.js +1 -1
  55. package/dist/feedadBidAdapter.js +1 -1
  56. package/dist/finativeBidAdapter.js +1 -1
  57. package/dist/freewheel-sspBidAdapter.js +1 -1
  58. package/dist/ftrackIdSystem.js +1 -1
  59. package/dist/geolocationRtdProvider.js +1 -0
  60. package/dist/gmosspBidAdapter.js +1 -1
  61. package/dist/goldbachBidAdapter.js +1 -1
  62. package/dist/gravitoIdSystem.js +1 -1
  63. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  64. package/dist/greenbidsRtdProvider.js +1 -1
  65. package/dist/gridBidAdapter.js +1 -1
  66. package/dist/growthCodeIdSystem.js +1 -1
  67. package/dist/gumgumBidAdapter.js +1 -1
  68. package/dist/h12mediaBidAdapter.js +1 -1
  69. package/dist/hadronIdSystem.js +1 -1
  70. package/dist/hypelabBidAdapter.js +1 -1
  71. package/dist/id5IdSystem.js +1 -1
  72. package/dist/identityLinkIdSystem.js +1 -1
  73. package/dist/idxIdSystem.js +1 -1
  74. package/dist/imdsBidAdapter.js +1 -1
  75. package/dist/improvedigitalBidAdapter.js +1 -1
  76. package/dist/imuIdSystem.js +1 -1
  77. package/dist/insticatorBidAdapter.js +1 -1
  78. package/dist/intentIqIdSystem.js +1 -1
  79. package/dist/invibesBidAdapter.js +1 -1
  80. package/dist/ixBidAdapter.js +1 -1
  81. package/dist/justIdSystem.js +1 -1
  82. package/dist/justpremiumBidAdapter.js +1 -1
  83. package/dist/kargoBidAdapter.js +1 -1
  84. package/dist/kinessoIdSystem.js +1 -1
  85. package/dist/konduitAnalyticsAdapter.js +1 -1
  86. package/dist/kueezBidAdapter.js +1 -1
  87. package/dist/kueezRtbBidAdapter.js +1 -1
  88. package/dist/kulturemediaBidAdapter.js +1 -1
  89. package/dist/lassoBidAdapter.js +1 -1
  90. package/dist/lifestreetBidAdapter.js +1 -1
  91. package/dist/liveIntentIdSystem.js +1 -1
  92. package/dist/logicadBidAdapter.js +1 -1
  93. package/dist/loglyliftBidAdapter.js +1 -1
  94. package/dist/lotamePanoramaIdSystem.js +1 -1
  95. package/dist/magniteAnalyticsAdapter.js +1 -1
  96. package/dist/malltvAnalyticsAdapter.js +1 -1
  97. package/dist/marsmediaBidAdapter.js +1 -1
  98. package/dist/mediafuseBidAdapter.js +1 -1
  99. package/dist/mediasquareBidAdapter.js +1 -1
  100. package/dist/merkleIdSystem.js +1 -1
  101. package/dist/mgidBidAdapter.js +1 -1
  102. package/dist/minutemediaBidAdapter.js +1 -1
  103. package/dist/minutemediaplusBidAdapter.js +1 -1
  104. package/dist/mwOpenLinkIdSystem.js +1 -1
  105. package/dist/naveggIdSystem.js +1 -1
  106. package/dist/netIdSystem.js +1 -1
  107. package/dist/nexx360BidAdapter.js +1 -1
  108. package/dist/not-for-prod/prebid.js +176 -173
  109. package/dist/novatiqIdSystem.js +1 -1
  110. package/dist/oguryBidAdapter.js +1 -1
  111. package/dist/oneKeyIdSystem.js +1 -1
  112. package/dist/onetagBidAdapter.js +1 -1
  113. package/dist/ooloAnalyticsAdapter.js +1 -1
  114. package/dist/optidigitalBidAdapter.js +1 -1
  115. package/dist/outbrainBidAdapter.js +1 -1
  116. package/dist/ozoneBidAdapter.js +1 -1
  117. package/dist/pairIdSystem.js +1 -1
  118. package/dist/parrableIdSystem.js +1 -1
  119. package/dist/pixfutureBidAdapter.js +1 -1
  120. package/dist/prebid-core.js +1 -1
  121. package/dist/publinkIdSystem.js +1 -1
  122. package/dist/pubmaticBidAdapter.js +1 -1
  123. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  124. package/dist/pxyzBidAdapter.js +1 -1
  125. package/dist/quantcastBidAdapter.js +1 -1
  126. package/dist/quantcastIdSystem.js +1 -1
  127. package/dist/readpeakBidAdapter.js +1 -1
  128. package/dist/relaidoBidAdapter.js +1 -1
  129. package/dist/retailspotBidAdapter.js +1 -1
  130. package/dist/rhythmoneBidAdapter.js +1 -1
  131. package/dist/riseBidAdapter.js +1 -1
  132. package/dist/rubiconBidAdapter.js +1 -1
  133. package/dist/seedingAllianceBidAdapter.js +1 -1
  134. package/dist/seedtagBidAdapter.js +1 -1
  135. package/dist/sharedIdSystem.js +1 -1
  136. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  137. package/dist/sharethroughBidAdapter.js +1 -1
  138. package/dist/shinezBidAdapter.js +1 -1
  139. package/dist/silverpushBidAdapter.js +1 -1
  140. package/dist/smaatoBidAdapter.js +1 -1
  141. package/dist/smartadserverBidAdapter.js +1 -1
  142. package/dist/smartxBidAdapter.js +1 -1
  143. package/dist/smilewantedBidAdapter.js +1 -1
  144. package/dist/sonobiBidAdapter.js +1 -1
  145. package/dist/sovrnAnalyticsAdapter.js +1 -1
  146. package/dist/sovrnBidAdapter.js +1 -1
  147. package/dist/ssmasBidAdapter.js +1 -0
  148. package/dist/sspBCBidAdapter.js +1 -1
  149. package/dist/stvBidAdapter.js +1 -1
  150. package/dist/sublimeBidAdapter.js +1 -1
  151. package/dist/tapadIdSystem.js +1 -1
  152. package/dist/targetVideoBidAdapter.js +1 -1
  153. package/dist/teadsBidAdapter.js +1 -1
  154. package/dist/tncIdSystem.js +1 -1
  155. package/dist/trionBidAdapter.js +1 -1
  156. package/dist/tripleliftBidAdapter.js +1 -1
  157. package/dist/ttdBidAdapter.js +1 -1
  158. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  159. package/dist/uid2IdSystem.js +1 -1
  160. package/dist/underdogmediaBidAdapter.js +1 -1
  161. package/dist/undertoneBidAdapter.js +1 -1
  162. package/dist/unifiedIdSystem.js +1 -1
  163. package/dist/userId.js +1 -1
  164. package/dist/utiqSystem.js +1 -1
  165. package/dist/verizonMediaIdSystem.js +1 -1
  166. package/dist/vidazooBidAdapter.js +1 -1
  167. package/dist/videobyteBidAdapter.js +1 -1
  168. package/dist/visxBidAdapter.js +1 -1
  169. package/dist/vrtcalBidAdapter.js +1 -1
  170. package/dist/vuukleBidAdapter.js +1 -1
  171. package/dist/widespaceBidAdapter.js +1 -1
  172. package/dist/winrBidAdapter.js +1 -1
  173. package/dist/yahoosspBidAdapter.js +1 -1
  174. package/dist/yieldmoBidAdapter.js +1 -1
  175. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  176. package/dist/zeotapIdPlusIdSystem.js +1 -1
  177. package/integrationExamples/gpt/adUnitFloors.html +0 -1
  178. package/modules/.submodules.json +1 -0
  179. package/modules/33acrossIdSystem.js +9 -0
  180. package/modules/a1MediaRtdProvider.js +92 -0
  181. package/modules/a1MediaRtdProvider.md +46 -0
  182. package/modules/adfBidAdapter.js +4 -1
  183. package/modules/adkernelAdnBidAdapter.js +1 -1
  184. package/modules/adkernelBidAdapter.js +10 -3
  185. package/modules/admixerIdSystem.js +6 -0
  186. package/modules/adnuntiusBidAdapter.js +5 -13
  187. package/modules/adqueryIdSystem.js +6 -0
  188. package/modules/adtelligentIdSystem.js +6 -0
  189. package/modules/adyoulikeBidAdapter.js +6 -3
  190. package/modules/amxIdSystem.js +6 -0
  191. package/modules/beachfrontBidAdapter.js +32 -6
  192. package/modules/britepoolIdSystem.js +6 -0
  193. package/modules/connectIdSystem.js +6 -0
  194. package/modules/consentManagementGpp.js +10 -1
  195. package/modules/consumableBidAdapter.js +9 -1
  196. package/modules/criteoIdSystem.js +6 -0
  197. package/modules/czechAdIdSystem.js +6 -0
  198. package/modules/dacIdSystem.js +6 -0
  199. package/modules/deepintentDpesIdSystem.js +7 -2
  200. package/modules/dmdIdSystem.js +6 -0
  201. package/modules/euidIdSystem.js +9 -0
  202. package/modules/fabrickIdSystem.js +6 -0
  203. package/modules/ftrackIdSystem.js +16 -0
  204. package/modules/geolocationRtdProvider.js +65 -0
  205. package/modules/gravitoIdSystem.js +6 -0
  206. package/modules/greenbidsRtdProvider.js +1 -1
  207. package/modules/growthCodeIdSystem.js +20 -1
  208. package/modules/hadronIdSystem.js +6 -0
  209. package/modules/id5IdSystem.js +34 -8
  210. package/modules/identityLinkIdSystem.js +6 -0
  211. package/modules/idxIdSystem.js +6 -0
  212. package/modules/imdsBidAdapter.js +38 -14
  213. package/modules/imuIdSystem.js +10 -0
  214. package/modules/intentIqIdSystem.js +6 -0
  215. package/modules/invibesBidAdapter.js +5 -5
  216. package/modules/ixBidAdapter.js +16 -0
  217. package/modules/justIdSystem.js +6 -0
  218. package/modules/kinessoIdSystem.js +7 -2
  219. package/modules/liveIntentIdSystem.js +53 -0
  220. package/modules/lotamePanoramaIdSystem.js +6 -0
  221. package/modules/merkleIdSystem.js +24 -0
  222. package/modules/mwOpenLinkIdSystem.js +6 -0
  223. package/modules/naveggIdSystem.js +6 -0
  224. package/modules/netIdSystem.js +6 -0
  225. package/modules/novatiqIdSystem.js +12 -0
  226. package/modules/oneKeyIdSystem.js +26 -0
  227. package/modules/ozoneBidAdapter.js +65 -18
  228. package/modules/ozoneBidAdapter.md +3 -1
  229. package/modules/pairIdSystem.js +6 -0
  230. package/modules/parrableIdSystem.js +38 -2
  231. package/modules/publinkIdSystem.js +7 -1
  232. package/modules/quantcastIdSystem.js +6 -0
  233. package/modules/rubiconBidAdapter.js +9 -0
  234. package/modules/sharedIdSystem.js +6 -0
  235. package/modules/silverpushBidAdapter.js +2 -2
  236. package/modules/ssmasBidAdapter.js +126 -0
  237. package/modules/ssmasBidAdapter.md +35 -0
  238. package/modules/sspBCBidAdapter.js +36 -13
  239. package/modules/tapadIdSystem.js +6 -0
  240. package/modules/tncIdSystem.js +6 -0
  241. package/modules/tripleliftBidAdapter.js +5 -0
  242. package/modules/uid2IdSystem.js +14 -0
  243. package/modules/unifiedIdSystem.js +11 -0
  244. package/modules/userId/eids.js +6 -445
  245. package/modules/userId/index.js +36 -24
  246. package/modules/utiqSystem.js +9 -0
  247. package/modules/verizonMediaIdSystem.js +6 -0
  248. package/modules/vrtcalBidAdapter.js +10 -6
  249. package/modules/zeotapIdPlusIdSystem.js +6 -0
  250. package/package.json +1 -1
  251. package/src/adapters/bidderFactory.js +15 -6
  252. package/src/adloader.js +2 -1
  253. package/test/spec/modules/a1MediaRtdProvider_spec.js +105 -0
  254. package/test/spec/modules/adfBidAdapter_spec.js +47 -0
  255. package/test/spec/modules/adkernelAdnBidAdapter_spec.js +1 -2
  256. package/test/spec/modules/adkernelBidAdapter_spec.js +7 -2
  257. package/test/spec/modules/adnuntiusBidAdapter_spec.js +116 -64
  258. package/test/spec/modules/adyoulikeBidAdapter_spec.js +13 -24
  259. package/test/spec/modules/beachfrontBidAdapter_spec.js +35 -2
  260. package/test/spec/modules/consentManagementGpp_spec.js +16 -0
  261. package/test/spec/modules/consumableBidAdapter_spec.js +15 -0
  262. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -5
  263. package/test/spec/modules/geolocationRtdProvider_spec.js +119 -0
  264. package/test/spec/modules/greenbidsRtdProvider_spec.js +1 -1
  265. package/test/spec/modules/id5IdSystem_spec.js +18 -0
  266. package/test/spec/modules/imdsBidAdapter_spec.js +98 -17
  267. package/test/spec/modules/invibesBidAdapter_spec.js +123 -32
  268. package/test/spec/modules/ixBidAdapter_spec.js +23 -5
  269. package/test/spec/modules/medianetBidAdapter_spec.js +117 -0
  270. package/test/spec/modules/outbrainBidAdapter_spec.js +3 -5
  271. package/test/spec/modules/ozoneBidAdapter_spec.js +27 -1
  272. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -20
  273. package/test/spec/modules/priceFloors_spec.js +14 -0
  274. package/test/spec/modules/pubmaticBidAdapter_spec.js +6 -373
  275. package/test/spec/modules/rubiconBidAdapter_spec.js +220 -9
  276. package/test/spec/modules/smaatoBidAdapter_spec.js +4 -6
  277. package/test/spec/modules/ssmasBidAdapter_spec.js +244 -0
  278. package/test/spec/modules/sspBCBidAdapter_spec.js +18 -19
  279. package/test/spec/modules/tripleliftBidAdapter_spec.js +40 -0
  280. package/test/spec/modules/userId_spec.js +116 -7
  281. package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -4
  282. package/test/spec/modules/xeBidAdapter_spec.js +366 -368
  283. package/test/spec/modules/yahoosspBidAdapter_spec.js +5 -18
  284. package/test/spec/unit/core/bidderFactory_spec.js +61 -14
  285. package/integrationExamples/gpt/pbjs_video_adUnit.html +0 -109
@@ -270,7 +270,81 @@ describe('the rubicon adapter', function () {
270
270
  }],
271
271
  criteoId: '1111',
272
272
  };
273
- bid.userIdAsEids = createEidsArray(bid.userId);
273
+ bid.userIdAsEids = [
274
+ {
275
+ 'source': 'liveintent.com',
276
+ 'uids': [
277
+ {
278
+ 'id': '0000-1111-2222-3333',
279
+ 'atype': 3
280
+ }
281
+ ],
282
+ 'ext': {
283
+ 'segments': [
284
+ 'segA',
285
+ 'segB'
286
+ ]
287
+ }
288
+ },
289
+ {
290
+ 'source': 'liveramp.com',
291
+ 'uids': [
292
+ {
293
+ 'id': '1111-2222-3333-4444',
294
+ 'atype': 3
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ 'source': 'adserver.org',
300
+ 'uids': [
301
+ {
302
+ 'id': '3000',
303
+ 'atype': 1,
304
+ 'ext': {
305
+ 'rtiPartner': 'TDID'
306
+ }
307
+ }
308
+ ]
309
+ },
310
+ {
311
+ 'source': 'pubcid.org',
312
+ 'uids': [
313
+ {
314
+ 'id': '4000',
315
+ 'atype': 1
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ 'source': 'example.com',
321
+ 'uids': [
322
+ {
323
+ 'id': '333333',
324
+ 'ext': {
325
+ 'stype': 'ppuid'
326
+ }
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ 'source': 'id-partner.com',
332
+ 'uids': [
333
+ {
334
+ 'id': '4444444'
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ 'source': 'criteo.com',
340
+ 'uids': [
341
+ {
342
+ 'id': '1111',
343
+ 'atype': 1
344
+ }
345
+ ]
346
+ }
347
+ ];
274
348
  return bidderRequest;
275
349
  }
276
350
 
@@ -1224,7 +1298,20 @@ describe('the rubicon adapter', function () {
1224
1298
  clonedBid.userId = {
1225
1299
  tdid: 'abcd-efgh-ijkl-mnop-1234'
1226
1300
  };
1227
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1301
+ clonedBid.userIdAsEids = [
1302
+ {
1303
+ 'source': 'adserver.org',
1304
+ 'uids': [
1305
+ {
1306
+ 'id': 'abcd-efgh-ijkl-mnop-1234',
1307
+ 'atype': 1,
1308
+ 'ext': {
1309
+ 'rtiPartner': 'TDID'
1310
+ }
1311
+ }
1312
+ ]
1313
+ }
1314
+ ];
1228
1315
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1229
1316
  let data = parseQuery(request.data);
1230
1317
 
@@ -1241,7 +1328,23 @@ describe('the rubicon adapter', function () {
1241
1328
  segments: ['segA', 'segB']
1242
1329
  }
1243
1330
  };
1244
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1331
+ clonedBid.userIdAsEids = [
1332
+ {
1333
+ 'source': 'liveintent.com',
1334
+ 'uids': [
1335
+ {
1336
+ 'id': '0000-1111-2222-3333',
1337
+ 'atype': 3
1338
+ }
1339
+ ],
1340
+ 'ext': {
1341
+ 'segments': [
1342
+ 'segA',
1343
+ 'segB'
1344
+ ]
1345
+ }
1346
+ }
1347
+ ];
1245
1348
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1246
1349
  let data = parseQuery(request.data);
1247
1350
 
@@ -1258,7 +1361,23 @@ describe('the rubicon adapter', function () {
1258
1361
  segments: ['segD', 'segE']
1259
1362
  }
1260
1363
  };
1261
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1364
+ clonedBid.userIdAsEids = [
1365
+ {
1366
+ 'source': 'liveintent.com',
1367
+ 'uids': [
1368
+ {
1369
+ 'id': '1111-2222-3333-4444',
1370
+ 'atype': 3
1371
+ }
1372
+ ],
1373
+ 'ext': {
1374
+ 'segments': [
1375
+ 'segD',
1376
+ 'segE'
1377
+ ]
1378
+ }
1379
+ }
1380
+ ]
1262
1381
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1263
1382
  const unescapedData = unescape(request.data);
1264
1383
 
@@ -1273,7 +1392,17 @@ describe('the rubicon adapter', function () {
1273
1392
  clonedBid.userId = {
1274
1393
  idl_env: '1111-2222-3333-4444'
1275
1394
  };
1276
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1395
+ clonedBid.userIdAsEids = [
1396
+ {
1397
+ 'source': 'liveramp.com',
1398
+ 'uids': [
1399
+ {
1400
+ 'id': '1111-2222-3333-4444',
1401
+ 'atype': 3
1402
+ }
1403
+ ]
1404
+ }
1405
+ ]
1277
1406
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1278
1407
  let data = parseQuery(request.data);
1279
1408
 
@@ -1287,7 +1416,17 @@ describe('the rubicon adapter', function () {
1287
1416
  clonedBid.userId = {
1288
1417
  pubcid: '1111'
1289
1418
  };
1290
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1419
+ clonedBid.userIdAsEids = [
1420
+ {
1421
+ 'source': 'pubcid.org',
1422
+ 'uids': [
1423
+ {
1424
+ 'id': '1111',
1425
+ 'atype': 1
1426
+ }
1427
+ ]
1428
+ }
1429
+ ]
1291
1430
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1292
1431
  let data = parseQuery(request.data);
1293
1432
 
@@ -1301,7 +1440,17 @@ describe('the rubicon adapter', function () {
1301
1440
  clonedBid.userId = {
1302
1441
  criteoId: '1111'
1303
1442
  };
1304
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1443
+ clonedBid.userIdAsEids = [
1444
+ {
1445
+ 'source': 'criteo.com',
1446
+ 'uids': [
1447
+ {
1448
+ 'id': '1111',
1449
+ 'atype': 1
1450
+ }
1451
+ ]
1452
+ }
1453
+ ]
1305
1454
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1306
1455
  let data = parseQuery(request.data);
1307
1456
 
@@ -1328,7 +1477,27 @@ describe('the rubicon adapter', function () {
1328
1477
  }]
1329
1478
  }]
1330
1479
  };
1331
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1480
+ clonedBid.userIdAsEids = [
1481
+ {
1482
+ 'source': 'example.com',
1483
+ 'uids': [
1484
+ {
1485
+ 'id': '11111',
1486
+ 'ext': {
1487
+ 'stype': 'ppuid'
1488
+ }
1489
+ }
1490
+ ]
1491
+ },
1492
+ {
1493
+ 'source': 'id-partner.com',
1494
+ 'uids': [
1495
+ {
1496
+ 'id': '222222'
1497
+ }
1498
+ ]
1499
+ }
1500
+ ];
1332
1501
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1333
1502
  let data = parseQuery(request.data);
1334
1503
 
@@ -1347,7 +1516,20 @@ describe('the rubicon adapter', function () {
1347
1516
  }
1348
1517
  }
1349
1518
  };
1350
- clonedBid.userIdAsEids = createEidsArray(clonedBid.userId);
1519
+ clonedBid.userIdAsEids = [
1520
+ {
1521
+ 'source': 'id5-sync.com',
1522
+ 'uids': [
1523
+ {
1524
+ 'id': '11111',
1525
+ 'atype': 1,
1526
+ 'ext': {
1527
+ 'linkType': '22222'
1528
+ }
1529
+ }
1530
+ ]
1531
+ }
1532
+ ];
1351
1533
  let [request] = spec.buildRequests([clonedBid], bidderRequest);
1352
1534
  let data = parseQuery(request.data);
1353
1535
 
@@ -2481,6 +2663,35 @@ describe('the rubicon adapter', function () {
2481
2663
  expect(pbsRequest.data.imp).to.have.nested.property('[0].native');
2482
2664
  expect(fastlanteRequest.url).to.equal('https://fastlane.rubiconproject.com/a/api/fastlane.json');
2483
2665
  });
2666
+
2667
+ it('should include multiformat data in the pbs request', () => {
2668
+ const bidReq = addNativeToBidRequest(bidderRequest);
2669
+ // add second mediaType
2670
+ bidReq.bids[0].mediaTypes = {
2671
+ ...bidReq.bids[0].mediaTypes,
2672
+ banner: {
2673
+ sizes: [[300, 250]]
2674
+ }
2675
+ };
2676
+ bidReq.bids[0].params.bidonmultiformat = true;
2677
+ let [pbsRequest, fastlanteRequest] = spec.buildRequests(bidReq.bids, bidReq);
2678
+ expect(pbsRequest.data.imp[0].ext.prebid.bidder.rubicon.formats).to.deep.equal(['native', 'banner']);
2679
+ });
2680
+
2681
+ it('should include multiformat data in the fastlane request', () => {
2682
+ const bidReq = addNativeToBidRequest(bidderRequest);
2683
+ // add second mediaType
2684
+ bidReq.bids[0].mediaTypes = {
2685
+ ...bidReq.bids[0].mediaTypes,
2686
+ banner: {
2687
+ sizes: [[300, 250]]
2688
+ }
2689
+ };
2690
+ bidReq.bids[0].params.bidonmultiformat = true;
2691
+ let [pbsRequest, fastlanteRequest] = spec.buildRequests(bidReq.bids, bidReq);
2692
+ let formatsIncluded = fastlanteRequest.data.indexOf('formats=native%2Cbanner') !== -1;
2693
+ expect(formatsIncluded).to.equal(true);
2694
+ });
2484
2695
  });
2485
2696
  describe('with bidonmultiformat === false', () => {
2486
2697
  it('should send only banner request because there\'s no params.video', () => {
@@ -1095,17 +1095,15 @@ describe('smaatoBidAdapterTest', () => {
1095
1095
  criteoId: '123456',
1096
1096
  tdid: '89145'
1097
1097
  },
1098
- userIdAsEids: createEidsArray({
1099
- criteoId: '123456',
1100
- tdid: '89145'
1101
- })
1098
+ userIdAsEids: [
1099
+ {id: 1}, {id: 2}
1100
+ ]
1102
1101
  };
1103
1102
 
1104
1103
  const reqs = spec.buildRequests([userIdBidRequest], defaultBidderRequest);
1105
1104
 
1106
1105
  const req = extractPayloadOfFirstAndOnlyRequest(reqs);
1107
- expect(req.user.ext.eids).to.exist;
1108
- expect(req.user.ext.eids).to.have.length(2);
1106
+ expect(req.user.ext.eids).to.eql(userIdBidRequest.userIdAsEids);
1109
1107
  });
1110
1108
  });
1111
1109
 
@@ -0,0 +1,244 @@
1
+ import { expect } from 'chai';
2
+ import { spec, SSMAS_CODE, SSMAS_ENDPOINT, SSMAS_REQUEST_METHOD } from 'modules/ssmasBidAdapter.js';
3
+ import {newBidder} from 'src/adapters/bidderFactory.js';
4
+ import * as utils from 'src/utils.js';
5
+
6
+ describe('ssmasBidAdapter', function () {
7
+ const bid = {
8
+ bidder: SSMAS_CODE,
9
+ adUnitCode: 'adunit-code',
10
+ sizes: [[300, 250]],
11
+ bidId: '30b31c1838de1e',
12
+ bidderRequestId: '22edbae2733bf6',
13
+ auctionId: '1d1a030790a475',
14
+ params: {
15
+ placementId: '1'
16
+ }
17
+ };
18
+
19
+ const bidderRequest = {
20
+ 'bidderCode': SSMAS_CODE,
21
+ 'auctionId': 'd912faa2-174f-4636-b755-7396a0a964d8',
22
+ 'bidderRequestId': '109db5a5f5c6788',
23
+ 'bids': [
24
+ bid
25
+ ],
26
+ 'auctionStart': 1684799653734,
27
+ 'timeout': 20000,
28
+ 'metrics': {},
29
+ 'ortb2': {
30
+ 'site': {
31
+ 'domain': 'localhost:9999',
32
+ 'publisher': {
33
+ 'domain': 'localhost:9999'
34
+ },
35
+ 'page': 'http://localhost:9999/integrationExamples/noadserver/basic_noadserver.html',
36
+ 'ref': 'http://localhost:9999/integrationExamples/noadserver/'
37
+ },
38
+ 'device': {
39
+ 'w': 1536,
40
+ 'h': 711,
41
+ 'dnt': 0,
42
+ 'ua': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0',
43
+ 'language': 'es'
44
+ }
45
+ },
46
+ 'start': 1684799653737
47
+ };
48
+
49
+ describe('Build Requests', () => {
50
+ it('Check bid request', function () {
51
+ const request = spec.buildRequests([bid], bidderRequest);
52
+ expect(request[0].method).to.equal(SSMAS_REQUEST_METHOD);
53
+ expect(request[0].url).to.equal(SSMAS_ENDPOINT);
54
+ });
55
+ });
56
+
57
+ describe('register adapter functions', () => {
58
+ const adapter = newBidder(spec);
59
+ it('is registered', () => {
60
+ expect(adapter.callBids).to.exist.and.to.be.a('function');
61
+ });
62
+ });
63
+
64
+ describe('isBidRequestValid', function () {
65
+ it('validate bid request building', function () {
66
+ expect(spec.isBidRequestValid(bid)).to.be.true;
67
+ });
68
+
69
+ it('test bad bid request', function () {
70
+ // empty bid
71
+ expect(spec.isBidRequestValid({bidId: '', params: {}})).to.be.false;
72
+
73
+ // empty bidId
74
+ bid.bidId = '';
75
+ expect(spec.isBidRequestValid(bid)).to.be.false;
76
+
77
+ // empty placementId
78
+ bid.bidId = '1231';
79
+ bid.params.placementId = '';
80
+ expect(spec.isBidRequestValid(bid)).to.be.false;
81
+ });
82
+
83
+ it('check bid request bidder is Sem Seo & Mas', function() {
84
+ const invalidBid = {
85
+ ...bid, bidder: 'invalidBidder'
86
+ };
87
+ expect(spec.isBidRequestValid(invalidBid)).to.be.false;
88
+ });
89
+ });
90
+
91
+ describe('interpretResponse', function () {
92
+ let bidOrtbResponse = {
93
+ 'id': 'aa02e2fe-56d9-4713-88f9-d8672ceae8ab',
94
+ 'seatbid': [
95
+ {
96
+ 'bid': [
97
+ {
98
+ 'id': '0001',
99
+ 'impid': '3919400af0b73e8',
100
+ 'price': 7.01,
101
+ 'adid': null,
102
+ 'nurl': null,
103
+ 'adm': '<a href=\"https://ssmas.com/es\" target=\"blank\"><img src=\"https://source.unsplash.com/featured/300x202\"/></a><style>body{overflow:hidden;}</style>',
104
+ 'adomain': [
105
+ 'ssmas.com'
106
+ ],
107
+ 'iurl': null,
108
+ 'cid': null,
109
+ 'crid': '3547894',
110
+ 'attr': [],
111
+ 'api': 0,
112
+ 'protocol': 0,
113
+ 'dealid': null,
114
+ 'h': 600,
115
+ 'w': 300,
116
+ 'cat': null,
117
+ 'ext': null,
118
+ 'builder': {
119
+ 'id': '0001',
120
+ 'adid': null,
121
+ 'impid': '3919400af0b73e8',
122
+ 'adomainList': [
123
+ 'ssmas.com'
124
+ ],
125
+ 'attrList': []
126
+ },
127
+ 'adomainList': [
128
+ 'ssmas.com'
129
+ ],
130
+ 'attrList': []
131
+ }
132
+ ],
133
+ 'seat': null,
134
+ 'group': 0
135
+ }
136
+ ],
137
+ 'bidid': '408731cc-c018-4976-bfc6-89f9c61e97a0',
138
+ 'cur': 'EUR',
139
+ 'nbr': -1
140
+ };
141
+ let bidResponse = {
142
+ 'mediaType': 'banner',
143
+ 'ad': '<a href=\"https://ssmas.com/es\" target=\"blank\"><img src=\"https://source.unsplash.com/featured/300x202\"/></a><style>body{overflow:hidden;}</style>',
144
+ 'requestId': '37c658fe8ba57b',
145
+ 'seatBidId': '0001',
146
+ 'cpm': 10,
147
+ 'currency': 'EUR',
148
+ 'width': 300,
149
+ 'height': 250,
150
+ 'dealId': null,
151
+ 'creative_id': '3547894',
152
+ 'creativeId': '3547894',
153
+ 'ttl': 30,
154
+ 'netRevenue': true,
155
+ 'meta': {
156
+ 'advertiserDomains': [
157
+ 'ssmas.com'
158
+ ]
159
+ }
160
+ };
161
+ let bidRequest = {
162
+ 'imp': [
163
+ {
164
+ 'ext': {
165
+ 'tid': '937db9c3-c22d-4454-b786-fcad76a349e5',
166
+ 'data': {
167
+ 'pbadslot': 'test-div'
168
+ }
169
+ },
170
+ 'id': '3919400af0b73e8',
171
+ 'banner': {
172
+ 'topframe': 1,
173
+ 'format': [
174
+ {
175
+ 'w': 300,
176
+ 'h': 600
177
+ }
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ 'ext': {
183
+ 'tid': '0c0d3d1b-0ad0-4786-896d-24c15fc6531d',
184
+ 'data': {
185
+ 'pbadslot': 'test-div2'
186
+ }
187
+ },
188
+ 'id': '3919400af0b73e8',
189
+ 'banner': {
190
+ 'topframe': 1,
191
+ 'format': [
192
+ {
193
+ 'w': 300,
194
+ 'h': 600
195
+ }
196
+ ]
197
+ }
198
+ }
199
+ ],
200
+ 'site': {
201
+ 'domain': 'localhost:9999',
202
+ 'publisher': {
203
+ 'domain': 'localhost:9999'
204
+ },
205
+ 'page': 'http://localhost:9999/integrationExamples/noadserver/basic_noadserver.html',
206
+ 'ref': 'http://localhost:9999/integrationExamples/noadserver/',
207
+ 'id': 1,
208
+ 'ext': {
209
+ 'placementId': 13144370
210
+ }
211
+ },
212
+ 'device': {
213
+ 'w': 1536,
214
+ 'h': 711,
215
+ 'dnt': 0,
216
+ 'ua': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0',
217
+ 'language': 'es'
218
+ },
219
+ 'id': '8cc2f4b0-084d-4f40-acfa-5bec2023b1ab',
220
+ 'test': 0,
221
+ 'tmax': 20000,
222
+ 'source': {
223
+ 'tid': '8cc2f4b0-084d-4f40-acfa-5bec2023b1ab'
224
+ }
225
+ }
226
+ });
227
+
228
+ describe('test onBidWon function', function () {
229
+ beforeEach(function() {
230
+ sinon.stub(utils, 'triggerPixel');
231
+ });
232
+ afterEach(function() {
233
+ utils.triggerPixel.restore();
234
+ });
235
+ it('exists and is a function', () => {
236
+ expect(spec.onBidWon).to.exist.and.to.be.a('function');
237
+ });
238
+ it('should return nothing', function () {
239
+ var response = spec.onBidWon({});
240
+ expect(response).to.be.an('undefined')
241
+ expect(utils.triggerPixel.called).to.equal(false);
242
+ });
243
+ });
244
+ });