prebid.js 8.3.0 → 8.4.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 (203) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/admanBidAdapter.js +1 -1
  7. package/dist/adqueryBidAdapter.js +1 -1
  8. package/dist/adrelevantisBidAdapter.js +1 -1
  9. package/dist/adtrgtmeBidAdapter.js +1 -1
  10. package/dist/adxcgBidAdapter.js +1 -1
  11. package/dist/adyoulikeBidAdapter.js +1 -1
  12. package/dist/ajaBidAdapter.js +1 -1
  13. package/dist/amxBidAdapter.js +1 -1
  14. package/dist/amxIdSystem.js +1 -1
  15. package/dist/appierAnalyticsAdapter.js +1 -1
  16. package/dist/appnexusBidAdapter.js +1 -1
  17. package/dist/asoBidAdapter.js +1 -1
  18. package/dist/axonixBidAdapter.js +1 -1
  19. package/dist/bidglassBidAdapter.js +1 -1
  20. package/dist/big-richmediaBidAdapter.js +1 -1
  21. package/dist/brandmetricsRtdProvider.js +1 -1
  22. package/dist/bridBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/carodaBidAdapter.js +1 -1
  26. package/dist/chtnwBidAdapter.js +1 -1
  27. package/dist/concertBidAdapter.js +1 -1
  28. package/dist/connectadBidAdapter.js +1 -1
  29. package/dist/consumableBidAdapter.js +1 -1
  30. package/dist/conversantAnalyticsAdapter.js +1 -1
  31. package/dist/conversantBidAdapter.js +1 -1
  32. package/dist/craftBidAdapter.js +1 -1
  33. package/dist/criteoBidAdapter.js +1 -1
  34. package/dist/cwireBidAdapter.js +1 -1
  35. package/dist/dependencies.json +3 -0
  36. package/dist/dspxBidAdapter.js +1 -1
  37. package/dist/eplanningBidAdapter.js +1 -1
  38. package/dist/euidIdSystem.js +1 -1
  39. package/dist/feedadBidAdapter.js +1 -1
  40. package/dist/finativeBidAdapter.js +1 -1
  41. package/dist/freewheel-sspBidAdapter.js +1 -1
  42. package/dist/gdprEnforcement.js +1 -1
  43. package/dist/gmosspBidAdapter.js +1 -1
  44. package/dist/goldbachBidAdapter.js +1 -1
  45. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  46. package/dist/greenbidsRtdProvider.js +1 -1
  47. package/dist/gridBidAdapter.js +1 -1
  48. package/dist/gumgumBidAdapter.js +1 -1
  49. package/dist/h12mediaBidAdapter.js +1 -1
  50. package/dist/hypelabBidAdapter.js +1 -1
  51. package/dist/id5IdSystem.js +1 -1
  52. package/dist/imdsBidAdapter.js +1 -1
  53. package/dist/improvedigitalBidAdapter.js +1 -1
  54. package/dist/insticatorBidAdapter.js +1 -1
  55. package/dist/ixBidAdapter.js +1 -1
  56. package/dist/justpremiumBidAdapter.js +1 -1
  57. package/dist/kargoBidAdapter.js +1 -1
  58. package/dist/konduitAnalyticsAdapter.js +1 -1
  59. package/dist/kueezBidAdapter.js +1 -1
  60. package/dist/kueezRtbBidAdapter.js +1 -1
  61. package/dist/kulturemediaBidAdapter.js +1 -1
  62. package/dist/lassoBidAdapter.js +1 -1
  63. package/dist/lifestreetBidAdapter.js +1 -1
  64. package/dist/logicadBidAdapter.js +1 -1
  65. package/dist/loglyliftBidAdapter.js +1 -1
  66. package/dist/magniteAnalyticsAdapter.js +1 -1
  67. package/dist/malltvAnalyticsAdapter.js +1 -1
  68. package/dist/marsmediaBidAdapter.js +1 -1
  69. package/dist/mediafuseBidAdapter.js +1 -1
  70. package/dist/mediasquareBidAdapter.js +1 -1
  71. package/dist/mgidBidAdapter.js +1 -1
  72. package/dist/minutemediaBidAdapter.js +1 -1
  73. package/dist/minutemediaplusBidAdapter.js +1 -1
  74. package/dist/nexx360BidAdapter.js +1 -1
  75. package/dist/not-for-prod/prebid.js +135 -135
  76. package/dist/oguryBidAdapter.js +1 -1
  77. package/dist/onetagBidAdapter.js +1 -1
  78. package/dist/ooloAnalyticsAdapter.js +1 -1
  79. package/dist/optidigitalBidAdapter.js +1 -1
  80. package/dist/outbrainBidAdapter.js +1 -1
  81. package/dist/parrableIdSystem.js +1 -1
  82. package/dist/pixfutureBidAdapter.js +1 -1
  83. package/dist/prebid-core.js +2 -2
  84. package/dist/publinkIdSystem.js +1 -1
  85. package/dist/pubmaticBidAdapter.js +1 -1
  86. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  87. package/dist/pulsepointBidAdapter.js +1 -1
  88. package/dist/pxyzBidAdapter.js +1 -1
  89. package/dist/quantcastBidAdapter.js +1 -1
  90. package/dist/readpeakBidAdapter.js +1 -1
  91. package/dist/relaidoBidAdapter.js +1 -1
  92. package/dist/retailspotBidAdapter.js +1 -1
  93. package/dist/rhythmoneBidAdapter.js +1 -1
  94. package/dist/riseBidAdapter.js +1 -1
  95. package/dist/rubiconBidAdapter.js +1 -1
  96. package/dist/seedingAllianceBidAdapter.js +1 -1
  97. package/dist/seedtagBidAdapter.js +1 -1
  98. package/dist/sharedIdSystem.js +1 -1
  99. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  100. package/dist/sharethroughBidAdapter.js +1 -1
  101. package/dist/shinezBidAdapter.js +1 -1
  102. package/dist/smaatoBidAdapter.js +1 -1
  103. package/dist/smartadserverBidAdapter.js +1 -1
  104. package/dist/smartxBidAdapter.js +1 -1
  105. package/dist/smilewantedBidAdapter.js +1 -1
  106. package/dist/sonobiBidAdapter.js +1 -1
  107. package/dist/sovrnAnalyticsAdapter.js +1 -1
  108. package/dist/sovrnBidAdapter.js +1 -1
  109. package/dist/sspBCBidAdapter.js +1 -1
  110. package/dist/stroeerCoreBidAdapter.js +1 -1
  111. package/dist/stvBidAdapter.js +1 -1
  112. package/dist/sublimeBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/topicsFpdModule.js +1 -1
  116. package/dist/trionBidAdapter.js +1 -1
  117. package/dist/tripleliftBidAdapter.js +1 -1
  118. package/dist/ttdBidAdapter.js +1 -1
  119. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  120. package/dist/uid2IdSystem.js +1 -1
  121. package/dist/underdogmediaBidAdapter.js +1 -1
  122. package/dist/undertoneBidAdapter.js +1 -1
  123. package/dist/userId.js +1 -1
  124. package/dist/vidazooBidAdapter.js +1 -1
  125. package/dist/videobyteBidAdapter.js +1 -1
  126. package/dist/visxBidAdapter.js +1 -1
  127. package/dist/voxBidAdapter.js +1 -1
  128. package/dist/vuukleBidAdapter.js +1 -1
  129. package/dist/widespaceBidAdapter.js +1 -1
  130. package/dist/winrBidAdapter.js +1 -1
  131. package/dist/yahoosspBidAdapter.js +1 -1
  132. package/dist/yandexBidAdapter.js +1 -1
  133. package/dist/yieldmoBidAdapter.js +1 -1
  134. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  135. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  136. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  137. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  138. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  139. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  140. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  141. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  142. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  143. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  144. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  145. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  146. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  147. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  148. package/modules/33acrossBidAdapter.js +24 -14
  149. package/modules/33acrossIdSystem.js +15 -4
  150. package/modules/adagioBidAdapter.js +0 -1
  151. package/modules/admanBidAdapter.js +4 -0
  152. package/modules/brandmetricsRtdProvider.js +36 -2
  153. package/modules/brandmetricsRtdProvider.md +17 -2
  154. package/modules/gdprEnforcement.js +27 -22
  155. package/modules/gridBidAdapter.js +19 -0
  156. package/modules/ixBidAdapter.js +40 -2
  157. package/modules/kargoBidAdapter.js +4 -0
  158. package/modules/minutemediaBidAdapter.js +17 -2
  159. package/modules/oguryBidAdapter.js +29 -16
  160. package/modules/pubmaticBidAdapter.js +16 -1
  161. package/modules/pulsepointBidAdapter.js +63 -424
  162. package/modules/pulsepointBidAdapter.md +39 -45
  163. package/modules/sharedIdSystem.js +1 -1
  164. package/modules/sovrnBidAdapter.js +5 -1
  165. package/modules/stroeerCoreBidAdapter.js +2 -3
  166. package/modules/teadsBidAdapter.js +2 -0
  167. package/modules/topicsFpdModule.js +4 -1
  168. package/modules/topicsFpdModule.md +4 -0
  169. package/modules/userId/index.js +2 -2
  170. package/modules/vidazooBidAdapter.js +5 -7
  171. package/modules/voxBidAdapter.js +16 -5
  172. package/modules/yahoosspBidAdapter.js +38 -33
  173. package/modules/yahoosspBidAdapter.md +96 -95
  174. package/modules/yandexBidAdapter.js +12 -15
  175. package/package.json +1 -1
  176. package/src/activities/redactor.js +1 -1
  177. package/src/auction.js +24 -2
  178. package/src/constants.json +3 -1
  179. package/src/fpd/sua.js +8 -2
  180. package/test/spec/auctionmanager_spec.js +29 -1
  181. package/test/spec/fpd/enrichment_spec.js +7 -1
  182. package/test/spec/fpd/sua_spec.js +12 -0
  183. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  184. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  185. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  186. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  187. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  188. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  189. package/test/spec/modules/ixBidAdapter_spec.js +72 -0
  190. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  191. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  192. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  193. package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
  194. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  195. package/test/spec/modules/sovrnBidAdapter_spec.js +24 -4
  196. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  197. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  198. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  199. package/test/spec/modules/vidazooBidAdapter_spec.js +0 -5
  200. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  201. package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
  202. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  203. package/integrationExamples/gpt/inskin_example.html +0 -100
