prebid.js 9.52.0 → 9.53.2

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 (235) hide show
  1. package/.circleci/config.yml +27 -4
  2. package/creative/crossDomain.js +4 -2
  3. package/dist/33acrossAnalyticsAdapter.js +1 -1
  4. package/dist/33acrossBidAdapter.js +1 -1
  5. package/dist/33acrossIdSystem.js +1 -1
  6. package/dist/BTBidAdapter.js +1 -1
  7. package/dist/adagioAnalyticsAdapter.js +1 -1
  8. package/dist/adagioBidAdapter.js +1 -1
  9. package/dist/adagioUtils.js +1 -1
  10. package/dist/addefendBidAdapter.js +1 -1
  11. package/dist/adgenerationBidAdapter.js +1 -1
  12. package/dist/adlooxRtdProvider.js +1 -1
  13. package/dist/adqueryBidAdapter.js +1 -1
  14. package/dist/adrelevantisBidAdapter.js +1 -1
  15. package/dist/adstirBidAdapter.js +1 -1
  16. package/dist/adtrgtmeBidAdapter.js +1 -1
  17. package/dist/adxcgAnalyticsAdapter.js +1 -1
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adyoulikeBidAdapter.js +1 -1
  20. package/dist/agmaAnalyticsAdapter.js +1 -1
  21. package/dist/ajaBidAdapter.js +1 -1
  22. package/dist/amxBidAdapter.js +1 -1
  23. package/dist/amxIdSystem.js +1 -1
  24. package/dist/aniviewBidAdapter.js +1 -1
  25. package/dist/appierAnalyticsAdapter.js +1 -1
  26. package/dist/appnexusBidAdapter.js +1 -1
  27. package/dist/asoBidAdapter.js +1 -1
  28. package/dist/axonixBidAdapter.js +1 -1
  29. package/dist/beopBidAdapter.js +1 -1
  30. package/dist/bidglassBidAdapter.js +1 -1
  31. package/dist/big-richmediaBidAdapter.js +1 -1
  32. package/dist/bitmediaBidAdapter.js +1 -1
  33. package/dist/bridBidAdapter.js +1 -1
  34. package/dist/bridgeuppBidAdapter.js +1 -1
  35. package/dist/bridgewellBidAdapter.js +1 -1
  36. package/dist/brightMountainMediaBidAdapter.js +1 -1
  37. package/dist/carodaBidAdapter.js +1 -1
  38. package/dist/chromeAiRtdProvider.js +1 -0
  39. package/dist/chtnwBidAdapter.js +1 -1
  40. package/dist/chunk-core.js +1 -1
  41. package/dist/concertBidAdapter.js +1 -1
  42. package/dist/connectadBidAdapter.js +1 -1
  43. package/dist/consumableBidAdapter.js +1 -1
  44. package/dist/contxtfulBidAdapter.js +1 -1
  45. package/dist/conversantAnalyticsAdapter.js +1 -1
  46. package/dist/conversantBidAdapter.js +1 -1
  47. package/dist/craftBidAdapter.js +1 -1
  48. package/dist/criteoBidAdapter.js +1 -1
  49. package/dist/cwireBidAdapter.js +1 -1
  50. package/dist/dailymotionBidAdapter.js +1 -1
  51. package/dist/debugging-standalone.js +1 -1
  52. package/dist/dependencies.json +10 -2
  53. package/dist/dspxBidAdapter.js +1 -1
  54. package/dist/dxkultureBidAdapter.js +1 -1
  55. package/dist/eplanningBidAdapter.js +1 -1
  56. package/dist/equativBidAdapter.js +1 -1
  57. package/dist/eskimiBidAdapter.js +1 -1
  58. package/dist/euidIdSystem.js +1 -1
  59. package/dist/exadsBidAdapter.js +1 -1
  60. package/dist/excoBidAdapter.js +1 -1
  61. package/dist/fanAdapter.js +1 -1
  62. package/dist/feedadBidAdapter.js +1 -1
  63. package/dist/finativeBidAdapter.js +1 -1
  64. package/dist/freewheel-sspBidAdapter.js +1 -1
  65. package/dist/gmosspBidAdapter.js +1 -1
  66. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  67. package/dist/greenbidsBidAdapter.js +1 -1
  68. package/dist/greenbidsRtdProvider.js +1 -1
  69. package/dist/gridBidAdapter.js +1 -1
  70. package/dist/gumgumBidAdapter.js +1 -1
  71. package/dist/h12mediaBidAdapter.js +1 -1
  72. package/dist/hypelabBidAdapter.js +1 -1
  73. package/dist/id5AnalyticsAdapter.js +1 -1
  74. package/dist/id5IdSystem.js +1 -1
  75. package/dist/imdsBidAdapter.js +1 -1
  76. package/dist/improvedigitalBidAdapter.js +1 -1
  77. package/dist/inmobiBidAdapter.js +1 -1
  78. package/dist/insticatorBidAdapter.js +1 -1
  79. package/dist/intentIqAnalyticsAdapter.js +1 -1
  80. package/dist/ixBidAdapter.js +1 -1
  81. package/dist/jixieBidAdapter.js +1 -1
  82. package/dist/jixieIdSystem.js +1 -0
  83. package/dist/justpremiumBidAdapter.js +1 -1
  84. package/dist/kargoBidAdapter.js +1 -1
  85. package/dist/kimberliteBidAdapter.js +1 -1
  86. package/dist/konduitAnalyticsAdapter.js +1 -1
  87. package/dist/kueezBidAdapter.js +1 -1
  88. package/dist/lassoBidAdapter.js +1 -1
  89. package/dist/lifestreetBidAdapter.js +1 -1
  90. package/dist/liveIntentId.js +1 -1
  91. package/dist/logicadBidAdapter.js +1 -1
  92. package/dist/loglyliftBidAdapter.js +1 -1
  93. package/dist/luceadBidAdapter.js +1 -1
  94. package/dist/mabidderBidAdapter.js +1 -1
  95. package/dist/madsenseBidAdapter.js +1 -1
  96. package/dist/magniteAnalyticsAdapter.js +1 -1
  97. package/dist/malltvAnalyticsAdapter.js +1 -1
  98. package/dist/marsmediaBidAdapter.js +1 -1
  99. package/dist/mediafuseBidAdapter.js +1 -1
  100. package/dist/medianetBidAdapter.js +1 -1
  101. package/dist/medianetUtils.js +1 -1
  102. package/dist/mediasquareBidAdapter.js +1 -1
  103. package/dist/mgidBidAdapter.js +1 -1
  104. package/dist/missenaBidAdapter.js +1 -1
  105. package/dist/mobilefuseBidAdapter.js +1 -1
  106. package/dist/nextMillenniumBidAdapter.js +1 -1
  107. package/dist/nexx360Utils.js +1 -1
  108. package/dist/nobidAnalyticsAdapter.js +1 -1
  109. package/dist/nobidBidAdapter.js +1 -1
  110. package/dist/nodalsAiRtdProvider.js +1 -1
  111. package/dist/not-for-prod/prebid.js +175 -173
  112. package/dist/oguryBidAdapter.js +1 -1
  113. package/dist/onetagBidAdapter.js +1 -1
  114. package/dist/ooloAnalyticsAdapter.js +1 -1
  115. package/dist/openxBidAdapter.js +1 -1
  116. package/dist/optidigitalBidAdapter.js +1 -1
  117. package/dist/orbidderBidAdapter.js +1 -1
  118. package/dist/ortb2.5Translator.js +1 -1
  119. package/dist/outbrainBidAdapter.js +1 -1
  120. package/dist/ozoneBidAdapter.js +1 -1
  121. package/dist/pixfutureBidAdapter.js +1 -1
  122. package/dist/prebidServerBidAdapter.js +1 -1
  123. package/dist/publinkIdSystem.js +1 -1
  124. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  125. package/dist/pubmaticBidAdapter.js +1 -1
  126. package/dist/pubmaticRtdProvider.js +1 -1
  127. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  128. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  129. package/dist/pxyzBidAdapter.js +1 -1
  130. package/dist/quantcastBidAdapter.js +1 -1
  131. package/dist/readpeakBidAdapter.js +1 -1
  132. package/dist/relaidoBidAdapter.js +1 -1
  133. package/dist/relevatehealthBidAdapter.js +1 -1
  134. package/dist/retailspotBidAdapter.js +1 -1
  135. package/dist/rhythmoneBidAdapter.js +1 -1
  136. package/dist/riseUtils.js +1 -1
  137. package/dist/rubiconBidAdapter.js +1 -1
  138. package/dist/seedingAllianceBidAdapter.js +1 -1
  139. package/dist/seedtagBidAdapter.js +1 -1
  140. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  141. package/dist/sharethroughBidAdapter.js +1 -1
  142. package/dist/showheroes-bsBidAdapter.js +1 -1
  143. package/dist/smaatoBidAdapter.js +1 -1
  144. package/dist/smartadserverBidAdapter.js +1 -1
  145. package/dist/smartxBidAdapter.js +1 -1
  146. package/dist/smilewantedBidAdapter.js +1 -1
  147. package/dist/snigelBidAdapter.js +1 -1
  148. package/dist/sonobiBidAdapter.js +1 -1
  149. package/dist/sovrnBidAdapter.js +1 -1
  150. package/dist/sparteoBidAdapter.js +1 -1
  151. package/dist/sspBCBidAdapter.js +1 -1
  152. package/dist/stvBidAdapter.js +1 -1
  153. package/dist/sublimeBidAdapter.js +1 -1
  154. package/dist/taboolaBidAdapter.js +1 -1
  155. package/dist/tappxBidAdapter.js +1 -1
  156. package/dist/targetVideoBidAdapter.js +1 -1
  157. package/dist/teadsBidAdapter.js +1 -1
  158. package/dist/terceptAnalyticsAdapter.js +1 -1
  159. package/dist/themoneytizerBidAdapter.js +1 -1
  160. package/dist/trionBidAdapter.js +1 -1
  161. package/dist/tripleliftBidAdapter.js +1 -1
  162. package/dist/ttdBidAdapter.js +1 -1
  163. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  164. package/dist/uid2IdSystem.js +1 -1
  165. package/dist/underdogmediaBidAdapter.js +1 -1
  166. package/dist/undertoneBidAdapter.js +1 -1
  167. package/dist/unrulyBidAdapter.js +1 -1
  168. package/dist/userId.js +1 -1
  169. package/dist/vidazooUtils.js +1 -1
  170. package/dist/videobyteBidAdapter.js +1 -1
  171. package/dist/visxBidAdapter.js +1 -1
  172. package/dist/vuukleBidAdapter.js +1 -1
  173. package/dist/widespaceBidAdapter.js +1 -1
  174. package/dist/winrBidAdapter.js +1 -1
  175. package/dist/yahooAdsBidAdapter.js +1 -1
  176. package/dist/yandexBidAdapter.js +1 -1
  177. package/dist/yieldmoBidAdapter.js +1 -1
  178. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  179. package/gulpfile.js +12 -6
  180. package/integrationExamples/chromeai/japanese.html +224 -0
  181. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  182. package/karma.conf.maker.js +7 -7
  183. package/karmaRunner.js +3 -3
  184. package/libraries/liveIntentId/shared.js +16 -0
  185. package/modules/.submodules.json +1 -0
  186. package/modules/aniviewBidAdapter.js +32 -23
  187. package/modules/chromeAiRtdProvider.js +421 -0
  188. package/modules/chromeAiRtdProvider.md +230 -0
  189. package/modules/fanAdapter.js +318 -124
  190. package/modules/ixBidAdapter.js +5 -0
  191. package/modules/jixieIdSystem.js +186 -0
  192. package/modules/ozoneBidAdapter.js +214 -336
  193. package/modules/prebidServerBidAdapter/index.js +59 -35
  194. package/modules/pubmaticRtdProvider.js +418 -4
  195. package/modules/pubmaticRtdProvider.md +12 -2
  196. package/modules/relevatehealthBidAdapter.js +20 -130
  197. package/modules/relevatehealthBidAdapter.md +1 -2
  198. package/modules/sovrnBidAdapter.js +4 -4
  199. package/modules/teadsBidAdapter.js +5 -0
  200. package/modules/ttdBidAdapter.js +5 -4
  201. package/modules/userId/index.js +30 -31
  202. package/package.json +5 -4
  203. package/src/adapterManager.js +3 -0
  204. package/test/spec/libraries/cmUtils_spec.js +17 -12
  205. package/test/spec/modules/aniviewBidAdapter_spec.js +15 -2
  206. package/test/spec/modules/chromeAiRtdProvider_spec.js +393 -0
  207. package/test/spec/modules/dgkeywordRtdProvider_spec.js +5 -2
  208. package/test/spec/modules/euidIdSystem_spec.js +9 -3
  209. package/test/spec/modules/fanAdapter_spec.js +264 -268
  210. package/test/spec/modules/id5IdSystem_spec.js +57 -101
  211. package/test/spec/modules/identityLinkIdSystem_spec.js +1 -0
  212. package/test/spec/modules/idxIdSystem_spec.js +2 -75
  213. package/test/spec/modules/instreamTracking_spec.js +15 -18
  214. package/test/spec/modules/ixBidAdapter_spec.js +26 -0
  215. package/test/spec/modules/jixieIdSystem_spec.js +303 -0
  216. package/test/spec/modules/liveIntentExternalIdSystem_spec.js +5 -0
  217. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
  218. package/test/spec/modules/liveIntentIdSystem_spec.js +38 -0
  219. package/test/spec/modules/lmpIdSystem_spec.js +2 -81
  220. package/test/spec/modules/ozoneBidAdapter_spec.js +511 -658
  221. package/test/spec/modules/prebidServerBidAdapter_spec.js +72 -2
  222. package/test/spec/modules/pubmaticBidAdapter_spec.js +411 -126
  223. package/test/spec/modules/pubmaticRtdProvider_spec.js +946 -2
  224. package/test/spec/modules/raynRtdProvider_spec.js +18 -22
  225. package/test/spec/modules/relevatehealthBidAdapter_spec.js +9 -39
  226. package/test/spec/modules/sharedIdSystem_spec.js +3 -3
  227. package/test/spec/modules/sovrnBidAdapter_spec.js +71 -3
  228. package/test/spec/modules/teadsBidAdapter_spec.js +9 -4
  229. package/test/spec/modules/ttdBidAdapter_spec.js +24 -2
  230. package/test/spec/modules/uid2IdSystem_helpers.js +5 -2
  231. package/test/spec/modules/userId_spec.js +142 -387
  232. package/test/spec/modules/yieldoneAnalyticsAdapter_spec.js +13 -12
  233. package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +3 -69
  234. package/wdio.shared.conf.js +2 -2
  235. package/CLAUDE.md +0 -1
