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
@@ -1,10 +1,12 @@
1
1
  import {sharedIdSystemSubmodule, storage} from 'modules/sharedIdSystem.js';
2
2
  import {coppaDataHandler} from 'src/adapterManager';
3
+ import {config} from 'src/config.js';
3
4
 
4
5
  import sinon from 'sinon';
5
6
  import * as utils from 'src/utils.js';
6
7
  import {createEidsArray} from '../../../modules/userId/eids.js';
7
- import {attachIdSystem} from '../../../modules/userId/index.js';
8
+ import {attachIdSystem, init} from '../../../modules/userId/index.js';
9
+ import {getGlobal} from '../../../src/prebidGlobal.js';
8
10
 
9
11
  let expect = require('chai').expect;
10
12
 
@@ -97,6 +99,9 @@ describe('SharedId System', function () {
97
99
  before(() => {
98
100
  attachIdSystem(sharedIdSystemSubmodule);
99
101
  });
102
+ afterEach(() => {
103
+ config.resetConfig();
104
+ });
100
105
  it('pubCommonId', function() {
101
106
  const userId = {
102
107
  pubcid: 'some-random-id-value'
@@ -108,5 +113,24 @@ describe('SharedId System', function () {
108
113
  uids: [{id: 'some-random-id-value', atype: 1}]
109
114
  });
110
115
  });
116
+
117
+ it('should set inserter, if provided in config', async () => {
118
+ config.setConfig({
119
+ userSync: {
120
+ userIds: [{
121
+ name: 'sharedId',
122
+ params: {
123
+ inserter: 'mock-inserter'
124
+ },
125
+ value: {pubcid: 'mock-id'}
126
+ }]
127
+ }
128
+ });
129
+ const eids = getGlobal().getUserIdsAsEids();
130
+ sinon.assert.match(eids[0], {
131
+ source: 'pubcid.org',
132
+ inserter: 'mock-inserter'
133
+ })
134
+ })
111
135
  })
112
136
  });
@@ -2,8 +2,9 @@ import { expect } from 'chai';
2
2
  import { spec } from 'modules/shinezBidAdapter.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.sweetgum.io/hb-sz-multi';
9
10
  const TEST_ENDPOINT = 'https://hb.sweetgum.io/hb-multi-sz-test';
@@ -61,7 +62,6 @@ describe('shinezAdapter', function () {
61
62
  'context': 'instream'
62
63
  }
63
64
  },
64
- 'vastXml': '"<VAST version=\\\"2.0\\\">...</VAST>"'
65
65
  },
66
66
  {
67
67
  'bidder': spec.code,
@@ -77,7 +77,59 @@ describe('shinezAdapter', function () {
77
77
  'banner': {
78
78
  }
79
79
  },
80
- 'ad': '"<img src=\"https://...\"/>"'
80
+ },
81
+ {
82
+ 'bidder': spec.code,
83
+ 'adUnitCode': 'adunit-code',
84
+ 'sizes': [[300, 250]],
85
+ 'params': {
86
+ 'org': 'jdye8weeyirk00000001'
87
+ },
88
+ 'bidId': '299ffc8cca0b87',
89
+ 'loop': 1,
90
+ 'bidderRequestId': '1144f487e563f9',
91
+ 'auctionId': 'bfc420c3-8577-4568-9766-a8a935fb620d',
92
+ 'mediaTypes': {
93
+ 'banner': {
94
+ 'sizes': [
95
+ [ 300, 250 ]
96
+ ]
97
+ },
98
+ 'video': {
99
+ 'playerSize': [[640, 480]],
100
+ 'context': 'instream',
101
+ 'plcmt': 1
102
+ },
103
+ 'native': {
104
+ 'ortb': {
105
+ 'assets': [
106
+ {
107
+ 'id': 1,
108
+ 'required': 1,
109
+ 'img': {
110
+ 'type': 3,
111
+ 'w': 300,
112
+ 'h': 200,
113
+ }
114
+ },
115
+ {
116
+ 'id': 2,
117
+ 'required': 1,
118
+ 'title': {
119
+ 'len': 80
120
+ }
121
+ },
122
+ {
123
+ 'id': 3,
124
+ 'required': 1,
125
+ 'data': {
126
+ 'type': 1
127
+ }
128
+ }
129
+ ]
130
+ }
131
+ },
132
+ },
81
133
  }
82
134
  ];
