prebid.js 9.26.0 → 9.28.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 (305) hide show
  1. package/creative/renderers/native/renderer.js +29 -8
  2. package/dist/33acrossAnalyticsAdapter.js +1 -1
  3. package/dist/33acrossBidAdapter.js +1 -1
  4. package/dist/33acrossIdSystem.js +1 -1
  5. package/dist/BTBidAdapter.js +1 -1
  6. package/dist/acuityadsBidAdapter.js +1 -1
  7. package/dist/adagioAnalyticsAdapter.js +1 -1
  8. package/dist/adagioBidAdapter.js +1 -1
  9. package/dist/adagioRtdProvider.js +1 -1
  10. package/dist/adagioUtils.js +1 -1
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adgenerationBidAdapter.js +1 -1
  13. package/dist/adlooxAdServerVideo.js +1 -1
  14. package/dist/adlooxAnalyticsAdapter.js +1 -1
  15. package/dist/adlooxRtdProvider.js +1 -1
  16. package/dist/adqueryBidAdapter.js +1 -1
  17. package/dist/adrelevantisBidAdapter.js +1 -1
  18. package/dist/adstirBidAdapter.js +1 -1
  19. package/dist/adtrgtmeBidAdapter.js +1 -1
  20. package/dist/adxcgAnalyticsAdapter.js +1 -1
  21. package/dist/adxcgBidAdapter.js +1 -1
  22. package/dist/adyoulikeBidAdapter.js +1 -1
  23. package/dist/agmaAnalyticsAdapter.js +1 -1
  24. package/dist/ajaBidAdapter.js +1 -1
  25. package/dist/akamaiDapRtdProvider.js +1 -1
  26. package/dist/amxBidAdapter.js +1 -1
  27. package/dist/amxIdSystem.js +1 -1
  28. package/dist/aniviewBidAdapter.js +1 -1
  29. package/dist/appierAnalyticsAdapter.js +1 -1
  30. package/dist/appnexusBidAdapter.js +1 -1
  31. package/dist/asoBidAdapter.js +1 -1
  32. package/dist/axonixBidAdapter.js +1 -1
  33. package/dist/bidglassBidAdapter.js +1 -1
  34. package/dist/big-richmediaBidAdapter.js +1 -1
  35. package/dist/bitmediaBidAdapter.js +1 -1
  36. package/dist/blueBidAdapter.js +1 -0
  37. package/dist/bridBidAdapter.js +1 -1
  38. package/dist/bridgeuppBidAdapter.js +1 -1
  39. package/dist/bridgewellBidAdapter.js +1 -1
  40. package/dist/brightMountainMediaBidAdapter.js +1 -1
  41. package/dist/carodaBidAdapter.js +1 -1
  42. package/dist/chtnwBidAdapter.js +1 -1
  43. package/dist/chunk-core.js +1 -1
  44. package/dist/conceptxBidAdapter.js +1 -1
  45. package/dist/concertBidAdapter.js +1 -1
  46. package/dist/connectadBidAdapter.js +1 -1
  47. package/dist/consumableBidAdapter.js +1 -1
  48. package/dist/contxtfulBidAdapter.js +1 -1
  49. package/dist/contxtfulRtdProvider.js +1 -1
  50. package/dist/conversantAnalyticsAdapter.js +1 -1
  51. package/dist/conversantBidAdapter.js +1 -1
  52. package/dist/craftBidAdapter.js +1 -1
  53. package/dist/creative-renderer-native.js +1 -1
  54. package/dist/criteoBidAdapter.js +1 -1
  55. package/dist/cwireBidAdapter.js +1 -1
  56. package/dist/dailymotionBidAdapter.js +1 -1
  57. package/dist/dependencies.json +7 -1
  58. package/dist/dspxBidAdapter.js +1 -1
  59. package/dist/dxkultureBidAdapter.js +1 -1
  60. package/dist/eplanningBidAdapter.js +1 -1
  61. package/dist/equativBidAdapter.js +1 -1
  62. package/dist/escalaxBidAdapter.js +1 -1
  63. package/dist/eskimiBidAdapter.js +1 -1
  64. package/dist/euidIdSystem.js +1 -1
  65. package/dist/exadsBidAdapter.js +1 -1
  66. package/dist/feedadBidAdapter.js +1 -1
  67. package/dist/finativeBidAdapter.js +1 -1
  68. package/dist/freewheel-sspBidAdapter.js +1 -1
  69. package/dist/gmosspBidAdapter.js +1 -1
  70. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  71. package/dist/greenbidsBidAdapter.js +1 -1
  72. package/dist/greenbidsRtdProvider.js +1 -1
  73. package/dist/gridBidAdapter.js +1 -1
  74. package/dist/gumgumBidAdapter.js +1 -1
  75. package/dist/h12mediaBidAdapter.js +1 -1
  76. package/dist/hypelabBidAdapter.js +1 -1
  77. package/dist/id5AnalyticsAdapter.js +1 -1
  78. package/dist/id5IdSystem.js +1 -1
  79. package/dist/imdsBidAdapter.js +1 -1
  80. package/dist/improvedigitalBidAdapter.js +1 -1
  81. package/dist/inmobiBidAdapter.js +1 -1
  82. package/dist/insticatorBidAdapter.js +1 -1
  83. package/dist/intentIqAnalyticsAdapter.js +1 -1
  84. package/dist/intentIqConstants.js +1 -1
  85. package/dist/ixBidAdapter.js +1 -1
  86. package/dist/jixieBidAdapter.js +1 -1
  87. package/dist/justpremiumBidAdapter.js +1 -1
  88. package/dist/jwplayerVideoProvider.js +1 -1
  89. package/dist/kargoBidAdapter.js +1 -1
  90. package/dist/kimberliteBidAdapter.js +1 -1
  91. package/dist/konduitAnalyticsAdapter.js +1 -1
  92. package/dist/kueezBidAdapter.js +1 -1
  93. package/dist/lassoBidAdapter.js +1 -1
  94. package/dist/lifestreetBidAdapter.js +1 -1
  95. package/dist/liveIntentId.js +1 -1
  96. package/dist/liveIntentIdSystem.js +1 -1
  97. package/dist/liveIntentRtdProvider.js +1 -0
  98. package/dist/logicadBidAdapter.js +1 -1
  99. package/dist/loglyliftBidAdapter.js +1 -1
  100. package/dist/luceadBidAdapter.js +1 -1
  101. package/dist/mabidderBidAdapter.js +1 -1
  102. package/dist/madsenseBidAdapter.js +1 -1
  103. package/dist/magniteAnalyticsAdapter.js +1 -1
  104. package/dist/malltvAnalyticsAdapter.js +1 -1
  105. package/dist/marsmediaBidAdapter.js +1 -1
  106. package/dist/mediafuseBidAdapter.js +1 -1
  107. package/dist/medianetAnalyticsAdapter.js +1 -1
  108. package/dist/medianetBidAdapter.js +1 -1
  109. package/dist/mediasquareBidAdapter.js +1 -1
  110. package/dist/mgidBidAdapter.js +1 -1
  111. package/dist/minutemediaBidAdapter.js +1 -1
  112. package/dist/missenaBidAdapter.js +1 -1
  113. package/dist/mspa.js +1 -1
  114. package/dist/nativeRendering.js +1 -1
  115. package/dist/nextMillenniumBidAdapter.js +1 -1
  116. package/dist/nexx360BidAdapter.js +1 -1
  117. package/dist/nobidAnalyticsAdapter.js +1 -1
  118. package/dist/nobidBidAdapter.js +1 -1
  119. package/dist/not-for-prod/prebid.js +193 -191
  120. package/dist/oguryBidAdapter.js +1 -1
  121. package/dist/omsBidAdapter.js +1 -1
  122. package/dist/onetagBidAdapter.js +1 -1
  123. package/dist/ooloAnalyticsAdapter.js +1 -1
  124. package/dist/openwebBidAdapter.js +1 -1
  125. package/dist/openxBidAdapter.js +1 -1
  126. package/dist/optidigitalBidAdapter.js +1 -1
  127. package/dist/orbidderBidAdapter.js +1 -1
  128. package/dist/orbitsoftBidAdapter.js +1 -1
  129. package/dist/outbrainBidAdapter.js +1 -1
  130. package/dist/pixfutureBidAdapter.js +1 -1
  131. package/dist/publinkIdSystem.js +1 -1
  132. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  133. package/dist/pubmaticBidAdapter.js +1 -1
  134. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  135. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  136. package/dist/pxyzBidAdapter.js +1 -1
  137. package/dist/quantcastBidAdapter.js +1 -1
  138. package/dist/readpeakBidAdapter.js +1 -1
  139. package/dist/relaidoBidAdapter.js +1 -1
  140. package/dist/retailspotBidAdapter.js +1 -1
  141. package/dist/rhythmoneBidAdapter.js +1 -1
  142. package/dist/riseBidAdapter.js +1 -1
  143. package/dist/riseUtils.js +1 -1
  144. package/dist/rubiconBidAdapter.js +1 -1
  145. package/dist/seedingAllianceBidAdapter.js +1 -1
  146. package/dist/seedtagBidAdapter.js +1 -1
  147. package/dist/sharedIdSystem.js +1 -1
  148. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  149. package/dist/sharethroughBidAdapter.js +1 -1
  150. package/dist/shinezBidAdapter.js +1 -1
  151. package/dist/showheroes-bsBidAdapter.js +1 -1
  152. package/dist/sizeUtils.js +1 -1
  153. package/dist/smaatoBidAdapter.js +1 -1
  154. package/dist/smartadserverBidAdapter.js +1 -1
  155. package/dist/smartxBidAdapter.js +1 -1
  156. package/dist/smilewantedBidAdapter.js +1 -1
  157. package/dist/snigelBidAdapter.js +1 -1
  158. package/dist/sonobiBidAdapter.js +1 -1
  159. package/dist/sovrnBidAdapter.js +1 -1
  160. package/dist/sparteoBidAdapter.js +1 -1
  161. package/dist/sspBCBidAdapter.js +1 -1
  162. package/dist/stnBidAdapter.js +1 -1
  163. package/dist/stvBidAdapter.js +1 -1
  164. package/dist/sublimeBidAdapter.js +1 -1
  165. package/dist/symitriDapRtdProvider.js +1 -1
  166. package/dist/taboolaBidAdapter.js +1 -1
  167. package/dist/tappxBidAdapter.js +1 -1
  168. package/dist/targetVideoBidAdapter.js +1 -1
  169. package/dist/teadsBidAdapter.js +1 -1
  170. package/dist/terceptAnalyticsAdapter.js +1 -1
  171. package/dist/themoneytizerBidAdapter.js +1 -1
  172. package/dist/trionBidAdapter.js +1 -1
  173. package/dist/tripleliftBidAdapter.js +1 -1
  174. package/dist/ttdBidAdapter.js +1 -1
  175. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  176. package/dist/uid2IdSystem.js +1 -1
  177. package/dist/underdogmediaBidAdapter.js +1 -1
  178. package/dist/undertoneBidAdapter.js +1 -1
  179. package/dist/unrulyBidAdapter.js +1 -1
  180. package/dist/userId.js +1 -1
  181. package/dist/vdoaiBidAdapter.js +1 -1
  182. package/dist/vidazooUtils.js +1 -1
  183. package/dist/videobyteBidAdapter.js +1 -1
  184. package/dist/visxBidAdapter.js +1 -1
  185. package/dist/vuukleBidAdapter.js +1 -1
  186. package/dist/widespaceBidAdapter.js +1 -1
  187. package/dist/winrBidAdapter.js +1 -1
  188. package/dist/wurflRtdProvider.js +1 -1
  189. package/dist/yahooAdsBidAdapter.js +1 -1
  190. package/dist/yieldlabBidAdapter.js +1 -1
  191. package/dist/yieldmoBidAdapter.js +1 -1
  192. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  193. package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
  194. package/integrationExamples/gpt/liveIntentRtdProviderExample.html +164 -0
  195. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +3 -1
  196. package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +2 -0
  197. package/integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html +2 -0
  198. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -0
  199. package/integrationExamples/videoModule/jwplayer/eventsUI.html +2 -0
  200. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +2 -0
  201. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +3 -1
  202. package/integrationExamples/videoModule/jwplayer/playlist.html +3 -1
  203. package/libraries/creative-renderer-native/renderer.js +1 -1
  204. package/libraries/intentIqConstants/intentIqConstants.js +1 -1
  205. package/libraries/liveIntentId/shared.js +18 -5
  206. package/libraries/mspa/activityControls.js +26 -7
  207. package/libraries/riseUtils/constants.js +20 -0
  208. package/libraries/riseUtils/index.js +143 -38
  209. package/libraries/sizeUtils/sizeUtils.js +25 -0
  210. package/libraries/vidazooUtils/bidderUtils.js +2 -0
  211. package/modules/33acrossIdSystem.js +64 -23
  212. package/modules/33acrossIdSystem.md +2 -1
  213. package/modules/acuityadsBidAdapter.js +1 -1
  214. package/modules/adagioRtdProvider.js +15 -9
  215. package/modules/adlooxAnalyticsAdapter.js +12 -6
  216. package/modules/blueBidAdapter.js +122 -0
  217. package/modules/blueBidAdapter.md +28 -0
  218. package/modules/conceptxBidAdapter.js +2 -0
  219. package/modules/consumableBidAdapter.js +3 -1
  220. package/modules/contxtfulBidAdapter.js +25 -13
  221. package/modules/contxtfulRtdProvider.js +9 -12
  222. package/modules/eplanningBidAdapter.js +5 -1
  223. package/modules/equativBidAdapter.js +13 -18
  224. package/modules/escalaxBidAdapter.js +2 -2
  225. package/modules/eskimiBidAdapter.js +4 -1
  226. package/modules/improvedigitalBidAdapter.js +0 -67
  227. package/modules/intentIqAnalyticsAdapter.js +1 -1
  228. package/modules/ixBidAdapter.js +7 -1
  229. package/modules/jwplayerVideoProvider.js +99 -6
  230. package/modules/liveIntentRtdProvider.js +52 -0
  231. package/modules/liveIntentRtdProvider.md +45 -0
  232. package/modules/minutemediaBidAdapter.js +6 -80
  233. package/modules/minutemediaBidAdapter.md +1 -1
  234. package/modules/missenaBidAdapter.js +2 -0
  235. package/modules/nativeRendering.js +2 -1
  236. package/modules/omsBidAdapter.js +25 -11
  237. package/modules/omsBidAdapter.md +15 -0
  238. package/modules/openwebBidAdapter.js +6 -81
  239. package/modules/openwebBidAdapter.md +1 -1
  240. package/modules/openxBidAdapter.js +19 -6
  241. package/modules/openxBidAdapter.md +46 -1
  242. package/modules/orbitsoftBidAdapter.js +1 -1
  243. package/modules/permutiveRtdProvider.md +6 -5
  244. package/modules/pubmaticAnalyticsAdapter.js +61 -19
  245. package/modules/riseBidAdapter.js +11 -92
  246. package/modules/riseBidAdapter.md +1 -1
  247. package/modules/sharedIdSystem.js +9 -3
  248. package/modules/shinezBidAdapter.js +4 -80
  249. package/modules/shinezBidAdapter.md +2 -2
  250. package/modules/stnBidAdapter.js +7 -86
  251. package/modules/stnBidAdapter.md +1 -1
  252. package/modules/symitriDapRtdProvider.js +4 -4
  253. package/modules/symitriDapRtdProvider.md +2 -2
  254. package/modules/userId/eids.js +32 -5
  255. package/modules/wurflRtdProvider.js +7 -1
  256. package/modules/wurflRtdProvider.md +1 -1
  257. package/modules/yieldlabBidAdapter.js +2 -2
  258. package/modules/zeta_global_sspAnalyticsAdapter.js +5 -2
  259. package/package.json +2 -2
  260. package/src/adapters/bidderFactory.js +7 -6
  261. package/src/adloader.js +0 -1
  262. package/src/native.js +6 -3
  263. package/test/spec/creative/nativeRenderer_spec.js +45 -10
  264. package/test/spec/libraries/mspa/activityControls_spec.js +63 -9
  265. package/test/spec/modules/33acrossIdSystem_spec.js +288 -2
  266. package/test/spec/modules/acuityadsBidAdapter_spec.js +49 -0
  267. package/test/spec/modules/adagioRtdProvider_spec.js +119 -3
  268. package/test/spec/modules/adlooxAdServerVideo_spec.js +0 -1
  269. package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +31 -0
  270. package/test/spec/modules/blueBidAdapter_spec.js +91 -0
  271. package/test/spec/modules/consumableBidAdapter_spec.js +42 -0
  272. package/test/spec/modules/contxtfulRtdProvider_spec.js +37 -2
  273. package/test/spec/modules/eplanningBidAdapter_spec.js +74 -1
  274. package/test/spec/modules/equativBidAdapter_spec.js +5 -6
  275. package/test/spec/modules/excoBidAdapter_spec.js +33 -18
  276. package/test/spec/modules/illuminBidAdapter_spec.js +33 -18
  277. package/test/spec/modules/improvedigitalBidAdapter_spec.js +3 -3
  278. package/test/spec/modules/ixBidAdapter_spec.js +68 -2
  279. package/test/spec/modules/kueezRtbBidAdapter_spec.js +33 -18
  280. package/test/spec/modules/liveIntentExternalIdSystem_spec.js +16 -6
  281. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +16 -6
  282. package/test/spec/modules/liveIntentIdSystem_spec.js +49 -6
  283. package/test/spec/modules/liveIntentRtdProvider_spec.js +116 -0
  284. package/test/spec/modules/minutemediaBidAdapter_spec.js +126 -6
  285. package/test/spec/modules/missenaBidAdapter_spec.js +12 -3
  286. package/test/spec/modules/omsBidAdapter_spec.js +78 -0
  287. package/test/spec/modules/openwebBidAdapter_spec.js +126 -6
  288. package/test/spec/modules/openxBidAdapter_spec.js +236 -8
  289. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +29 -36
  290. package/test/spec/modules/riseBidAdapter_spec.js +126 -6
  291. package/test/spec/modules/sharedIdSystem_spec.js +25 -1
  292. package/test/spec/modules/shinezBidAdapter_spec.js +133 -9
  293. package/test/spec/modules/shinezRtbBidAdapter_spec.js +33 -18
  294. package/test/spec/modules/stnBidAdapter_spec.js +126 -5
  295. package/test/spec/modules/symitriDapRtdProvider_spec.js +36 -0
  296. package/test/spec/modules/tagorasBidAdapter_spec.js +33 -18
  297. package/test/spec/modules/twistDigitalBidAdapter_spec.js +34 -18
  298. package/test/spec/modules/userId_spec.js +103 -2
  299. package/test/spec/modules/vidazooBidAdapter_spec.js +34 -18
  300. package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +81 -0
  301. package/test/spec/modules/wurflRtdProvider_spec.js +8 -3
  302. package/test/spec/modules/yieldlabBidAdapter_spec.js +5 -5
  303. package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +3 -2
  304. package/test/spec/native_spec.js +4 -2
  305. package/test/spec/unit/core/bidderFactory_spec.js +120 -43