@@ -222,10 +222,15 @@ describe('rayn RTD Submodule', function () {
222
222
  });
223
223
 
224
224
  describe('Alter Bid Requests', function () {
225
+ let logMessageSpy;
226
+ beforeEach(() => {
227
+ logMessageSpy = sinon.spy(utils, 'logMessage');
228
+ })
229
+ afterEach(() => {
230
+ logMessageSpy.restore();
231
+ })
225
232
  it('should update reqBidsConfigObj and execute callback', function () {
226
233
  const callbackSpy = sinon.spy();
227
- const logMessageSpy = sinon.spy(utils, 'logMessage');
228
-
229
234
  getDataFromLocalStorageStub
230
235
  .withArgs(raynRTD.RAYN_LOCAL_STORAGE_KEY)
231
236
  .returns(JSON.stringify(TEST_SEGMENTS));
@@ -235,14 +240,11 @@ describe('rayn RTD Submodule', function () {
235
240
  raynRTD.raynSubmodule.getBidRequestData(reqBidsConfigObj, callbackSpy, RTD_CONFIG);
236
241
 
237
242
  expect(callbackSpy.calledOnce).to.be.true;
238
- expect(logMessageSpy.lastCall.lastArg).to.equal(`Segtax data from localStorage: ${JSON.stringify(TEST_SEGMENTS)}`);
239
-
240
- logMessageSpy.restore();
243
+ sinon.assert.calledWith(logMessageSpy, sinon.match.any, `Segtax data from localStorage: ${JSON.stringify(TEST_SEGMENTS)}`)
241
244
  });
242
245
 
243
246
  it('should update reqBidsConfigObj and execute callback using user segments from localStorage', function () {
244
247
  const callbackSpy = sinon.spy();
245
- const logMessageSpy = sinon.spy(utils, 'logMessage');
246
248
  const testSegments = {
247
249
  4: {
248
250
  3: ['4', '17', '72', '612']
@@ -267,14 +269,11 @@ describe('rayn RTD Submodule', function () {
267
269
  raynRTD.raynSubmodule.getBidRequestData(reqBidsConfigObj, callbackSpy, RTD_CONFIG.dataProviders[0]);
268
270
 
269
271
  expect(callbackSpy.calledOnce).to.be.true;
270
- expect(logMessageSpy.lastCall.lastArg).to.equal(`Segtax data from localStorage: ${JSON.stringify(testSegments)}`);
271
-
272
- logMessageSpy.restore();
272
+ sinon.assert.calledWith(logMessageSpy, sinon.match.any, `Segtax data from localStorage: ${JSON.stringify(testSegments)}`)
273
273
  });
274
274
 
275
275
  it('should update reqBidsConfigObj and execute callback using persona segment from localStorage', function () {
276
276
  const callbackSpy = sinon.spy();
277
- const logMessageSpy = sinon.spy(utils, 'logMessage');
278
277
  const testSegments = {
279
278
  103015: ['agdv23', 'avscg3']
280
279
  };
@@ -288,14 +287,11 @@ describe('rayn RTD Submodule', function () {
288
287
  raynRTD.raynSubmodule.getBidRequestData(reqBidsConfigObj, callbackSpy, RTD_CONFIG.dataProviders[0]);
289
288
 
290
289
  expect(callbackSpy.calledOnce).to.be.true;
291
- expect(logMessageSpy.lastCall.lastArg).to.equal(`Segtax data from localStorage: ${JSON.stringify(testSegments)}`);
292
-
293
- logMessageSpy.restore();
290
+ sinon.assert.calledWith(logMessageSpy, sinon.match.any, `Segtax data from localStorage: ${JSON.stringify(testSegments)}`)
294
291
  });
295
292
 
296
293
  it('should update reqBidsConfigObj and execute callback using segments from raynJS', function () {
297
294
  const callbackSpy = sinon.spy();
298
- const logMessageSpy = sinon.spy(utils, 'logMessage');
299
295
 
300
296
  getDataFromLocalStorageStub
301
297
  .withArgs(raynRTD.RAYN_LOCAL_STORAGE_KEY)
@@ -306,14 +302,11 @@ describe('rayn RTD Submodule', function () {
306
302
  raynRTD.raynSubmodule.getBidRequestData(reqBidsConfigObj, callbackSpy, RTD_CONFIG.dataProviders[0]);
307
303
 
308
304
  expect(callbackSpy.calledOnce).to.be.true;
309
- expect(logMessageSpy.lastCall.lastArg).to.equal(`No segtax data`);
310
-
311
- logMessageSpy.restore();
305
+ sinon.assert.calledWith(logMessageSpy, sinon.match.any, `No segtax data`)
312
306
  });
313
307
 
314
308
  it('should update reqBidsConfigObj and execute callback using audience from localStorage', function (done) {
315
309
  const callbackSpy = sinon.spy();
316
- const logMessageSpy = sinon.spy(utils, 'logMessage');
317
310
  const testSegments = {
318
311
  6: {
319
312
  4: ['3', '27', '177']
@@ -363,10 +356,13 @@ describe('rayn RTD Submodule', function () {
363
356
  raynRTD.raynSubmodule.getBidRequestData(reqBidsConfigObj, callbackSpy, RTD_CONFIG.dataProviders[0]);
364
357
 
365
358
  setTimeout(() => {
366
- expect(callbackSpy.calledOnce).to.be.true;
367
- expect(logErrorSpy.lastCall.lastArg).to.equal(rejectError);
368
- logErrorSpy.restore();
369
- done();
359
+ try {
360
+ expect(callbackSpy.calledOnce).to.be.true;
361
+ expect(logErrorSpy.calledWith('RaynJS: ', rejectError)).to.be.true;
362
+ } finally {
363
+ logErrorSpy.restore();
364
+ done();
365
+ }
370
366
  }, 0)
371
367
  });
372
368
  });
@@ -22,7 +22,6 @@ describe('relevatehealth adapter', function() {
22
22
  },
23
23
  params: {
24
24
  placement_id: 110011,
25
- user_id: '11211',
26
25
  width: 160,
27
26
  height: 600,
28
27
  domain: '',
@@ -82,18 +81,17 @@ describe('relevatehealth adapter', function() {
82
81
  });
83
82
 
84
83
  describe('validations', function() {
85
- it('isBidValid : placement_id and user_id are passed', function() {
84
+ it('isBidValid : placement_id is passed', function() {
86
85
  let bid = {
87
86
  bidder: 'relevatehealth',
88
87
  params: {
89
- placement_id: 110011,
90
- user_id: '11211'
88
+ placement_id: 110011
91
89
  }
92
90
  },
93
91
  isValid = spec.isBidRequestValid(bid);
94
92
  expect(isValid).to.equals(true);
95
93
  });
96
- it('isBidValid : placement_id and user_id are not passed', function() {
94
+ it('isBidValid : placement_id is not passed', function() {
97
95
  let bid = {
98
96
  bidder: 'relevatehealth',
99
97
  params: {
@@ -106,34 +104,6 @@ describe('relevatehealth adapter', function() {
106
104
  isValid = spec.isBidRequestValid(bid);
107
105
  expect(isValid).to.equals(false);
108
106
  });
109
- it('isBidValid : placement_id is passed but user_id is not passed', function() {
110
- let bid = {
111
- bidder: 'relevatehealth',
112
- params: {
113
- placement_id: 110011,
114
- width: 160,
115
- height: 600,
116
- domain: '',
117
- bid_floor: 0.5
118
- }
119
- },
120
- isValid = spec.isBidRequestValid(bid);
121
- expect(isValid).to.equals(false);
122
- });
123
- it('isBidValid : user_id is passed but placement_id is not passed', function() {
124
- let bid = {
125
- bidder: 'relevatehealth',
126
- params: {
127
- width: 160,
128
- height: 600,
129
- domain: '',
130
- bid_floor: 0.5,
131
- user_id: '11211'
132
- }
133
- },
134
- isValid = spec.isBidRequestValid(bid);
135
- expect(isValid).to.equals(false);
136
- });
137
107
  });
138
108
  describe('Validate Request', function() {
139
109
  it('Immutable bid request validate', function() {
@@ -172,7 +142,7 @@ describe('relevatehealth adapter', function() {
172
142
  };
173
143
  let _Request = spec.buildRequests(request, bidRequest);
174
144
  let data = JSON.parse(_Request.data);
175
- expect(data[0].us_privacy).to.equal('1NYN');
145
+ expect(data[0].regs.ext.us_privacy).to.equal('1NYN');
176
146
  });
177
147
  });
178
148
  describe('Validate response ', function() {
@@ -206,8 +176,8 @@ describe('relevatehealth adapter', function() {
206
176
  };
207
177
  let _Request = spec.buildRequests(request, bidderReq);
208
178
  let data = JSON.parse(_Request.data);
209
- expect(data[0].gpp).to.equal('gpp-string-test');
210
- expect(data[0].gpp_sid[0]).to.equal(5);
179
+ expect(data[0].regs.gpp).to.equal('gpp-string-test');
180
+ expect(data[0].regs.gpp_sid[0]).to.equal(5);
211
181
  });
212
182
  it('Request params check with GPP Consent read from ortb2', function() {
213
183
  let bidderReq = {
@@ -220,8 +190,8 @@ describe('relevatehealth adapter', function() {
220
190
  };
221
191
  let _Request = spec.buildRequests(request, bidderReq);
222
192
  let data = JSON.parse(_Request.data);
223
- expect(data[0].gpp).to.equal('gpp-test-string');
224
- expect(data[0].gpp_sid[0]).to.equal(5);
193
+ expect(data[0].regs.gpp).to.equal('gpp-test-string');
194
+ expect(data[0].regs.gpp_sid[0]).to.equal(5);
225
195
  });
226
196
  it(' Bid request should have coppa flag if its true', () => {
227
197
  let bidderReq = {
@@ -233,7 +203,7 @@ describe('relevatehealth adapter', function() {
233
203
  };
234
204
  let _Request = spec.buildRequests(request, bidderReq);
235
205
  let data = JSON.parse(_Request.data);
236
- expect(data[0].coppa).to.equal(1);
206
+ expect(data[0].regs.coppa).to.equal(1);
237
207
  });
238
208
  });
239
209
  });
@@ -1,10 +1,10 @@
1
- import {sharedIdSystemSubmodule, storage} from 'modules/sharedIdSystem.js';
1
+ import {sharedIdSystemSubmodule} from 'modules/sharedIdSystem.js';
2
2
  import {config} from 'src/config.js';
3
3
 
4
4
  import sinon from 'sinon';
5
5
  import * as utils from 'src/utils.js';
6
6
  import {createEidsArray} from '../../../modules/userId/eids.js';
7
- import {attachIdSystem, init} from '../../../modules/userId/index.js';
7
+ import {attachIdSystem} from '../../../modules/userId/index.js';
8
8
  import {getGlobal} from '../../../src/prebidGlobal.js';
9
9
 
10
10
  let expect = require('chai').expect;
@@ -117,7 +117,7 @@ describe('SharedId System', function () {
117
117
  }]
118
118
  }
119
119
  });
120
- await getGlobal().getUserIdsAsync();
120
+ await getGlobal().refreshUserIds();
121
121
  const eids = getGlobal().getUserIdsAsEids();
122
122
  sinon.assert.match(eids[0], {
123
123
  source: 'pubcid.org',
@@ -763,7 +763,8 @@ describe('sovrnBidAdapter', function() {
763
763
  nurl: '',
764
764
  adm: '<VAST version="4.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST">key%3Dvalue</VAST>',
765
765
  h: 480,
766
- w: 640
766
+ w: 640,
767
+ mtype: 2
767
768
  }
768
769
  const bannerBid = {
769
770
  id: 'a_403370_332fdb9b064040ddbec05891bd13ab28',
@@ -773,7 +774,8 @@ describe('sovrnBidAdapter', function() {
773
774
  nurl: '<!-- NURL -->',
774
775
  adm: '<!-- Creative -->',
775
776
  h: 90,
776
- w: 728
777
+ w: 728,
778
+ mtype: 1
777
779
  }
778
780
 
779
781
  beforeEach(function () {
@@ -789,6 +791,71 @@ describe('sovrnBidAdapter', function() {
789
791
  }
790
792
  })
791
793
 
794
+ it('Should return the bid response of correct type when nurl is missing', function () {
795
+ const expectedResponse = {
796
+ requestId: '263c448586f5a1',
797
+ cpm: 0.45882675,
798
+ width: 728,
799
+ height: 90,
800
+ creativeId: 'creativelycreatedcreativecreative',
801
+ dealId: null,
802
+ currency: 'USD',
803
+ netRevenue: true,
804
+ mediaType: 'banner',
805
+ ttl: 60000,
806
+ meta: { advertiserDomains: [] },
807
+ ad: decodeURIComponent(`<!-- Creative -->`)
808
+ }
809
+
810
+ response = {
811
+ body: {
812
+ id: '37386aade21a71',
813
+ seatbid: [{
814
+ bid: [{
815
+ ...bannerBid,
816
+ nurl: ''
817
+ }]
818
+ }]
819
+ }
820
+ }
821
+
822
+ const result = spec.interpretResponse(response)
823
+
824
+ expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse))
825
+ })
826
+
827
+ it('Should return the bid response of correct type when nurl is present', function () {
828
+ const expectedResponse = {
829
+ requestId: '263c448586f5a1',
830
+ cpm: 0.45882675,
831
+ width: 728,
832
+ height: 90,
833
+ creativeId: 'creativelycreatedcreativecreative',
834
+ dealId: null,
835
+ currency: 'USD',
836
+ netRevenue: true,
837
+ mediaType: 'banner',
838
+ ttl: 60000,
839
+ meta: { advertiserDomains: [] },
840
+ ad: decodeURIComponent(`<!-- Creative --><img src=<!-- NURL -->>`)
841
+ }
842
+
843
+ response = {
844
+ body: {
845
+ id: '37386aade21a71',
846
+ seatbid: [{
847
+ bid: [{
848
+ ...bannerBid
849
+ }]
850
+ }]
851
+ }
852
+ }
853
+
854
+ const result = spec.interpretResponse(response)
855
+
856
+ expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse))
857
+ })
858
+
792
859
  it('should get the correct bid response', function () {
793
860
  const expectedResponse = {
794
861
  requestId: '263c448586f5a1',
@@ -1072,7 +1139,8 @@ describe('sovrnBidAdapter', function() {
1072
1139
  nurl: '',
1073
1140
  adm: bidAdm,
1074
1141
  h: 480,
1075
- w: 640
1142
+ w: 640,
1143
+ mtype: 2
1076
1144
  }]
1077
1145
  }]
1078
1146
  }
@@ -921,6 +921,7 @@ describe('teadsBidAdapter', () => {
921
921
  for (const userId in userIdModules) {
922
922
  expect(payload, userId).not.to.have.property(userId);
923
923
  }
924
+ expect(payload['eids']).to.deep.equal([])
924
925
  });
925
926
 
926
927
  it(`should not add param to payload if user id field is absent`, function () {
@@ -930,15 +931,17 @@ describe('teadsBidAdapter', () => {
930
931
  for (const userId in userIdModules) {
931
932
  expect(payload, userId).not.to.have.property(userId);
932
933
  }
934
+ expect(payload['eids']).to.deep.equal([])
933
935
  });
934
936
 
935
937
  it(`should not add param to payload if user id is enabled but there is no value`, function () {
938
+ const userIdAsEids = [
939
+ toEid('idl_env', ''),
940
+ toEid('pubcid.org', 'publisherFirstPartyViewerId-id')
941
+ ]
936
942
  const bidRequest = {
937
943
  ...baseBidRequest,
938
- userIdAsEids: [
939
- toEid('idl_env', ''),
940
- toEid('pubcid.org', 'publisherFirstPartyViewerId-id')
941
- ]
944
+ userIdAsEids
942
945
  };
943
946
 
944
947
  const request = spec.buildRequests([bidRequest], bidderRequestDefault);
@@ -946,6 +949,7 @@ describe('teadsBidAdapter', () => {
946
949
 
947
950
  expect(payload).not.to.have.property('liveRampId');
948
951
  expect(payload['publisherFirstPartyViewerId']).to.equal('publisherFirstPartyViewerId-id');
952
+ expect(payload['eids']).to.deep.equal(userIdAsEids)
949
953
  });
950
954
 
951
955
  it(`should add userId param to payload for each enabled user id system`, function () {
@@ -970,6 +974,7 @@ describe('teadsBidAdapter', () => {
970
974
  expect(payload['publisherFirstPartyViewerId']).to.equal('publisherFirstPartyViewerId-id');
971
975
  expect(payload['merkleId']).to.equal('merkleId-id');
972
976
  expect(payload['kinessoId']).to.equal('kinessoId-id');
977
+ expect(payload['eids']).to.deep.equal(Object.values(userIdModules))
973
978
  });
974
979
  })
975
980
 
@@ -559,7 +559,7 @@ describe('ttdBidAdapter', function () {
559
559
  expect(requestBody.source.ext.schain).to.deep.equal(schain);
560
560
  });
561
561
 
562
- it('adds unified ID info to the request', function () {
562
+ it('no longer uses userId', function () {
563
563
  const TDID = '00000000-0000-0000-0000-000000000000';
564
564
  let clonedBannerRequests = deepClone(baseBannerBidRequests);
565
565
  clonedBannerRequests[0].userId = {
@@ -567,7 +567,7 @@ describe('ttdBidAdapter', function () {
567
567
  };
568
568
 
569
569
  const requestBody = testBuildRequests(clonedBannerRequests, baseBidderRequest).data;
570
- expect(requestBody.user.buyeruid).to.equal(TDID);
570
+ expect(requestBody.user.buyeruid).to.be.undefined;
571
571
  });
572
572
 
573
573
  it('adds unified ID and UID2 info to user.ext.eids in the request', function () {
@@ -601,6 +601,28 @@ describe('ttdBidAdapter', function () {
601
601
 
602
602
  const requestBody = testBuildRequests(clonedBannerRequests, baseBidderRequest).data;
603
603
  expect(requestBody.user.ext.eids).to.deep.equal(expectedEids);
604
+ expect(requestBody.user.buyeruid).to.equal(TDID);
605
+ });
606
+
607
+ it('has an empty buyeruid if tdid not found in userIdAsEids', function () {
608
+ const UID2 = '99999999-9999-9999-9999-999999999999';
609
+ let clonedBannerRequests = deepClone(baseBannerBidRequests);
610
+ clonedBannerRequests[0].userIdAsEids = [
611
+ {
612
+ source: 'uidapi.com',
613
+ uids: [
614
+ {
615
+ atype: 3,
616
+ id: UID2
617
+ }
618
+ ]
619
+ }
620
+ ];
621
+ const expectedEids = clonedBannerRequests[0].userIdAsEids;
622
+
623
+ const requestBody = testBuildRequests(clonedBannerRequests, baseBidderRequest).data;
624
+ expect(requestBody.user.ext.eids).to.deep.equal(expectedEids);
625
+ expect(requestBody.user.buyeruid).to.be.undefined;
604
626
  });
605
627
 
606
628
  it('adds first party site data to the request', function () {
@@ -18,10 +18,13 @@ export const runAuction = async () => {
18
18
  sizes: [[300, 200], [300, 600]],
19
19
  bids: [{bidder: 'sampleBidder', params: {placementId: 'banner-only-bidder'}}]
20
20
  }];
21
+ const ortb2Fragments = {global: {}, bidder: {}};
21
22
  return new Promise(function(resolve) {
22
23
  startAuctionHook(function() {
23
- resolve(adUnits[0].bids[0]);
24
- }, {adUnits});
24
+ const bid = Object.assign({}, adUnits[0].bids[0]);
25
+ bid.userIdAsEids = (ortb2Fragments.global.user?.ext?.eids ?? []).concat(ortb2Fragments.bidder[bid.bidder]?.user?.ext?.eids ?? []);
26
+ resolve(bid);
27
+ }, {adUnits, ortb2Fragments});
25
28
  });
26
29
  }
27
30