83
135
 
@@ -130,12 +182,21 @@ describe('shinezAdapter', function () {
130
182
  expect(request.data.bids[0].sizes).to.equal(bidRequests[0].sizes)
131
183
  expect(request.data.bids[1].sizes).to.be.an('array');
132
184
  expect(request.data.bids[1].sizes).to.equal(bidRequests[1].sizes)
185
+ expect(request.data.bids[2].sizes).to.be.an('array');
186
+ expect(request.data.bids[2].sizes).to.eql(bidRequests[2].sizes)
187
+ });
188
+
189
+ it('should send nativeOrtbRequest in native bid request', function () {
190
+ decorateAdUnitsWithNativeParams(bidRequests)
191
+ const request = spec.buildRequests(bidRequests, bidderRequest);
192
+ assert.deepEqual(request.data.bids[2].nativeOrtbRequest, bidRequests[2].mediaTypes.native.ortb)
133
193
  });
134
194
 
135
195
  it('should send the correct media type', function () {
136
196
  const request = spec.buildRequests(bidRequests, bidderRequest);
137
197
  expect(request.data.bids[0].mediaType).to.equal(VIDEO)
138
198
  expect(request.data.bids[1].mediaType).to.equal(BANNER)
199
+ expect(request.data.bids[2].mediaType.split(',')).to.include.members([VIDEO, NATIVE, BANNER])
139
200
  });
140
201
 