@@ -851,7 +851,7 @@ describe('sovrnBidAdapter', function() {
851
851
  url: `https://ap.lijit.com/beacon?gdpr_consent=${gdprConsent.consentString}&informer=13487408`,
852
852
  }
853
853
 
854
- const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, '')
854
+ const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, '', null)
855
855
 
856
856
  expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
857
857
  })
@@ -863,7 +863,22 @@ describe('sovrnBidAdapter', function() {
863
863
  url: `https://ap.lijit.com/beacon?us_privacy=${uspString}&informer=13487408`,
864
864
  }
865
865
 
866
- const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, null, uspString)
866
+ const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, null, uspString, null)
867
+
868
+ expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
869
+ })
870
+
871
+ it('should include gpp consent string if present', function() {
872
+ const gppConsent = {
873
+ applicableSections: [1, 2],
874
+ gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN'
875
+ }
876
+ const expectedReturnStatement = {
877
+ type: 'iframe',
878
+ url: `https://ap.lijit.com/beacon?gpp=${gppConsent.gppString}&gpp_sid=${gppConsent.applicableSections}&informer=13487408`,
879
+ }
880
+
881
+ const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, null, '', gppConsent)
867
882
 
868
883
  expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
869
884
  })
@@ -874,12 +889,17 @@ describe('sovrnBidAdapter', function() {
874
889
  consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A=='
875
890
  }
876
891
  const uspString = '1NYN'
892
+ const gppConsent = {
893
+ applicableSections: [1, 2],
894
+ gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN'
895
+ }
896
+
877
897
  const expectedReturnStatement = {
878
898
  type: 'iframe',
879
- url: `https://ap.lijit.com/beacon?gdpr_consent=${gdprConsent.consentString}&us_privacy=${uspString}&informer=13487408`,
899
+ url: `https://ap.lijit.com/beacon?gdpr_consent=${gdprConsent.consentString}&us_privacy=${uspString}&gpp=${gppConsent.gppString}&gpp_sid=${gppConsent.applicableSections}&informer=13487408`,
880
900
  }
881
901
 
882
- const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, uspString)
902
+ const returnStatement = spec.getUserSyncs(syncOptions, serverResponse, gdprConsent, uspString, gppConsent)
883
903
 