@@ -0,0 +1,116 @@
1
+ import {liveIntentRtdSubmodule} from 'modules/liveIntentRtdProvider.js';
2
+ import * as utils from 'src/utils.js';
3
+ import { expect } from 'chai';
4
+
5
+ describe('LiveIntent Rtd Provider', function () {
6
+ const SUBMODULE_NAME = 'liveintent';
7
+
8
+ describe('submodule `init`', function () {
9
+ const config = {
10
+ name: SUBMODULE_NAME,
11
+ };
12
+ it('init returns true when the subModuleName is defined', function () {
13
+ const value = liveIntentRtdSubmodule.init(config);
14
+ expect(value).to.equal(true);
15
+ });
16
+ })
17
+
18
+ describe('submodule `onBidRequestEvent`', function () {
19
+ const bidRequestExample = {
20
+ bidderCode: 'appnexus',
21
+ auctionId: '8dbd7cb1-7f6d-4f84-946c-d0df4837234a',
22
+ bidderRequestId: '2a038c6820142b',
23
+ bids: [
24
+ {
25
+ bidder: 'appnexus',
26
+ userId: {
27
+ lipb: {
28
+ segments: [
29
+ 'asa_1231',
30
+ 'lalo_4311',
31
+ 'liurl_99123'
32
+ ]
33
+ }
34
+ }
35
+ }
36
+ ]
37
+ }
38
+
39
+ it('exists', function () {
40
+ expect(liveIntentRtdSubmodule.onBidRequestEvent).to.be.a('function');
41
+ });
42
+
43
+ it('undefined segments field does not change the ortb2', function() {
44
+ const bidRequest = {
45
+ bidderCode: 'appnexus',
46
+ auctionId: '8dbd7cb1-7f6d-4f84-946c-d0df4837234a',
47
+ bidderRequestId: '2a038c6820142b',
48
+ bids: [
49
+ {
50
+ bidder: 'appnexus',
51
+ ortb2: {}
52
+ }
53
+ ]
54
+ }
55
+
56
+ liveIntentRtdSubmodule.onBidRequestEvent(bidRequest);
57
+ const ortb2 = bidRequest.bids[0].ortb2;
58
+ expect(ortb2).to.deep.equal({});
59
+ });
60
+
61
+ it('extracts segments and move them to the bidRequest.ortb2.user.data when the ortb2 is undefined', function() {
62
+ const bidRequest = utils.deepClone(bidRequestExample);
63
+
64
+ liveIntentRtdSubmodule.onBidRequestEvent(bidRequest);
65
+ const ortb2 = bidRequest.bids[0].ortb2;
66
+ const expectedOrtb2 = {user: {data: [{name: 'liveintent.com', segment: [{id: 'asa_1231'}, {id: 'lalo_4311'}, {id: 'liurl_99123'}]}]}}
67
+ expect(ortb2).to.deep.equal(expectedOrtb2);
68
+ });
69
+
70
+ it('extracts segments and move them to the bidRequest.ortb2.user.data when user is undefined', function() {
71
+ bidRequestExample.bids[0].ortb2 = { source: {} }
72
+ const bidRequest = utils.deepClone(bidRequestExample);
73
+
74
+ liveIntentRtdSubmodule.onBidRequestEvent(bidRequest);
75
+ const ortb2 = bidRequest.bids[0].ortb2;
76
+ const expectedOrtb2 = {source: {}, user: {data: [{name: 'liveintent.com', segment: [{id: 'asa_1231'}, {id: 'lalo_4311'}, {id: 'liurl_99123'}]}]}}
77
+ expect(ortb2).to.deep.equal(expectedOrtb2);
78
+ });
79
+
80
+ it('extracts segments and move them to the bidRequest.ortb2.user.data when data is undefined', function() {
81
+ bidRequestExample.bids[0].ortb2 = {
82
+ source: {},
83
+ user: {}
84
+ }
85
+ const bidRequest = utils.deepClone(bidRequestExample);
86
+
87
+ liveIntentRtdSubmodule.onBidRequestEvent(bidRequest);
88
+ const ortb2 = bidRequest.bids[0].ortb2;
89
+ const expectedOrtb2 = {source: {}, user: {data: [{name: 'liveintent.com', segment: [{id: 'asa_1231'}, {id: 'lalo_4311'}, {id: 'liurl_99123'}]}]}}
90
+ expect(ortb2).to.deep.equal(expectedOrtb2);
91
+ });
92
+
93
+ it('extracts segments and move them to the bidRequest.ortb2.user.data with the existing data', function() {
94
+ bidRequestExample.bids[0].ortb2 = {
95
+ source: {},
96
+ user: {
97
+ data: [
98
+ {
99
+ name: 'example.com',
100
+ segment: [
101
+ { id: 'a_1231' },
102
+ { id: 'b_4311' }
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ const bidRequest = utils.deepClone(bidRequestExample);
109
+
110
+ liveIntentRtdSubmodule.onBidRequestEvent(bidRequest);
111
+ const ortb2 = bidRequest.bids[0].ortb2;
112
+ const expectedOrtb2 = {source: {}, user: {data: [{name: 'example.com', segment: [{id: 'a_1231'}, {id: 'b_4311'}]}, {name: 'liveintent.com', segment: [{id: 'asa_1231'}, {id: 'lalo_4311'}, {id: 'liurl_99123'}]}]}}
113
+ expect(ortb2).to.deep.equal(expectedOrtb2);
114
+ });
115
+ });
116
+ });
@@ -2,8 +2,9 @@ import { expect } from 'chai';
2
2
  import { spec } from 'modules/minutemediaBidAdapter.js';
3
3
  import { newBidder } from 'src/adapters/bidderFactory.js';
4
4
  import { config } from 'src/config.js';
5
- import { BANNER, VIDEO } from '../../../src/mediaTypes.js';
5
+ import {BANNER, NATIVE, VIDEO} from '../../../src/mediaTypes.js';
6
6
  import * as utils from 'src/utils.js';
7
+ import {decorateAdUnitsWithNativeParams} from '../../../src/native';
7
8
 
8
9
  const ENDPOINT = 'https://hb.minutemedia-prebid.com/hb-mm-multi';
9
10
  const TEST_ENDPOINT = 'https://hb.minutemedia-prebid.com/hb-multi-mm-test';
@@ -63,7 +64,6 @@ describe('minutemediaAdapter', function () {
63
64
  'plcmt': 1
64
65
  }
65
66
  },
66
- 'vastXml': '"<VAST version=\\\"2.0\\\">...</VAST>"'
67
67
  },
68
68
  {
69
69
  'bidder': spec.code,
@@ -80,7 +80,59 @@ describe('minutemediaAdapter', function () {
80
80
  'banner': {
81
81
  }
82
82
  },
83
- 'ad': '"<img src=\"https://...\"/>"'
83
+ },
84
+ {
85
+ 'bidder': spec.code,
86
+ 'adUnitCode': 'adunit-code',
87
+ 'sizes': [[300, 250]],
88
+ 'params': {
89
+ 'org': 'jdye8weeyirk00000001'
90
+ },
91
+ 'bidId': '299ffc8cca0b87',
92
+ 'loop': 1,
93
+ 'bidderRequestId': '1144f487e563f9',
94
+ 'auctionId': 'bfc420c3-8577-4568-9766-a8a935fb620d',
95
+ 'mediaTypes': {
96
+ 'banner': {
97
+ 'sizes': [
98
+ [ 300, 250 ]
99
+ ]
100
+ },
101
+ 'video': {
102
+ 'playerSize': [[640, 480]],
103
+ 'context': 'instream',
104
+ 'plcmt': 1
105
+ },
106
+ 'native': {
107
+ 'ortb': {
108
+ 'assets': [
109
+ {
110
+ 'id': 1,
111
+ 'required': 1,
112
+ 'img': {
113
+ 'type': 3,
114
+ 'w': 300,
115
+ 'h': 200,
116
+ }
117
+ },
118
+ {
119
+ 'id': 2,
120
+ 'required': 1,
121
+ 'title': {
122
+ 'len': 80
123
+ }
124
+ },
125
+ {
126
+ 'id': 3,
127
+ 'required': 1,
128
+ 'data': {
129
+ 'type': 1
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ },
84
136
  }
85
137
  ];
86
138
 
@@ -151,10 +203,10 @@ describe('minutemediaAdapter', function () {
151
203
  });
152
204
 
153
205
  it('should send the correct mimes array', function () {
154
- bidRequests[1].mediaTypes.banner.mimes = mimes;
206
+ bidRequests[0].mediaTypes.video.mimes = mimes;
155
207
  const request = spec.buildRequests(bidRequests, bidderRequest);
156
- expect(request.data.bids[1].mimes).to.be.an('array');
157
- expect(request.data.bids[1].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
208
+ expect(request.data.bids[0].mimes).to.be.an('array');
209
+ expect(request.data.bids[0].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
158
210
  });
159
211
 
160
212
  it('should send the correct protocols array', function () {
@@ -170,12 +222,21 @@ describe('minutemediaAdapter', function () {
170
222
  expect(request.data.bids[0].sizes).to.equal(bidRequests[0].sizes)
171
223
  expect(request.data.bids[1].sizes).to.be.an('array');
172
224
  expect(request.data.bids[1].sizes).to.equal(bidRequests[1].sizes)
225
+ expect(request.data.bids[2].sizes).to.be.an('array');
226
+ expect(request.data.bids[2].sizes).to.eql(bidRequests[2].sizes)
227
+ });
228
+
229
+ it('should send nativeOrtbRequest in native bid request', function () {
230
+ decorateAdUnitsWithNativeParams(bidRequests)
231
+ const request = spec.buildRequests(bidRequests, bidderRequest);
232
+ assert.deepEqual(request.data.bids[2].nativeOrtbRequest, bidRequests[2].mediaTypes.native.ortb)
173
233
  });
174
234
 
175
235
  it('should send the correct media type', function () {
176
236
  const request = spec.buildRequests(bidRequests, bidderRequest);
177
237
  expect(request.data.bids[0].mediaType).to.equal(VIDEO)
178
238
  expect(request.data.bids[1].mediaType).to.equal(BANNER)
239
+ expect(request.data.bids[2].mediaType.split(',')).to.include.members([VIDEO, NATIVE, BANNER])
179
240
  });
180
241
 
181
242
  it('should respect syncEnabled option', function() {
@@ -455,6 +516,28 @@ describe('minutemediaAdapter', function () {
455
516
  nurl: 'http://example.com/win/1234',
456
517
  adomain: ['abc.com'],
457
518
  mediaType: BANNER
519
+ },
520
+ {
521
+ cpm: 12.5,
522
+ width: 300,
523
+ height: 200,
524
+ requestId: '21e12606d47ba7',
525
+ adomain: ['abc.com'],
526
+ creativeId: 'creative-id',
527
+ nurl: 'http://example.com/win/1234',
528
+ mediaType: NATIVE,
529
+ native: {
530
+ body: 'Advertise with Rise',
531
+ clickUrl: 'https://risecodes.com',
532
+ cta: 'Start now',
533
+ image: {
534
+ width: 300,
535
+ height: 200,
536
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg'
537
+ },
538
+ sponsoredBy: 'Rise',
539
+ title: 'Rise Ad Tech Solutions'
540
+ }
458
541
  }]
459
542
  };
460
543
 
@@ -494,10 +577,42 @@ describe('minutemediaAdapter', function () {
494
577
  ad: '"<img src=\"https://...\"/>"'
495
578
  };
496
579
 
580
+ const expectedNativeResponse = {
581
+ requestId: '21e12606d47ba7',
582
+ cpm: 12.5,
583
+ currency: 'USD',
584
+ width: 300,
585
+ height: 200,
586
+ ttl: TTL,
587
+ creativeId: 'creative-id',
588
+ netRevenue: true,
589
+ nurl: 'http://example.com/win/1234',
590
+ mediaType: NATIVE,
591
+ meta: {
592
+ mediaType: NATIVE,
593
+ advertiserDomains: ['abc.com']
594
+ },
595
+ native: {
596
+ ortb: {
597
+ body: 'Advertise with Rise',
598
+ clickUrl: 'https://risecodes.com',
599
+ cta: 'Start now',
600
+ image: {
601
+ width: 300,
602
+ height: 200,
603
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg',
604
+ },
605
+ sponsoredBy: 'Rise',
606
+ title: 'Rise Ad Tech Solutions'
607
+ }
608
+ },
609
+ };
610
+
497
611
  it('should get correct bid response', function () {
498
612
  const result = spec.interpretResponse({ body: response });
499
613
  expect(result[0]).to.deep.equal(expectedVideoResponse);
500
614
  expect(result[1]).to.deep.equal(expectedBannerResponse);
615
+ expect(result[2]).to.deep.equal(expectedNativeResponse);
501
616
  });
502
617
 
503
618
  it('video type should have vastXml key', function () {
@@ -509,6 +624,11 @@ describe('minutemediaAdapter', function () {
509
624
  const result = spec.interpretResponse({ body: response });
510
625
  expect(result[1].ad).to.equal(expectedBannerResponse.ad)
511
626
  });
627
+
628
+ it('native type should have native key', function () {
629
+ const result = spec.interpretResponse({ body: response });
630
+ expect(result[2].native).to.eql(expectedNativeResponse.native)
631
+ });
512
632
  })
513
633
 
514
634
  describe('getUserSyncs', function() {
@@ -23,7 +23,6 @@ describe('Missena Adapter', function () {
23
23
  const bid = {
24
24
  bidder: 'missena',
25
25
  bidId: bidId,
26
- sizes: [[1, 1]],
27
26
  mediaTypes: { banner: { sizes: [[1, 1]] } },
28
27
  ortb2: {
29
28
  device: {
@@ -55,14 +54,14 @@ describe('Missena Adapter', function () {
55
54
  const bidWithoutFloor = {
56
55
  bidder: 'missena',
57
56
  bidId: bidId,
58
- sizes: [[1, 1]],
59
- mediaTypes: { banner: { sizes: [[1, 1]] } },
57
+ mediaTypes: { banner: { sizes: [1, 1] } },
60
58
  params: {
61
59
  apiKey: API_KEY,
62
60
  placement: 'sticky',
63
61
  formats: ['sticky-banner'],
64
62
  },
65
63
  };
64
+
66
65
  const consentString = 'AAAAAAAAA==';
67
66
 
68
67
  const bidderRequest = {
@@ -178,6 +177,16 @@ describe('Missena Adapter', function () {
178
177
  expect(payload.screen.height).to.equal(screen.height);
179
178
  });
180
179
 
180
+ it('should send size', function () {
181
+ expect(payload.sizes[0].width).to.equal(1);
182
+ expect(payload.sizes[0].height).to.equal(1);
183
+ });
184
+
185
+ it('should send single size', function () {
186
+ expect(payloadNoFloor.sizes[0].width).to.equal(1);
187
+ expect(payloadNoFloor.sizes[0].height).to.equal(1);
188
+ });
189
+
181
190
  getDataFromLocalStorageStub.restore();
182
191
  getDataFromLocalStorageStub = sinon.stub(
183
192
  storage,
@@ -130,6 +130,45 @@ describe('omsBidAdapter', function () {
130
130
  expect(payload.imp[0].banner.format).to.deep.equal([{w: 300, h: 250}, {w: 300, h: 600}]);
131
131
  });
132
132
 
133
+ it('sets the proper video object when ad unit media type is video', function () {
134
+ const bidRequests = [
135
+ {
136
+ 'bidder': 'oms',
137
+ 'params': {
138
+ 'publisherId': 1234567
139
+ },
140
+ 'adUnitCode': 'adunit-code',
141
+ 'mediaTypes': {
142
+ 'video': {
143
+ 'context': 'instream',
144
+ 'playerSize': [640, 480]
145
+ }
146
+ },
147
+ 'bidId': '5fb26ac22bde4',
148
+ 'bidderRequestId': '4bf93aeb730cb9',
149
+ 'auctionId': 'ffe9a1f7-7b67-4bda-a8e0-9ee5dc9f442e',
150
+ 'schain': {
151
+ 'ver': '1.0',
152
+ 'complete': 1,
153
+ 'nodes': [
154
+ {
155
+ 'asi': 'exchange1.com',
156
+ 'sid': '1234',
157
+ 'hp': 1,
158
+ 'rid': 'bid-request-1',
159
+ 'name': 'publisher',
160
+ 'domain': 'publisher.com'
161
+ }
162
+ ]
163
+ },
164
+ }
165
+ ]
166
+ const request = spec.buildRequests(bidRequests);
167
+ const payload = JSON.parse(request.data);
168
+ expect(payload.imp[0].video.context).to.equal('instream');
169
+ expect(payload.imp[0].video.playerSize).to.deep.equal([640, 480]);
170
+ });
171
+
133
172
  it('accepts a single array as a size', function () {
134
173
  bidRequests[0].mediaTypes.banner.sizes = [300, 250];
135
174
  const request = spec.buildRequests(bidRequests);
@@ -379,6 +418,45 @@ describe('omsBidAdapter', function () {
379
418
  expect(result[0]).to.deep.equal(expectedResponse[0]);
380
419
  });
381
420
 
421
+ it('should get the correct bid response for video bids', function () {
422
+ let expectedResponse = [{
423
+ 'requestId': '283a9f4cd2415d',
424
+ 'cpm': 0.35743275,
425
+ 'width': 300,
426
+ 'height': 250,
427
+ 'creativeId': '376874781',
428
+ 'currency': 'USD',
429
+ 'netRevenue': true,
430
+ 'mediaType': 'video',
431
+ 'ad': `<!-- Creative --><div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="${encodeURI('<!-- NURL -->')}"></div>`,
432
+ 'ttl': 300,
433
+ 'meta': {
434
+ 'advertiserDomains': ['example.com']
435
+ }
436
+ }];
437
+ const response = {
438
+ body: {
439
+ 'id': '37386aade21a71',
440
+ 'seatbid': [{
441
+ 'bid': [{
442
+ 'id': '376874781',
443
+ 'impid': '283a9f4cd2415d',
444
+ 'price': 0.35743275,
445
+ 'nurl': '<!-- NURL -->',
446
+ 'adm': '<!-- Creative -->',
447
+ 'w': 300,
448
+ 'h': 250,
449
+ 'adomain': ['example.com'],
450
+ 'mtype': 2
451
+ }]
452
+ }]
453
+ }
454
+ };
455
+
456
+ let result = spec.interpretResponse(response);
457
+ expect(result[0]).to.deep.equal(expectedResponse[0]);
458
+ });
459
+
382
460
  it('crid should default to the bid id if not on the response', function () {
383
461
  let expectedResponse = [{
384
462
  'requestId': '283a9f4cd2415d',
@@ -2,8 +2,9 @@ import { expect } from 'chai';
2
2
  import { spec } from 'modules/openwebBidAdapter.js';
3
3
  import { newBidder } from 'src/adapters/bidderFactory.js';
4
4
  import { config } from 'src/config.js';
5
- import { BANNER, VIDEO } from '../../../src/mediaTypes.js';
5
+ import {BANNER, NATIVE, VIDEO} from '../../../src/mediaTypes.js';
6
6
  import * as utils from 'src/utils.js';
7
+ import {decorateAdUnitsWithNativeParams} from '../../../src/native';
7
8
 
8
9
  const ENDPOINT = 'https://hb.openwebmp.com/hb-multi';
9
10
  const TEST_ENDPOINT = 'https://hb.openwebmp.com/hb-multi-test';
@@ -74,7 +75,6 @@ describe('openwebAdapter', function () {
74
75
  'plcmt': 1
75
76
  }
76
77
  },
77
- 'vastXml': '"<VAST version=\\\"2.0\\\">...</VAST>"'
78
78
  },
79
79
  {
80
80
  'bidder': spec.code,
@@ -91,7 +91,59 @@ describe('openwebAdapter', function () {
91
91
  'banner': {
92
92
  }
93
93
  },
94
- 'ad': '"<img src=\"https://...\"/>"'
94
+ },
95
+ {
96
+ 'bidder': spec.code,
97
+ 'adUnitCode': 'adunit-code',
98
+ 'sizes': [[300, 250]],
99
+ 'params': {
100
+ 'org': 'jdye8weeyirk00000001'
101
+ },
102
+ 'bidId': '299ffc8cca0b87',
103
+ 'loop': 1,
104
+ 'bidderRequestId': '1144f487e563f9',
105
+ 'auctionId': 'bfc420c3-8577-4568-9766-a8a935fb620d',
106
+ 'mediaTypes': {
107
+ 'banner': {
108
+ 'sizes': [
109
+ [ 300, 250 ]
110
+ ]
111
+ },
112
+ 'video': {
113
+ 'playerSize': [[640, 480]],
114
+ 'context': 'instream',
115
+ 'plcmt': 1
116
+ },
117
+ 'native': {
118
+ 'ortb': {
119
+ 'assets': [
120
+ {
121
+ 'id': 1,
122
+ 'required': 1,
123
+ 'img': {
124
+ 'type': 3,
125
+ 'w': 300,
126
+ 'h': 200,
127
+ }
128
+ },
129
+ {
130
+ 'id': 2,
131
+ 'required': 1,
132
+ 'title': {
133
+ 'len': 80
134
+ }
135
+ },
136
+ {
137
+ 'id': 3,
138
+ 'required': 1,
139
+ 'data': {
140
+ 'type': 1
141
+ }
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ },
95
147
  }
96
148
  ];
97
149
 
@@ -160,10 +212,10 @@ describe('openwebAdapter', function () {
160
212
  });
161
213
 
162
214
  it('should send the correct mimes array', function () {
163
- bidRequests[1].mediaTypes.banner.mimes = mimes;
215
+ bidRequests[0].mediaTypes.video.mimes = mimes;
164
216
  const request = spec.buildRequests(bidRequests, bidderRequest);
165
- expect(request.data.bids[1].mimes).to.be.an('array');
166
- expect(request.data.bids[1].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
217
+ expect(request.data.bids[0].mimes).to.be.an('array');
218
+ expect(request.data.bids[0].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
167
219
  });
168
220
 
169
221
  it('should send the correct protocols array', function () {
@@ -179,12 +231,21 @@ describe('openwebAdapter', function () {
179
231
  expect(request.data.bids[0].sizes).to.equal(bidRequests[0].sizes)
180
232
  expect(request.data.bids[1].sizes).to.be.an('array');
181
233
  expect(request.data.bids[1].sizes).to.equal(bidRequests[1].sizes)
234
+ expect(request.data.bids[2].sizes).to.be.an('array');
235
+ expect(request.data.bids[2].sizes).to.eql(bidRequests[2].sizes)
236
+ });
237
+
238
+ it('should send nativeOrtbRequest in native bid request', function () {
239
+ decorateAdUnitsWithNativeParams(bidRequests)
240
+ const request = spec.buildRequests(bidRequests, bidderRequest);
241
+ assert.deepEqual(request.data.bids[2].nativeOrtbRequest, bidRequests[2].mediaTypes.native.ortb)
182
242
  });
183
243
 
184
244
  it('should send the correct media type', function () {
185
245
  const request = spec.buildRequests(bidRequests, bidderRequest);
186
246
  expect(request.data.bids[0].mediaType).to.equal(VIDEO)
187
247
  expect(request.data.bids[1].mediaType).to.equal(BANNER)
248
+ expect(request.data.bids[2].mediaType.split(',')).to.include.members([VIDEO, NATIVE, BANNER])
188
249
  });
189
250
 
190
251
  it('should respect syncEnabled option', function() {
@@ -464,6 +525,28 @@ describe('openwebAdapter', function () {
464
525
  nurl: 'http://example.com/win/1234',
465
526
  adomain: ['abc.com'],
466
527
  mediaType: BANNER
528
+ },
529
+ {
530
+ cpm: 12.5,
531
+ width: 300,
532
+ height: 200,
533
+ requestId: '21e12606d47ba7',
534
+ adomain: ['abc.com'],
535
+ creativeId: 'creative-id-3',
536
+ nurl: 'http://example.com/win/1234',
537
+ mediaType: NATIVE,
538
+ native: {
539
+ body: 'Advertise with Rise',
540
+ clickUrl: 'https://risecodes.com',
541
+ cta: 'Start now',
542
+ image: {
543
+ width: 300,
544
+ height: 200,
545
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg'
546
+ },
547
+ sponsoredBy: 'Rise',
548
+ title: 'Rise Ad Tech Solutions'
549
+ }
467
550
  }]
468
551
  };
469
552
 
@@ -503,10 +586,42 @@ describe('openwebAdapter', function () {
503
586
  ad: '"<img src=\"https://...\"/>"'
504
587
  };
505
588
 
589
+ const expectedNativeResponse = {
590
+ requestId: '21e12606d47ba7',
591
+ cpm: 12.5,
592
+ currency: 'USD',
593
+ width: 300,
594
+ height: 200,
595
+ ttl: TTL,
596
+ creativeId: 'creative-id-3',
597
+ netRevenue: true,
598
+ nurl: 'http://example.com/win/1234',
599
+ mediaType: NATIVE,
600
+ meta: {
601
+ mediaType: NATIVE,
602
+ advertiserDomains: ['abc.com']
603
+ },
604
+ native: {
605
+ ortb: {
606
+ body: 'Advertise with Rise',
607
+ clickUrl: 'https://risecodes.com',
608
+ cta: 'Start now',
609
+ image: {
610
+ width: 300,
611
+ height: 200,
612
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg',
613
+ },
614
+ sponsoredBy: 'Rise',
615
+ title: 'Rise Ad Tech Solutions'
616
+ }
617
+ },
618
+ };
619
+
506
620
  it('should get correct bid response', function () {
507
621
  const result = spec.interpretResponse({ body: response });
508
622
  expect(result[0]).to.deep.equal(expectedVideoResponse);
509
623
  expect(result[1]).to.deep.equal(expectedBannerResponse);
624
+ expect(result[2]).to.deep.equal(expectedNativeResponse);
510
625
  });
511
626
 
512
627
  it('video type should have vastXml key', function () {
@@ -518,6 +633,11 @@ describe('openwebAdapter', function () {
518
633
  const result = spec.interpretResponse({ body: response });
519
634
  expect(result[1].ad).to.equal(expectedBannerResponse.ad)
520
635
  });
636
+
637
+ it('native type should have native key', function () {
638
+ const result = spec.interpretResponse({ body: response });
639
+ expect(result[2].native).to.eql(expectedNativeResponse.native)
640
+ });
521
641
  })
522
642
 
523
643
  describe('getUserSyncs', function() {