141
202
  it('should respect syncEnabled option', function() {
@@ -305,6 +366,8 @@ describe('shinezAdapter', function () {
305
366
  height: 480,
306
367
  requestId: '21e12606d47ba7',
307
368
  adomain: ['abc.com'],
369
+ creativeId: 'creative-id',
370
+ nurl: 'http://example.com/win/1234',
308
371
  mediaType: VIDEO
309
372
  },
310
373
  {
@@ -314,7 +377,31 @@ describe('shinezAdapter', function () {
314
377
  height: 250,
315
378
  requestId: '21e12606d47ba7',
316
379
  adomain: ['abc.com'],
380
+ creativeId: 'creative-id',
381
+ nurl: 'http://example.com/win/1234',
317
382
  mediaType: BANNER
383
+ },
384
+ {
385
+ cpm: 12.5,
386
+ width: 300,
387
+ height: 200,
388
+ requestId: '21e12606d47ba7',
389
+ adomain: ['abc.com'],
390
+ creativeId: 'creative-id',
391
+ nurl: 'http://example.com/win/1234',
392
+ mediaType: NATIVE,
393
+ native: {
394
+ body: 'Advertise with Rise',
395
+ clickUrl: 'https://risecodes.com',
396
+ cta: 'Start now',
397
+ image: {
398
+ width: 300,
399
+ height: 200,
400
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg'
401
+ },
402
+ sponsoredBy: 'Rise',
403
+ title: 'Rise Ad Tech Solutions'
404
+ }
318
405
  }]
319
406
  };
320
407
 
@@ -325,7 +412,7 @@ describe('shinezAdapter', function () {
325
412
  width: 640,
326
413
  height: 480,
327
414
  ttl: TTL,
328
- creativeId: '21e12606d47ba7',
415
+ creativeId: 'creative-id',
329
416
  netRevenue: true,
330
417
  nurl: 'http://example.com/win/1234',
331
418
  mediaType: VIDEO,
@@ -340,10 +427,10 @@ describe('shinezAdapter', function () {
340
427
  requestId: '21e12606d47ba7',
341
428
  cpm: 12.5,
342
429
  currency: 'USD',
343
- width: 640,
344
- height: 480,
430
+ width: 300,
431
+ height: 250,
345
432
  ttl: TTL,
346
- creativeId: '21e12606d47ba7',
433
+ creativeId: 'creative-id',
347
434
  netRevenue: true,
348
435
  nurl: 'http://example.com/win/1234',
349
436
  mediaType: BANNER,
@@ -354,10 +441,42 @@ describe('shinezAdapter', function () {
354
441
  ad: '"<img src=\"https://...\"/>"'
355
442
  };
356
443
 
444
+ const expectedNativeResponse = {
445
+ requestId: '21e12606d47ba7',
446
+ cpm: 12.5,
447
+ currency: 'USD',
448
+ width: 300,
449
+ height: 200,
450
+ ttl: TTL,
451
+ creativeId: 'creative-id',
452
+ netRevenue: true,
453
+ nurl: 'http://example.com/win/1234',
454
+ mediaType: NATIVE,
455
+ meta: {
456
+ mediaType: NATIVE,
457
+ advertiserDomains: ['abc.com']
458
+ },
459
+ native: {
460
+ ortb: {
461
+ body: 'Advertise with Rise',
462
+ clickUrl: 'https://risecodes.com',
463
+ cta: 'Start now',
464
+ image: {
465
+ width: 300,
466
+ height: 200,
467
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg',
468
+ },
469
+ sponsoredBy: 'Rise',
470
+ title: 'Rise Ad Tech Solutions'
471
+ }
472
+ },
473
+ };
474
+
357
475
  it('should get correct bid response', function () {
358
476
  const result = spec.interpretResponse({ body: response });
359
- expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedVideoResponse));
360
- expect(Object.keys(result[1])).to.deep.equal(Object.keys(expectedBannerResponse));
477
+ expect(result[0]).to.deep.equal(expectedVideoResponse);
478
+ expect(result[1]).to.deep.equal(expectedBannerResponse);
479
+ expect(result[2]).to.deep.equal(expectedNativeResponse);
361
480
  });
362
481
 
363
482
  it('video type should have vastXml key', function () {
@@ -369,6 +488,11 @@ describe('shinezAdapter', function () {
369
488
  const result = spec.interpretResponse({ body: response });
370
489
  expect(result[1].ad).to.equal(expectedBannerResponse.ad)
371
490
  });
491
+
492
+ it('native type should have native key', function () {
493
+ const result = spec.interpretResponse({ body: response });
494
+ expect(result[2].native).to.eql(expectedNativeResponse.native)
495
+ });
372
496
  })
373
497
 
374
498
  describe('getUserSyncs', function() {
@@ -94,6 +94,36 @@ const VIDEO_BID = {
94
94
  }
95
95
  }
96
96
 
97
+ const ORTB2_DEVICE = {
98
+ sua: {
99
+ 'source': 2,
100
+ 'platform': {
101
+ 'brand': 'Android',
102
+ 'version': ['8', '0', '0']
103
+ },
104
+ 'browsers': [
105
+ {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
106
+ {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
107
+ {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
108
+ ],
109
+ 'mobile': 1,
110
+ 'model': 'SM-G955U',
111
+ 'bitness': '64',
112
+ 'architecture': ''
113
+ },
114
+ w: 980,
115
+ h: 1720,
116
+ dnt: 0,
117
+ ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1',
118
+ language: 'en',
119
+ devicetype: 1,
120
+ make: 'Apple',
121
+ model: 'iPhone 12 Pro Max',
122
+ os: 'iOS',
123
+ osv: '17.4',
124
+ ext: {fiftyonedegrees_deviceId: '17595-133085-133468-18092'},
125
+ };
126
+
97
127
  const BIDDER_REQUEST = {
98
128
  'gdprConsent': {
99
129
  'consentString': 'consent_string',
@@ -119,24 +149,7 @@ const BIDDER_REQUEST = {
119
149
  'gpp_sid': [7],
120
150
  'coppa': 0
121
151
  },
122
- 'device': {
123
- 'sua': {
124
- 'source': 2,
125
- 'platform': {
126
- 'brand': 'Android',
127
- 'version': ['8', '0', '0']
128
- },
129
- 'browsers': [
130
- {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
131
- {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
132
- {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
133
- ],
134
- 'mobile': 1,
135
- 'model': 'SM-G955U',
136
- 'bitness': '64',
137
- 'architecture': ''
138
- }
139
- }
152
+ 'device': ORTB2_DEVICE,
140
153
  }
141
154
  };
142
155
 
@@ -317,6 +330,7 @@ describe('ShinezRtbBidAdapter', function () {
317
330
  'bitness': '64',
318
331
  'architecture': ''
319
332
  },
333
+ device: ORTB2_DEVICE,
320
334
  uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
321
335
  uqs: getTopWindowQueryParams(),
322
336
  mediaTypes: {
@@ -388,6 +402,7 @@ describe('ShinezRtbBidAdapter', function () {
388
402
  'bitness': '64',
389
403
  'architecture': ''
390
404
  },
405
+ device: ORTB2_DEVICE,
391
406
  url: 'https%3A%2F%2Fwww.greatsite.com',
392
407
  referrer: 'https://www.somereferrer.com',
393
408
  cb: 1000,
@@ -2,8 +2,9 @@ import { expect } from 'chai';
2
2
  import { spec } from 'modules/stnBidAdapter.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.stngo.com/hb-multi';
9
10
  const TEST_ENDPOINT = 'https://hb.stngo.com/hb-multi-test';
@@ -63,7 +64,6 @@ describe('stnAdapter', 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,6 +80,59 @@ describe('stnAdapter', function () {
80
80
  'banner': {
81
81
  }
82
82
  },
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
+ },
83
136
  'ad': '"<img src=\"https://...\"/>"'
84
137
  }
85
138
  ];
@@ -151,10 +204,10 @@ describe('stnAdapter', function () {
151
204
  });
152
205
 
153
206
  it('should send the correct mimes array', function () {
154
- bidRequests[1].mediaTypes.banner.mimes = mimes;
207
+ bidRequests[0].mediaTypes.video.mimes = mimes;
155
208
  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']);
209
+ expect(request.data.bids[0].mimes).to.be.an('array');
210
+ expect(request.data.bids[0].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
158
211
  });
159
212
 
160
213
  it('should send the correct protocols array', function () {
@@ -170,12 +223,21 @@ describe('stnAdapter', function () {
170
223
  expect(request.data.bids[0].sizes).to.equal(bidRequests[0].sizes)
171
224
  expect(request.data.bids[1].sizes).to.be.an('array');
172
225
  expect(request.data.bids[1].sizes).to.equal(bidRequests[1].sizes)
226
+ expect(request.data.bids[2].sizes).to.be.an('array');
227
+ expect(request.data.bids[2].sizes).to.eql(bidRequests[2].sizes)
228
+ });
229
+
230
+ it('should send nativeOrtbRequest in native bid request', function () {
231
+ decorateAdUnitsWithNativeParams(bidRequests)
232
+ const request = spec.buildRequests(bidRequests, bidderRequest);
233
+ assert.deepEqual(request.data.bids[2].nativeOrtbRequest, bidRequests[2].mediaTypes.native.ortb)
173
234
  });
174
235
 
175
236
  it('should send the correct media type', function () {
176
237
  const request = spec.buildRequests(bidRequests, bidderRequest);
177
238
  expect(request.data.bids[0].mediaType).to.equal(VIDEO)
178
239
  expect(request.data.bids[1].mediaType).to.equal(BANNER)
240
+ expect(request.data.bids[2].mediaType.split(',')).to.include.members([VIDEO, NATIVE, BANNER])
179
241
  });
180
242
 
181
243
  it('should respect syncEnabled option', function() {
@@ -455,6 +517,28 @@ describe('stnAdapter', function () {
455
517
  adomain: ['abc.com'],
456
518
  mediaType: BANNER,
457
519
  nurl: 'http://example.com/win/1234',
520
+ },
521
+ {
522
+ cpm: 12.5,
523
+ width: 300,
524
+ height: 200,
525
+ requestId: '21e12606d47ba7',
526
+ adomain: ['abc.com'],
527
+ creativeId: 'creative-id-3',
528
+ nurl: 'http://example.com/win/1234',
529
+ mediaType: NATIVE,
530
+ native: {
531
+ body: 'Advertise with Rise',
532
+ clickUrl: 'https://risecodes.com',
533
+ cta: 'Start now',
534
+ image: {
535
+ width: 300,
536
+ height: 200,
537
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg'
538
+ },
539
+ sponsoredBy: 'Rise',
540
+ title: 'Rise Ad Tech Solutions'
541
+ }
458
542
  }]
459
543
  };
460
544
 
@@ -494,10 +578,42 @@ describe('stnAdapter', function () {
494
578
  ad: '"<img src=\"https://...\"/>"'
495
579
  };
496
580
 
581
+ const expectedNativeResponse = {
582
+ requestId: '21e12606d47ba7',
583
+ cpm: 12.5,
584
+ currency: 'USD',
585
+ width: 300,
586
+ height: 200,
587
+ ttl: TTL,
588
+ creativeId: 'creative-id-3',
589
+ netRevenue: true,
590
+ nurl: 'http://example.com/win/1234',
591
+ mediaType: NATIVE,
592
+ meta: {
593
+ mediaType: NATIVE,
594
+ advertiserDomains: ['abc.com']
595
+ },
596
+ native: {
597
+ ortb: {
598
+ body: 'Advertise with Rise',
599
+ clickUrl: 'https://risecodes.com',
600
+ cta: 'Start now',
601
+ image: {
602
+ width: 300,
603
+ height: 200,
604
+ url: 'https://sdk.streamrail.com/media/rise-image.jpg',
605
+ },
606
+ sponsoredBy: 'Rise',
607
+ title: 'Rise Ad Tech Solutions'
608
+ }
609
+ },
610
+ };
611
+
497
612
  it('should get correct bid response', function () {
498
613
  const result = spec.interpretResponse({ body: response });
499
614
  expect(result[0]).to.deep.equal(expectedVideoResponse);
500
615
  expect(result[1]).to.deep.equal(expectedBannerResponse);
616
+ expect(result[2]).to.deep.equal(expectedNativeResponse);
501
617
  });
502
618
 
503
619
  it('video type should have vastXml key', function () {
@@ -509,6 +625,11 @@ describe('stnAdapter', function () {
509
625
  const result = spec.interpretResponse({ body: response });
510
626
  expect(result[1].ad).to.equal(expectedBannerResponse.ad)
511
627
  });
628
+
629
+ it('native type should have native key', function () {
630
+ const result = spec.interpretResponse({ body: response });
631
+ expect(result[2].native).to.eql(expectedNativeResponse.native)
632
+ });
512
633
  })
513
634
 
514
635
  describe('getUserSyncs', function() {
@@ -74,6 +74,14 @@ describe('symitriDapRtdProvider', function() {
74
74
  'identity': sampleIdentity
75
75
  }
76
76
 
77
+ const sampleX2Config = {
78
+ 'api_hostname': 'prebid.dap.akadns.net',
79
+ 'api_version': 'x2',
80
+ 'domain': 'prebid.org',
81
+ 'segtax': 708,
82
+ 'identity': sampleIdentity
83
+ }
84
+
77
85
  const esampleConfig = {
78
86
  'api_hostname': 'prebid.dap.akadns.net',
79
87
  'api_version': 'x1',
@@ -260,6 +268,34 @@ describe('symitriDapRtdProvider', function() {
260
268
  });
261
269
  });
262
270
 
271
+ describe('dapX2Tokenize', function () {
272
+ it('dapX2Tokenize error callback', function () {
273
+ let configAsync = JSON.parse(JSON.stringify(sampleX2Config));
274
+ let submoduleCallback = dapUtils.dapTokenize(configAsync, sampleIdentity, onDone,
275
+ function(token, status, xhr, onDone) {
276
+ },
277
+ function(xhr, status, error, onDone) {
278
+ }
279
+ );
280
+ let request = server.requests[0];
281
+ request.respond(400, responseHeader, JSON.stringify('error'));
282
+ expect(submoduleCallback).to.equal(undefined);
283
+ });
284
+
285
+ it('dapX2Tokenize success callback', function () {
286
+ let configAsync = JSON.parse(JSON.stringify(sampleX2Config));
287
+ let submoduleCallback = dapUtils.dapTokenize(configAsync, sampleIdentity, onDone,
288
+ function(token, status, xhr, onDone) {
289
+ },
290
+ function(xhr, status, error, onDone) {
291
+ }
292
+ );
293
+ let request = server.requests[0];
294
+ request.respond(200, responseHeader, JSON.stringify('success'));
295
+ expect(submoduleCallback).to.equal(undefined);
296
+ });
297
+ });
298
+
263
299
  describe('dapTokenize and dapMembership incorrect params', function () {
264
300
  it('Onerror and config are null', function () {
265
301
  expect(dapUtils.dapTokenize(null, 'identity', onDone, null, null)).to.be.equal(undefined);
@@ -94,6 +94,36 @@ const VIDEO_BID = {
94
94
  }
95
95
  }
96
96
 
97
+ const ORTB2_DEVICE = {
98
+ sua: {
99
+ 'source': 2,
100
+ 'platform': {
101
+ 'brand': 'Android',
102
+ 'version': ['8', '0', '0']
103
+ },
104
+ 'browsers': [
105
+ {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
106
+ {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
107
+ {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
108
+ ],
109
+ 'mobile': 1,
110
+ 'model': 'SM-G955U',
111
+ 'bitness': '64',
112
+ 'architecture': ''
113
+ },
114
+ w: 980,
115
+ h: 1720,
116
+ dnt: 0,
117
+ ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1',
118
+ language: 'en',
119
+ devicetype: 1,
120
+ make: 'Apple',
121
+ model: 'iPhone 12 Pro Max',
122
+ os: 'iOS',
123
+ osv: '17.4',
124
+ ext: {fiftyonedegrees_deviceId: '17595-133085-133468-18092'},
125
+ };
126
+
97
127
  const BIDDER_REQUEST = {
98
128
  'gdprConsent': {
99
129
  'consentString': 'consent_string',
@@ -117,24 +147,7 @@ const BIDDER_REQUEST = {
117
147
  'gpp_sid': [7],
118
148
  'coppa': 0
119
149
  },
120
- 'device': {
121
- 'sua': {
122
- 'source': 2,
123
- 'platform': {
124
- 'brand': 'Android',
125
- 'version': ['8', '0', '0']
126
- },
127
- 'browsers': [
128
- {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
129
- {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
130
- {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
131
- ],
132
- 'mobile': 1,
133
- 'model': 'SM-G955U',
134
- 'bitness': '64',
135
- 'architecture': ''
136
- }
137
- }
150
+ 'device': ORTB2_DEVICE,
138
151
  }
139
152
  };
140
153
 
@@ -314,6 +327,7 @@ describe('TagorasBidAdapter', function () {
314
327
  'bitness': '64',
315
328
  'architecture': ''
316
329
  },
330
+ device: ORTB2_DEVICE,
317
331
  uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
318
332
  uqs: getTopWindowQueryParams(),
319
333
  mediaTypes: {
@@ -384,6 +398,7 @@ describe('TagorasBidAdapter', function () {
384
398
  'bitness': '64',
385
399
  'architecture': ''
386
400
  },
401
+ device: ORTB2_DEVICE,
387
402
  url: 'https%3A%2F%2Fwww.greatsite.com',
388
403
  referrer: 'https://www.somereferrer.com',
389
404
  cb: 1000,