884
904
  expect(returnStatement[0]).to.deep.equal(expectedReturnStatement)
885
905
  })
@@ -3,6 +3,7 @@ import {spec} from 'modules/stroeerCoreBidAdapter.js';
3
3
  import * as utils from 'src/utils.js';
4
4
  import {BANNER, VIDEO} from '../../../src/mediaTypes.js';
5
5
  import {find} from 'src/polyfill.js';
6
+ import sinon from 'sinon';
6
7
 
7
8
  describe('stroeerCore bid adapter', function () {
8
9
  let sandbox;
@@ -51,8 +52,6 @@ describe('stroeerCore bid adapter', function () {
51
52
  assert.notProperty(bidObject, 'ad');
52
53
  }
53
54
 
54
- const AUCTION_ID = utils.getUniqueIdentifierStr();
55
-
56
55
  // Vendor user ids and associated data
57
56
  const userIds = Object.freeze({
58
57
  criteoId: 'criteo-user-id',
@@ -72,7 +71,6 @@ describe('stroeerCore bid adapter', function () {
72
71
  });
73
72
 
74
73
  const buildBidderRequest = () => ({
75
- auctionId: AUCTION_ID,
76
74
  bidderRequestId: 'bidder-request-id-123',
77
75
  bidderCode: 'stroeerCore',
78
76
  timeout: 5000,
@@ -394,6 +392,10 @@ describe('stroeerCore bid adapter', function () {
394
392
  clock.tick(13500);
395
393
  const bidReq = buildBidderRequest();
396
394
 
395
+ const UUID = 'fb6a39e3-083f-424c-9046-f1095e15f3d5';
396
+
397
+ const generateUUIDStub = sinon.stub(utils, 'generateUUID').returns(UUID);
398
+
397
399
  const serverRequestInfo = spec.buildRequests(bidReq.bids, bidReq);
398
400
 
399
401
  const expectedTimeout = bidderRequest.timeout - (13500 - bidderRequest.auctionStart);
@@ -401,7 +403,7 @@ describe('stroeerCore bid adapter', function () {
401
403
  assert.equal(expectedTimeout, 1500);
402
404
 
403
405
  const expectedJsonPayload = {
404
- 'id': AUCTION_ID,
406
+ 'id': UUID,
405
407
  'timeout': expectedTimeout,
406
408
  'ref': 'https://www.example.com/?search=monkey',
407
409
  'mpa': true,
@@ -429,8 +431,9 @@ describe('stroeerCore bid adapter', function () {
429
431
 
430
432
  // trim away fields with undefined
431
433
  const actualJsonPayload = JSON.parse(JSON.stringify(serverRequestInfo.data));
432
-
433
434
  assert.deepEqual(actualJsonPayload, expectedJsonPayload);
435
+
436
+ generateUUIDStub.restore();
434
437
  });
435
438
 
436
439
  describe('video bids', () => {
@@ -108,21 +108,21 @@ describe('teadsBidAdapter', () => {
108
108
  }
109
109
  ];
110
110
 
111
- let bidderResquestDefault = {
111
+ let bidderRequestDefault = {
112
112
  'auctionId': '1d1a030790a475',
113
113
  'bidderRequestId': '22edbae2733bf6',
114
114
  'timeout': 3000
115
115
  };
116
116
 
117
117
  it('should send bid request to ENDPOINT via POST', function() {
118
- const request = spec.buildRequests(bidRequests, bidderResquestDefault);
118
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
119
119
 
120
120
  expect(request.url).to.equal(ENDPOINT);
121
121
  expect(request.method).to.equal('POST');
122
122
  });
123
123
 
124
124
  it('should not send auctionId in bid request ', function() {
125
- const request = spec.buildRequests(bidRequests, bidderResquestDefault);
125
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
126
126
  const payload = JSON.parse(request.data);
127
127
 
128
128
  expect(payload.data[0].auctionId).to.not.exist
@@ -169,6 +169,55 @@ describe('teadsBidAdapter', () => {
169
169
  expect(payload.gdpr_iab.apiVersion).to.equal(2);
170
170
  });
171
171
 
172
+ it('should add videoPlcmt to payload', function () {
173
+ let bidRequestWithVideoPlcmt = Object.assign({}, bidRequests[0], {
174
+ mediaTypes: {
175
+ video: {
176
+ plcmt: 1
177
+ }
178
+ }
179
+ });
180
+
181
+ const request = spec.buildRequests([bidRequestWithVideoPlcmt], bidderRequestDefault);
182
+ const payload = JSON.parse(request.data);
183
+
184
+ expect(payload.data[0].videoPlcmt).to.exist;
185
+ expect(payload.data[0].videoPlcmt).to.equal(1);
186
+ });
187
+
188
+ it('should not add videoPlcmt to payload if empty', function () {
189
+ let bidRequestWithNullVideoPlcmt = Object.assign({}, bidRequests[0], {
190
+ mediaTypes: {
191
+ video: {
192
+ plcmt: null
193
+ }
194
+ }
195
+ });
196
+
197
+ let bidRequestWithEmptyVideoPlcmt = Object.assign({}, bidRequests[0], {
198
+ mediaTypes: {
199
+ video: {
200
+ plcmt: ''
201
+ }
202
+ }
203
+ });
204
+
205
+ const request1 = spec.buildRequests([bidRequestWithNullVideoPlcmt], bidderRequestDefault);
206
+ const request2 = spec.buildRequests([bidRequestWithEmptyVideoPlcmt], bidderRequestDefault);
207
+ const payload1 = JSON.parse(request1.data);
208
+ const payload2 = JSON.parse(request2.data);
209
+
210
+ expect(payload1.data[0].videoPlcmt).to.not.exist;
211
+ expect(payload2.data[0].videoPlcmt).to.not.exist;
212
+ });
213
+
214
+ it('should not add videoPlcmt to payload if it is not in bid request', function () {
215
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
216
+ const payload = JSON.parse(request.data);
217
+
218
+ expect(payload.data[0].videoPlcmt).to.not.exist;
219
+ });
220
+
172
221
  it('should add referer info to payload', function () {
173
222
  const bidRequest = Object.assign({}, bidRequests[0])
174
223
  const bidderRequest = {
@@ -186,7 +235,7 @@ describe('teadsBidAdapter', () => {
186
235
  });
187
236
 
188
237
  it('should add networkBandwidth info to payload', function () {
189
- const request = spec.buildRequests(bidRequests, bidderResquestDefault);
238
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
190
239
  const payload = JSON.parse(request.data);
191
240
 
192
241
  const bandwidth = window.navigator && window.navigator.connection && window.navigator.connection.downlink;
@@ -201,7 +250,7 @@ describe('teadsBidAdapter', () => {
201
250
  });
202
251
 
203
252
  it('should add pageReferrer info to payload', function () {
204
- const request = spec.buildRequests(bidRequests, bidderResquestDefault);
253
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
205
254
  const payload = JSON.parse(request.data);
206
255
 
207
256
  expect(payload.pageReferrer).to.exist;
@@ -209,7 +258,7 @@ describe('teadsBidAdapter', () => {
209
258
  });
210
259
 
211
260
  it('should add timeToFirstByte info to payload', function () {
212
- const request = spec.buildRequests(bidRequests, bidderResquestDefault);
261
+ const request = spec.buildRequests(bidRequests, bidderRequestDefault);
213
262
  const payload = JSON.parse(request.data);
214
263
  const performance = window.performance || window.webkitPerformance || window.msPerformance || window.mozPerformance;
215
264
 
@@ -410,7 +459,7 @@ describe('teadsBidAdapter', () => {
410
459
  }
411
460
  });
412
461
 
413
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
462
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
414
463
  const payload = JSON.parse(request.data);
415
464
 
416
465
  expect(payload.schain).to.exist;
@@ -458,7 +507,7 @@ describe('teadsBidAdapter', () => {
458
507
  }
459
508
  });
460
509
 
461
- const requestWithUserAgentClientHints = spec.buildRequests([bidRequest], bidderResquestDefault);
510
+ const requestWithUserAgentClientHints = spec.buildRequests([bidRequest], bidderRequestDefault);
462
511
  const payload = JSON.parse(requestWithUserAgentClientHints.data);
463
512
 
464
513
  expect(payload.userAgentClientHints).to.exist;
@@ -489,7 +538,7 @@ describe('teadsBidAdapter', () => {
489
538
  }
490
539
  );
491
540
 
492
- const defaultRequest = spec.buildRequests(bidRequests, bidderResquestDefault);
541
+ const defaultRequest = spec.buildRequests(bidRequests, bidderRequestDefault);
493
542
  expect(JSON.parse(defaultRequest.data).userAgentClientHints).to.not.exist;
494
543
  });
495
544
 
@@ -566,7 +615,7 @@ describe('teadsBidAdapter', () => {
566
615
  userId: {} // no property -> assumption that the system is disabled
567
616
  };
568
617
 
569
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
618
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
570
619
  const payload = JSON.parse(request.data);
571
620
 
572
621
  for (const userId in userIdModules) {
@@ -575,7 +624,7 @@ describe('teadsBidAdapter', () => {
575
624
  });
576
625
 
577
626
  it(`should not add param to payload if user id field is absent`, function () {
578
- const request = spec.buildRequests([baseBidRequest], bidderResquestDefault);
627
+ const request = spec.buildRequests([baseBidRequest], bidderRequestDefault);
579
628
  const payload = JSON.parse(request.data);
580
629
 
581
630
  for (const userId in userIdModules) {
@@ -592,7 +641,7 @@ describe('teadsBidAdapter', () => {
592
641
  }
593
642
  };
594
643
 
595
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
644
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
596
645
  const payload = JSON.parse(request.data);
597
646
 
598
647
  expect(payload).not.to.have.property('liveRampId');
@@ -612,7 +661,7 @@ describe('teadsBidAdapter', () => {
612
661
  userId: userIdObject
613
662
  };
614
663
 
615
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
664
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
616
665
  const payload = JSON.parse(request.data);
617
666
 
618
667
  expect(payload['unifiedId2']).to.equal('unifiedId2-id');
@@ -641,7 +690,7 @@ describe('teadsBidAdapter', () => {
641
690
  }
642
691
  };
643
692
 
644
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
693
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
645
694
  const payload = JSON.parse(request.data);
646
695
 
647
696
  expect(payload).not.to.have.property('firstPartyCookieTeadsId');
@@ -659,7 +708,7 @@ describe('teadsBidAdapter', () => {
659
708
  }
660
709
  };
661
710
 
662
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
711
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
663
712
  const payload = JSON.parse(request.data);
664
713
 
665
714
  expect(payload).not.to.have.property('firstPartyCookieTeadsId');
@@ -677,7 +726,7 @@ describe('teadsBidAdapter', () => {
677
726
  }
678
727
  };
679
728
 
680
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
729
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
681
730
 
682
731
  const payload = JSON.parse(request.data);
683
732
 
@@ -697,7 +746,7 @@ describe('teadsBidAdapter', () => {
697
746
  }
698
747
  };
699
748
 
700
- const request = spec.buildRequests([bidRequest], bidderResquestDefault);
749
+ const request = spec.buildRequests([bidRequest], bidderRequestDefault);
701
750
 
702
751
  const payload = JSON.parse(request.data);
703
752
 
@@ -750,7 +799,7 @@ describe('teadsBidAdapter', () => {
750
799
  };
751
800
  }
752
801
  );
753
- const request = spec.buildRequests(updatedBidRequests, bidderResquestDefault);
802
+ const request = spec.buildRequests(updatedBidRequests, bidderRequestDefault);
754
803
  const payload = JSON.parse(request.data);
755
804
 
756
805
  expect(payload.data[0].gpid).to.equal('1111/home-left-0');
@@ -767,7 +816,7 @@ describe('teadsBidAdapter', () => {
767
816
  }
768
817
  }));
769
818
 
770
- const request = spec.buildRequests(updatedBidRequests, bidderResquestDefault);
819
+ const request = spec.buildRequests(updatedBidRequests, bidderRequestDefault);
771
820
  const payload = JSON.parse(request.data);
772
821
 
773
822
  return payload.data.forEach(bid => {
@@ -784,7 +833,7 @@ describe('teadsBidAdapter', () => {
784
833
  }
785
834
  }));
786
835
 
787
- const request = spec.buildRequests(updatedBidRequests, bidderResquestDefault);
836
+ const request = spec.buildRequests(updatedBidRequests, bidderRequestDefault);
788
837
  const payload = JSON.parse(request.data);
789
838
 
790
839
  return payload.data.forEach(bid => {
@@ -795,7 +844,7 @@ describe('teadsBidAdapter', () => {
795
844
 
796
845
  function checkMediaTypesSizes(mediaTypes, expectedSizes) {
797
846
  const bidRequestWithBannerSizes = Object.assign(bidRequests[0], mediaTypes);
798
- const requestWithBannerSizes = spec.buildRequests([bidRequestWithBannerSizes], bidderResquestDefault);
847
+ const requestWithBannerSizes = spec.buildRequests([bidRequestWithBannerSizes], bidderRequestDefault);
799
848
  const payloadWithBannerSizes = JSON.parse(requestWithBannerSizes.data);
800
849
 
801
850
  return payloadWithBannerSizes.data.forEach(bid => {
@@ -372,11 +372,16 @@ describe('getCachedTopics()', () => {
372
372
  }
373
373
  ];
374
374
 
375
- const evt = {
375
+ const evt_pm = {
376
376
  data: '{"segment":{"domain":"ads.pubmatic.com","topics":[{"configVersion":"chrome.1","modelVersion":"2206021246","taxonomyVersion":"1","topic":165,"version":"chrome.1:1:2206021246"}],"bidder":"pubmatic"},"date":1669743901858}',
377
377
  origin: 'https://ads.pubmatic.com'
378
378
  };
379
379
 
380
+ const evt_rh = {
381
+ data: '{"segment":{"domain":"topics.authorizedvault.com","topics":[{"configVersion":"chrome.1","modelVersion":"2206021246","taxonomyVersion":"1","topic":165,"version":"chrome.1:1:2206021246"}],"bidder":"rtbhouse"},"date":1669743901858}',
382
+ origin: 'https://topics.authorizedvault.com'
383
+ };
384
+
380
385
  let gdprDataHdlrStub;
381
386
  beforeEach(() => {
382
387
  gdprDataHdlrStub = sinon.stub(gdprDataHandler, 'getConsentData');
@@ -413,9 +418,10 @@ describe('getCachedTopics()', () => {
413
418
  it('should stored segments if receiveMessage event is triggerred with segment data', () => {
414
419
  return processFpd({}, {global: {}}, {data: Promise.resolve(mockData)})
415
420
  .then(({global}) => {
416
- receiveMessage(evt);
421
+ receiveMessage(evt_pm);
422
+ receiveMessage(evt_rh);
417
423
  let segments = new Map(safeJSONParse(storage.getDataFromLocalStorage(topicStorageName)));
418
- expect(segments.has('pubmatic')).to.equal(true);
424
+ expect(segments.has('pubmatic') || segments.has('rtbhouse')).to.equal(true);
419
425
  });
420
426
  });
421
427
 
@@ -424,7 +430,7 @@ describe('getCachedTopics()', () => {
424
430
  storage.setDataInLocalStorage(topicStorageName, storedSegments);
425
431
  return processFpd({}, {global: {}}, {data: Promise.resolve(mockData)})
426
432
  .then(({global}) => {
427
- receiveMessage(evt);
433
+ receiveMessage(evt_pm);
428
434
  let segments = new Map(safeJSONParse(storage.getDataFromLocalStorage(topicStorageName)));
429
435
  expect(segments.get('pubmatic')[2206021246].segment.length).to.equal(1);
430
436
  });
@@ -40,7 +40,6 @@ const BID = {
40
40
  'placementCode': 'div-gpt-ad-1460505748561-0',
41
41
  'sizes': [[300, 250], [300, 600]],
42
42
  'bidderRequestId': '1fdb5ff1b6eaa7',
43
- 'auctionId': 'auction_id',
44
43
  'bidRequestsCount': 4,
45
44
  'bidderRequestsCount': 3,
46
45
  'bidderWinsCount': 1,
@@ -64,7 +63,6 @@ const VIDEO_BID = {
64
63
  tid: '56e184c6-bde9-497b-b9b9-cf47a61381ee',
65
64
  }
66
65
  },
67
- 'auctionId': 'auction_id',
68
66
  'bidRequestsCount': 4,
69
67
  'bidderRequestsCount': 3,
70
68
  'bidderWinsCount': 1,
@@ -288,7 +286,6 @@ describe('VidazooBidAdapter', function () {
288
286
  usPrivacy: 'consent_string',
289
287
  gppString: 'gpp_string',
290
288
  gppSid: [7],
291
- auctionId: 'auction_id',
292
289
  bidRequestsCount: 4,
293
290
  bidderRequestsCount: 3,
294
291
  bidderWinsCount: 1,
@@ -362,7 +359,6 @@ describe('VidazooBidAdapter', function () {
362
359
  usPrivacy: 'consent_string',
363
360
  gppString: 'gpp_string',
364
361
  gppSid: [7],
365
- auctionId: 'auction_id',
366
362
  bidRequestsCount: 4,
367
363
  bidderRequestsCount: 3,
368
364
  bidderWinsCount: 1,
@@ -436,7 +432,6 @@ describe('VidazooBidAdapter', function () {
436
432
  usPrivacy: 'consent_string',
437
433
  gppString: 'gpp_string',
438
434
  gppSid: [7],
439
- auctionId: 'auction_id',
440
435
  bidRequestsCount: 4,
441
436
  bidderRequestsCount: 3,
442
437
  bidderWinsCount: 1,
@@ -1,5 +1,6 @@
1
1
  import { expect } from 'chai'
2
2
  import { spec } from 'modules/voxBidAdapter.js'
3
+ import {config} from 'src/config.js'
3
4
 
4
5
  function getSlotConfigs(mediaTypes, params) {
5
6
  return {
@@ -175,6 +176,98 @@ describe('VOX Adapter', function() {
175
176
  expect(bid.transactionId).to.equal('31a58515-3634-4e90-9c96-f86196db1459')
176
177
  })
177
178
  })
179
+ it('should not set userid if not specified', function () {
180
+ const request = spec.buildRequests(validBidRequests, bidderRequest)
181
+ const data = JSON.parse(request.data)
182
+ data.bidRequests.forEach(bid => {
183
+ expect(bid.userId).to.be.undefined
184
+ })
185
+ })
186
+
187
+ it('should set userid if specified', function () {
188
+ const requests = validBidRequests.map(bid => ({
189
+ ...bid,
190
+ userId: {
191
+ tdid: 'TDID_USER_ID',
192
+ pubcid: 'PUBID_USER_ID'
193
+ }
194
+ }))
195
+ const request = spec.buildRequests(requests, bidderRequest)
196
+ const data = JSON.parse(request.data)
197
+ data.bidRequests.forEach(bid => {
198
+ expect(bid.userId.tdid).to.equal('TDID_USER_ID')
199
+ expect(bid.userId.pubcid).to.equal('PUBID_USER_ID')
200
+ })
201
+ })
202
+
203
+ it('should not set schain if not specified', function () {
204
+ const request = spec.buildRequests(validBidRequests, bidderRequest)
205
+ const data = JSON.parse(request.data)
206
+ data.bidRequests.forEach(bid => {
207
+ expect(bid.schain).to.be.undefined
208
+ })
209
+ })
210
+
211
+ it('should set schain if not specified', function () {
212
+ const requests = validBidRequests.map(bid => ({
213
+ ...bid,
214
+ schain: {
215
+ validation: 'strict',
216
+ config: {
217
+ ver: '1.0'
218
+ }
219
+ }
220
+ }))
221
+ const request = spec.buildRequests(requests, bidderRequest)
222
+ const data = JSON.parse(request.data)
223
+ data.bidRequests.forEach(bid => {
224
+ expect(bid.schain.validation).to.equal('strict')
225
+ expect(bid.schain.config.ver).to.equal('1.0')
226
+ })
227
+ })
228
+
229
+ describe('price floors', function () {
230
+ it('should be empty if floors module not configured', function () {
231
+ const request = spec.buildRequests(validBidRequests, bidderRequest)
232
+ const data = JSON.parse(request.data)
233
+ data.bidRequests.forEach(bid => {
234
+ expect(bid.floorInfo).to.be.empty
235
+ })
236
+ })
237
+
238
+ it('should add correct floor values', function () {
239
+ const expectedFloors = [ 2, 2.7, 1.4 ]
240
+ const validBidRequests = expectedFloors.map(getBidWithFloor)
241
+ const request = spec.buildRequests(validBidRequests, bidderRequest)
242
+ const data = JSON.parse(request.data)
243
+ expectedFloors.forEach((floor, index) => {
244
+ expect(data.bidRequests[index].floorInfo.floor).to.equal(floor)
245
+ expect(data.bidRequests[index].floorInfo.currency).to.equal('USD')
246
+ })
247
+ })
248
+
249
+ it('should request floor price in adserver currency', function () {
250
+ const configCurrency = 'DKK'
251
+ config.setConfig({ currency: { adServerCurrency: configCurrency } })
252
+ const request = spec.buildRequests([ getBidWithFloor() ], bidderRequest)
253
+ const data = JSON.parse(request.data)
254
+ data.bidRequests.forEach(bid => {
255
+ expect(bid.floorInfo.currency).to.equal(configCurrency)
256
+ })
257
+ })
258
+
259
+ function getBidWithFloor(floor) {
260
+ return {
261
+ ...validBidRequests[0],
262
+ getFloor: ({ currency }) => {
263
+ return {
264
+ currency: currency,
265
+ floor
266
+ }
267
+ }
268
+ }
269
+ }
270
+ })
178
271
 
179
272
  describe('GDPR params', function() {
180
273
  describe('when there are not consent management platform', function() {