prebid.js 7.3.0 → 7.6.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 (225) hide show
  1. package/.circleci/config.yml +11 -6
  2. package/dist/33acrossBidAdapter.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/adnuntiusBidAdapter.js +1 -1
  7. package/dist/adotBidAdapter.js +1 -1
  8. package/dist/adpod.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adrinoBidAdapter.js +1 -1
  11. package/dist/adtelligentBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.js +1 -1
  13. package/dist/ajaBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/asoBidAdapter.js +1 -1
  19. package/dist/atsAnalyticsAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/byDataAnalyticsAdapter.js +1 -1
  26. package/dist/concertBidAdapter.js +1 -1
  27. package/dist/connectadBidAdapter.js +1 -1
  28. package/dist/consumableBidAdapter.js +1 -1
  29. package/dist/conversantBidAdapter.js +1 -1
  30. package/dist/craftBidAdapter.js +1 -1
  31. package/dist/criteoBidAdapter.js +1 -1
  32. package/dist/debugging-standalone.js +1 -1
  33. package/dist/debugging.js +1 -1
  34. package/dist/dspxBidAdapter.js +1 -1
  35. package/dist/eplanningBidAdapter.js +1 -1
  36. package/dist/finativeBidAdapter.js +1 -1
  37. package/dist/gdprEnforcement.js +1 -1
  38. package/dist/glimpseBidAdapter.js +1 -1
  39. package/dist/gmosspBidAdapter.js +1 -1
  40. package/dist/goldbachBidAdapter.js +1 -1
  41. package/dist/gridBidAdapter.js +1 -1
  42. package/dist/gridNMBidAdapter.js +1 -1
  43. package/dist/gumgumBidAdapter.js +1 -1
  44. package/dist/h12mediaBidAdapter.js +1 -1
  45. package/dist/hadronIdSystem.js +1 -1
  46. package/dist/hadronRtdProvider.js +1 -1
  47. package/dist/id5IdSystem.js +1 -1
  48. package/dist/imRtdProvider.js +1 -1
  49. package/dist/improvedigitalBidAdapter.js +1 -1
  50. package/dist/inmarBidAdapter.js +1 -1
  51. package/dist/insticatorBidAdapter.js +1 -1
  52. package/dist/ixBidAdapter.js +1 -1
  53. package/dist/justpremiumBidAdapter.js +1 -1
  54. package/dist/kargoAnalyticsAdapter.js +1 -1
  55. package/dist/kargoBidAdapter.js +1 -1
  56. package/dist/konduitAnalyticsAdapter.js +1 -1
  57. package/dist/kueezBidAdapter.js +1 -1
  58. package/dist/lassoBidAdapter.js +1 -1
  59. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  60. package/dist/logicadBidAdapter.js +1 -1
  61. package/dist/loglyliftBidAdapter.js +1 -1
  62. package/dist/malltvAnalyticsAdapter.js +1 -1
  63. package/dist/marsmediaBidAdapter.js +1 -1
  64. package/dist/mediafuseBidAdapter.js +1 -1
  65. package/dist/mediasquareBidAdapter.js +1 -1
  66. package/dist/mgidBidAdapter.js +1 -1
  67. package/dist/minutemediaBidAdapter.js +1 -1
  68. package/dist/missenaBidAdapter.js +1 -1
  69. package/dist/newspassidBidAdapter.js +1 -0
  70. package/dist/nextMillenniumBidAdapter.js +1 -1
  71. package/dist/not-for-prod/prebid.js +131 -127
  72. package/dist/oguryBidAdapter.js +1 -1
  73. package/dist/onetagBidAdapter.js +1 -1
  74. package/dist/ooloAnalyticsAdapter.js +1 -1
  75. package/dist/openxOrtbBidAdapter.js +1 -0
  76. package/dist/outbrainBidAdapter.js +1 -1
  77. package/dist/parrableIdSystem.js +1 -1
  78. package/dist/pixfutureBidAdapter.js +1 -1
  79. package/dist/prebid-core.js +2 -2
  80. package/dist/priceFloors.js +1 -1
  81. package/dist/pubCommonId.js +1 -1
  82. package/dist/publinkIdSystem.js +1 -1
  83. package/dist/pubmaticBidAdapter.js +1 -1
  84. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  85. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  86. package/dist/pxyzBidAdapter.js +1 -1
  87. package/dist/quantcastBidAdapter.js +1 -1
  88. package/dist/rasBidAdapter.js +1 -0
  89. package/dist/readpeakBidAdapter.js +1 -1
  90. package/dist/relaidoBidAdapter.js +1 -1
  91. package/dist/rhythmoneBidAdapter.js +1 -1
  92. package/dist/riseBidAdapter.js +1 -1
  93. package/dist/rubiconAnalyticsAdapter.js +1 -1
  94. package/dist/rubiconBidAdapter.js +1 -1
  95. package/dist/seedingAllianceBidAdapter.js +1 -1
  96. package/dist/seedtagBidAdapter.js +1 -1
  97. package/dist/sharedIdSystem.js +1 -1
  98. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  99. package/dist/sharethroughBidAdapter.js +1 -1
  100. package/dist/shinezBidAdapter.js +1 -0
  101. package/dist/sizeMappingV2.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/sublimeBidAdapter.js +1 -1
  111. package/dist/synacormediaBidAdapter.js +1 -1
  112. package/dist/taboolaBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/trionBidAdapter.js +1 -1
  116. package/dist/tripleliftBidAdapter.js +1 -1
  117. package/dist/ttdBidAdapter.js +1 -1
  118. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  119. package/dist/underdogmediaBidAdapter.js +1 -1
  120. package/dist/undertoneBidAdapter.js +1 -1
  121. package/dist/ventesBidAdapter.js +1 -1
  122. package/dist/vidazooBidAdapter.js +1 -1
  123. package/dist/videobyteBidAdapter.js +1 -1
  124. package/dist/visxBidAdapter.js +1 -1
  125. package/dist/vrtcalBidAdapter.js +1 -1
  126. package/dist/vuukleBidAdapter.js +1 -1
  127. package/dist/widespaceBidAdapter.js +1 -1
  128. package/dist/winrBidAdapter.js +1 -1
  129. package/dist/yahoosspBidAdapter.js +1 -1
  130. package/dist/yieldmoBidAdapter.js +1 -1
  131. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  132. package/gulpfile.js +1 -1
  133. package/karma.conf.maker.js +3 -1
  134. package/modules/adgenerationBidAdapter.js +24 -1
  135. package/modules/adnuntiusBidAdapter.js +26 -8
  136. package/modules/adotBidAdapter.js +13 -4
  137. package/modules/adrinoBidAdapter.js +10 -2
  138. package/modules/adrinoBidAdapter.md +6 -0
  139. package/modules/adtelligentBidAdapter.js +2 -1
  140. package/modules/appnexusBidAdapter.js +3 -3
  141. package/modules/atsAnalyticsAdapter.js +4 -5
  142. package/modules/byDataAnalyticsAdapter.js +172 -74
  143. package/modules/byDataAnalyticsAdapter.md +5 -6
  144. package/modules/consumableBidAdapter.js +12 -1
  145. package/modules/criteoBidAdapter.js +7 -1
  146. package/modules/cwireBidAdapter.md +1 -1
  147. package/modules/debugging/bidInterceptor.js +1 -1
  148. package/modules/debugging/index.js +2 -1
  149. package/modules/eplanningBidAdapter.js +82 -97
  150. package/modules/gdprEnforcement.js +8 -14
  151. package/modules/gridNMBidAdapter.js +45 -4
  152. package/modules/hadronAnalyticsAdapter.md +5 -5
  153. package/modules/hadronIdSystem.js +18 -5
  154. package/modules/hadronIdSystem.md +15 -11
  155. package/modules/hadronRtdProvider.js +14 -1
  156. package/modules/hadronRtdProvider.md +17 -13
  157. package/modules/imRtdProvider.js +0 -8
  158. package/modules/insticatorBidAdapter.js +9 -0
  159. package/modules/ixBidAdapter.js +462 -58
  160. package/modules/ixBidAdapter.md +95 -5
  161. package/modules/kargoAnalyticsAdapter.js +88 -6
  162. package/modules/kargoAnalyticsAdapter.md +33 -0
  163. package/modules/kargoBidAdapter.js +1 -2
  164. package/modules/minutemediaBidAdapter.js +1 -0
  165. package/modules/missenaBidAdapter.js +20 -2
  166. package/modules/newspassidBidAdapter.js +649 -0
  167. package/modules/nextMillenniumBidAdapter.js +17 -1
  168. package/modules/oguryBidAdapter.js +2 -0
  169. package/modules/openxBidAdapter.md +3 -1
  170. package/modules/openxOrtbBidAdapter.js +349 -0
  171. package/modules/openxOrtbBidAdapter.md +105 -0
  172. package/modules/priceFloors.js +1 -1
  173. package/modules/pubCommonId.js +1 -2
  174. package/modules/pubxaiAnalyticsAdapter.js +6 -1
  175. package/modules/rasBidAdapter.js +149 -0
  176. package/modules/rasBidAdapter.md +50 -0
  177. package/modules/readpeakBidAdapter.js +15 -6
  178. package/modules/relaidoBidAdapter.js +19 -4
  179. package/modules/seedtagBidAdapter.js +37 -1
  180. package/modules/sharedIdSystem.js +11 -5
  181. package/modules/sharethroughBidAdapter.js +9 -24
  182. package/modules/shinezBidAdapter.js +435 -0
  183. package/modules/shinezBidAdapter.md +76 -0
  184. package/modules/taboolaBidAdapter.js +1 -1
  185. package/modules/taboolaBidAdapter.md +3 -3
  186. package/modules/ventesBidAdapter.js +1 -1
  187. package/modules/ventesBidAdapter.md +1 -1
  188. package/modules/vrtcalBidAdapter.js +35 -0
  189. package/package.json +1 -1
  190. package/plugins/pbjsGlobals.js +2 -1
  191. package/src/storageManager.js +4 -5
  192. package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
  193. package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
  194. package/test/spec/modules/adotBidAdapter_spec.js +12 -9
  195. package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
  196. package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
  197. package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
  198. package/test/spec/modules/consumableBidAdapter_spec.js +75 -0
  199. package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
  200. package/test/spec/modules/debugging_mod_spec.js +7 -0
  201. package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
  202. package/test/spec/modules/gdprEnforcement_spec.js +53 -100
  203. package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
  204. package/test/spec/modules/hadronIdSystem_spec.js +2 -2
  205. package/test/spec/modules/imRtdProvider_spec.js +0 -1
  206. package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
  207. package/test/spec/modules/ixBidAdapter_spec.js +470 -10
  208. package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
  209. package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
  210. package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
  211. package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
  212. package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
  213. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
  214. package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
  215. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
  216. package/test/spec/modules/rasBidAdapter_spec.js +190 -0
  217. package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
  218. package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
  219. package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
  220. package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
  221. package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
  222. package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
  223. package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
  224. package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
  225. package/webpack.conf.js +1 -1
@@ -101,6 +101,41 @@ describe('AdgenerationAdapter', function () {
101
101
  snowflake: {'id': 'novatiqId', syncResponse: 1}
102
102
  }
103
103
  }
104
+ },
105
+ { // bannerWithAdgextCriteoId
106
+ bidder: 'adg',
107
+ params: {
108
+ id: '58278', // banner
109
+ },
110
+ adUnitCode: 'adunit-code',
111
+ sizes: [[320, 100]],
112
+ bidId: '2f6ac468a9c15e',
113
+ bidderRequestId: '14a9f773e30243',
114
+ auctionId: '4aae9f05-18c6-4fcd-80cf-282708cd584a',
115
+ transactionTd: 'f76f6dfd-d64f-4645-a29f-682bac7f431a',
116
+ userId: {
117
+ criteoId: 'criteo-id-test-1234567890'
118
+ }
119
+ },
120
+ { // bannerWithAdgextId5Id
121
+ bidder: 'adg',
122
+ params: {
123
+ id: '58278', // banner
124
+ },
125
+ adUnitCode: 'adunit-code',
126
+ sizes: [[320, 100]],
127
+ bidId: '2f6ac468a9c15e',
128
+ bidderRequestId: '14a9f773e30243',
129
+ auctionId: '4aae9f05-18c6-4fcd-80cf-282708cd584a',
130
+ transactionTd: 'f76f6dfd-d64f-4645-a29f-682bac7f431a',
131
+ userId: {
132
+ id5id: {
133
+ ext: {
134
+ linkType: 2
135
+ },
136
+ uid: 'id5-id-test-1234567890'
137
+ }
138
+ }
104
139
  }
105
140
  ];
106
141
  const bidderRequest = {
@@ -109,10 +144,12 @@ describe('AdgenerationAdapter', function () {
109
144
  }
110
145
  };
111
146
  const data = {
112
- banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com`,
113
- bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com`,
114
- native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.3.0&tp=https%3A%2F%2Fexample.com`,
115
- bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.3.0&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
147
+ banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com`,
148
+ bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com`,
149
+ native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&tp=https%3A%2F%2Fexample.com`,
150
+ bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
151
+ bannerWithAdgextCriteoId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com`,
152
+ bannerWithAdgextId5Id: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.4.0&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&imark=1&tp=https%3A%2F%2Fexample.com`,
116
153
  };
117
154
  it('sends bid request to ENDPOINT via GET', function () {
118
155
  const request = spec.buildRequests(bidRequests, bidderRequest)[0];
@@ -149,6 +186,17 @@ describe('AdgenerationAdapter', function () {
149
186
  });
150
187
  expect(request.data).to.equal(data.bannerWithHyperId);
151
188
  });
189
+
190
+ it('should attache params to the bannerWithAdgextCriteoId request', function () {
191
+ const request = spec.buildRequests(bidRequests, bidderRequest)[3];
192
+ expect(request.data).to.equal(data.bannerWithAdgextCriteoId);
193
+ });
194
+
195
+ it('should attache params to the bannerWithAdgextId5Id request', function () {
196
+ const request = spec.buildRequests(bidRequests, bidderRequest)[4];
197
+ expect(request.data).to.equal(data.bannerWithAdgextId5Id);
198
+ });
199
+
152
200
  it('allows setConfig to set bidder currency for JPY', function () {
153
201
  config.setConfig({
154
202
  currency: {
@@ -11,7 +11,7 @@ describe('adnuntiusBidAdapter', function () {
11
11
  const GVLID = 855;
12
12
  const usi = utils.generateUUID()
13
13
  const meta = [{ key: 'usi', value: usi }]
14
- const storage = getStorageManager({gvlid: GVLID, moduleName: 'adnuntius'})
14
+ const storage = getStorageManager({ gvlid: GVLID, moduleName: 'adnuntius' })
15
15
  storage.setDataInLocalStorage('adn.metaData', JSON.stringify(meta))
16
16
 
17
17
  beforeEach(function () {
@@ -29,12 +29,13 @@ describe('adnuntiusBidAdapter', function () {
29
29
 
30
30
  const tzo = new Date().getTimezoneOffset();
31
31
  const ENDPOINT_URL = `${URL}${tzo}&format=json&userId=${usi}`;
32
+ const ENDPOINT_URL_VIDEO = `${URL}${tzo}&format=json&userId=${usi}&tt=vast4`;
32
33
  const ENDPOINT_URL_NOCOOKIE = `${URL}${tzo}&format=json&userId=${usi}&noCookies=true`;
33
34
  const ENDPOINT_URL_SEGMENTS = `${URL}${tzo}&format=json&segments=segment1,segment2,segment3&userId=${usi}`;
34
35
  const ENDPOINT_URL_CONSENT = `${URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
35
36
  const adapter = newBidder(spec);
36
37
 
37
- const bidRequests = [
38
+ const bidderRequests = [
38
39
  {
39
40
  bidId: '123',
40
41
  bidder: 'adnuntius',
@@ -46,6 +47,23 @@ describe('adnuntiusBidAdapter', function () {
46
47
  }
47
48
  ]
48
49
 
50
+ const videoBidderRequest = [
51
+ {
52
+ bidId: '123',
53
+ bidder: 'adnuntius',
54
+ params: {
55
+ auId: '8b6bc',
56
+ network: 'adnuntius',
57
+ },
58
+ mediaTypes: {
59
+ video: {
60
+ playerSize: [640, 480],
61
+ context: 'instream'
62
+ }
63
+ },
64
+ }
65
+ ]
66
+
49
67
  const singleBidRequest = {
50
68
  bid: [
51
69
  {
@@ -54,6 +72,10 @@ describe('adnuntiusBidAdapter', function () {
54
72
  ]
55
73
  }
56
74
 
75
+ const videoBidRequest = {
76
+ bid: videoBidderRequest
77
+ }
78
+
57
79
  const serverResponse = {
58
80
  body: {
59
81
  'adUnits': [
@@ -117,6 +139,69 @@ describe('adnuntiusBidAdapter', function () {
117
139
  ]
118
140
  }
119
141
  }
142
+ const serverVideoResponse = {
143
+ body: {
144
+ 'adUnits': [
145
+ {
146
+ 'auId': '000000000008b6bc',
147
+ 'targetId': '123',
148
+ 'html': '<h1>hi!</h1>',
149
+ 'matchedAdCount': 1,
150
+ 'responseId': 'adn-rsp-1460129238',
151
+ 'ads': [
152
+ {
153
+ 'destinationUrlEsc': 'https%3A%2F%2Fdelivery.adnuntius.com%2Fc%2F52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN%3Fct%3D2501%26r%3Dhttp%253A%252F%252Fgoogle.com',
154
+ 'assets': {
155
+ 'image': {
156
+ 'cdnId': 'https://assets.adnuntius.com/oEmZa5uYjxENfA1R692FVn6qIveFpO8wUbpyF2xSOCc.jpg',
157
+ 'width': '980',
158
+ 'height': '120'
159
+ }
160
+ },
161
+ 'clickUrl': 'https://delivery.adnuntius.com/c/52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
162
+ 'urls': {
163
+ 'destination': 'https://delivery.adnuntius.com/c/52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN?ct=2501&r=http%3A%2F%2Fgoogle.com'
164
+ },
165
+ 'urlsEsc': {
166
+ 'destination': 'https%3A%2F%2Fdelivery.adnuntius.com%2Fc%2F52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN%3Fct%3D2501%26r%3Dhttp%253A%252F%252Fgoogle.com'
167
+ },
168
+ 'destinationUrls': {
169
+ 'destination': 'http://google.com'
170
+ },
171
+ 'cpm': { 'amount': 5.0, 'currency': 'NOK' },
172
+ 'bid': { 'amount': 0.005, 'currency': 'NOK' },
173
+ 'cost': { 'amount': 0.005, 'currency': 'NOK' },
174
+ 'impressionTrackingUrls': [],
175
+ 'impressionTrackingUrlsEsc': [],
176
+ 'adId': 'adn-id-1347343135',
177
+ 'selectedColumn': '0',
178
+ 'selectedColumnPosition': '0',
179
+ 'renderedPixel': 'https://delivery.adnuntius.com/b/52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN.html',
180
+ 'renderedPixelEsc': 'https%3A%2F%2Fdelivery.adnuntius.com%2Fb%2F52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN.html',
181
+ 'visibleUrl': 'https://delivery.adnuntius.com/s?rt=52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
182
+ 'visibleUrlEsc': 'https%3A%2F%2Fdelivery.adnuntius.com%2Fs%3Frt%3D52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
183
+ 'viewUrl': 'https://delivery.adnuntius.com/v?rt=52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
184
+ 'viewUrlEsc': 'https%3A%2F%2Fdelivery.adnuntius.com%2Fv%3Frt%3D52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
185
+ 'rt': '52AHNuxCqxB_Y9ZP9ERWkMBPCOha4zuV3aKn5cog5jsAAAAQCtjQz9kbGWD4nuZy3q6HaHGLB4-k_fySWECIOOmHKY6iokgHNFH-U57ew_-1QHlKnFr2NT8y4QK1oU5HxnDLbYPz-GmQ3C2JyxLGpKmIb-P-3bm7HYPEreNjPdhjRG51A8NGuc4huUhns7nEUejHuOjOHE5sV1zfYxCRWRx9wPDN9EUCC7KN',
186
+ 'creativeWidth': '980',
187
+ 'creativeHeight': '120',
188
+ 'creativeId': 'wgkq587vgtpchsx1',
189
+ 'lineItemId': 'scyjdyv3mzgdsnpf',
190
+ 'layoutId': 'sw6gtws2rdj1kwby',
191
+ 'layoutName': 'Responsive image'
192
+ },
193
+
194
+ ]
195
+ },
196
+ {
197
+ 'auId': '000000000008b6bc',
198
+ 'targetId': '456',
199
+ 'matchedAdCount': 0,
200
+ 'responseId': 'adn-rsp-1460129238',
201
+ }
202
+ ]
203
+ }
204
+ }
120
205
 
121
206
  describe('inherited functions', function () {
122
207
  it('exists and is a function', function () {
@@ -126,13 +211,13 @@ describe('adnuntiusBidAdapter', function () {
126
211
 
127
212
  describe('isBidRequestValid', function () {
128
213
  it('should return true when required params found', function () {
129
- expect(spec.isBidRequestValid(bidRequests[0])).to.equal(true);
214
+ expect(spec.isBidRequestValid(bidderRequests[0])).to.equal(true);
130
215
  });
131
216
  });
132
217
 
133
218
  describe('buildRequests', function () {
134
219
  it('Test requests', function () {
135
- const request = spec.buildRequests(bidRequests, {});
220
+ const request = spec.buildRequests(bidderRequests, {});
136
221
  expect(request.length).to.equal(1);
137
222
  expect(request[0]).to.have.property('bid');
138
223
  const bid = request[0].bid[0]
@@ -143,6 +228,16 @@ describe('adnuntiusBidAdapter', function () {
143
228
  expect(request[0].data).to.equal('{\"adUnits\":[{\"auId\":\"8b6bc\",\"targetId\":\"123\"}],\"metaData\":{\"usi\":\"' + usi + '\"}}');
144
229
  });
145
230
 
231
+ it('Test Video requests', function () {
232
+ const request = spec.buildRequests(videoBidderRequest, {});
233
+ expect(request.length).to.equal(1);
234
+ expect(request[0]).to.have.property('bid');
235
+ const bid = request[0].bid[0]
236
+ expect(bid).to.have.property('bidId');
237
+ expect(request[0]).to.have.property('url');
238
+ expect(request[0].url).to.equal(ENDPOINT_URL_VIDEO);
239
+ });
240
+
146
241
  it('should pass segments if available in config', function () {
147
242
  const ortb2 = {
148
243
  user: {
@@ -157,7 +252,7 @@ describe('adnuntiusBidAdapter', function () {
157
252
  }
158
253
  };
159
254
 
160
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {ortb2}));
255
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, { ortb2 }));
161
256
  expect(request.length).to.equal(1);
162
257
  expect(request[0]).to.have.property('url')
163
258
  expect(request[0].url).to.equal(ENDPOINT_URL_SEGMENTS);
@@ -179,7 +274,7 @@ describe('adnuntiusBidAdapter', function () {
179
274
  }
180
275
  };
181
276
 
182
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {ortb2}));
277
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, { ortb2 }));
183
278
  expect(request.length).to.equal(1);
184
279
  expect(request[0]).to.have.property('url')
185
280
  expect(request[0].url).to.equal(ENDPOINT_URL_SEGMENTS);
@@ -188,14 +283,14 @@ describe('adnuntiusBidAdapter', function () {
188
283
 
189
284
  describe('user privacy', function () {
190
285
  it('should send GDPR Consent data if gdprApplies', function () {
191
- let request = spec.buildRequests(bidRequests, { gdprConsent: { gdprApplies: true, consentString: 'consentString' } });
286
+ let request = spec.buildRequests(bidderRequests, { gdprConsent: { gdprApplies: true, consentString: 'consentString' } });
192
287
  expect(request.length).to.equal(1);
193
288
  expect(request[0]).to.have.property('url')
194
289
  expect(request[0].url).to.equal(ENDPOINT_URL_CONSENT);
195
290
  });
196
291
 
197
292
  it('should not send GDPR Consent data if gdprApplies equals undefined', function () {
198
- let request = spec.buildRequests(bidRequests, { gdprConsent: { gdprApplies: undefined, consentString: 'consentString' } });
293
+ let request = spec.buildRequests(bidderRequests, { gdprConsent: { gdprApplies: undefined, consentString: 'consentString' } });
199
294
  expect(request.length).to.equal(1);
200
295
  expect(request[0]).to.have.property('url')
201
296
  expect(request[0].url).to.equal(ENDPOINT_URL);
@@ -215,7 +310,7 @@ describe('adnuntiusBidAdapter', function () {
215
310
  }
216
311
  }
217
312
 
218
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {ortb2}));
313
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, { ortb2 }));
219
314
  expect(request.length).to.equal(1);
220
315
  expect(request[0]).to.have.property('url')
221
316
  expect(request[0].url).to.equal(ENDPOINT_URL_SEGMENTS);
@@ -237,7 +332,7 @@ describe('adnuntiusBidAdapter', function () {
237
332
  }
238
333
  };
239
334
 
240
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {ortb2}));
335
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, { ortb2 }));
241
336
  expect(request.length).to.equal(1);
242
337
  expect(request[0]).to.have.property('url')
243
338
  expect(request[0].url).to.equal(ENDPOINT_URL_SEGMENTS);
@@ -250,7 +345,7 @@ describe('adnuntiusBidAdapter', function () {
250
345
  }
251
346
  };
252
347
 
253
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {ortb2}));
348
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, { ortb2 }));
254
349
  expect(request.length).to.equal(1);
255
350
  expect(request[0]).to.have.property('url')
256
351
  expect(request[0].url).to.equal(ENDPOINT_URL);
@@ -259,14 +354,14 @@ describe('adnuntiusBidAdapter', function () {
259
354
 
260
355
  describe('user privacy', function () {
261
356
  it('should send GDPR Consent data if gdprApplies', function () {
262
- let request = spec.buildRequests(bidRequests, { gdprConsent: { gdprApplies: true, consentString: 'consentString' } });
357
+ let request = spec.buildRequests(bidderRequests, { gdprConsent: { gdprApplies: true, consentString: 'consentString' } });
263
358
  expect(request.length).to.equal(1);
264
359
  expect(request[0]).to.have.property('url')
265
360
  expect(request[0].url).to.equal(ENDPOINT_URL_CONSENT);
266
361
  });
267
362
 
268
363
  it('should not send GDPR Consent data if gdprApplies equals undefined', function () {
269
- let request = spec.buildRequests(bidRequests, { gdprConsent: { gdprApplies: undefined, consentString: 'consentString' } });
364
+ let request = spec.buildRequests(bidderRequests, { gdprConsent: { gdprApplies: undefined, consentString: 'consentString' } });
270
365
  expect(request.length).to.equal(1);
271
366
  expect(request[0]).to.have.property('url')
272
367
  expect(request[0].url).to.equal(ENDPOINT_URL);
@@ -282,7 +377,7 @@ describe('adnuntiusBidAdapter', function () {
282
377
  }
283
378
  });
284
379
 
285
- const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidRequests, {}));
380
+ const request = config.runWithBidder('adnuntius', () => spec.buildRequests(bidderRequests, {}));
286
381
  expect(request.length).to.equal(1);
287
382
  expect(request[0]).to.have.property('url')
288
383
  expect(request[0].url).to.equal(ENDPOINT_URL_NOCOOKIE);
@@ -307,4 +402,21 @@ describe('adnuntiusBidAdapter', function () {
307
402
  expect(interpretedResponse[0].ttl).to.equal(360);
308
403
  });
309
404
  });
405
+ describe('interpretVideoResponse', function () {
406
+ it('should return valid response when passed valid server response', function () {
407
+ const interpretedResponse = spec.interpretResponse(serverVideoResponse, videoBidRequest);
408
+ const ad = serverVideoResponse.body.adUnits[0].ads[0]
409
+ expect(interpretedResponse).to.have.lengthOf(1);
410
+ expect(interpretedResponse[0].cpm).to.equal(ad.cpm.amount);
411
+ expect(interpretedResponse[0].width).to.equal(Number(ad.creativeWidth));
412
+ expect(interpretedResponse[0].height).to.equal(Number(ad.creativeHeight));
413
+ expect(interpretedResponse[0].creativeId).to.equal(ad.creativeId);
414
+ expect(interpretedResponse[0].currency).to.equal(ad.bid.currency);
415
+ expect(interpretedResponse[0].netRevenue).to.equal(false);
416
+ expect(interpretedResponse[0].meta).to.have.property('advertiserDomains');
417
+ expect(interpretedResponse[0].meta.advertiserDomains).to.have.lengthOf(1);
418
+ expect(interpretedResponse[0].meta.advertiserDomains[0]).to.equal('google.com');
419
+ expect(interpretedResponse[0].vastXml).to.equal(serverVideoResponse.body.adUnits[0].vastXml);
420
+ });
421
+ });
310
422
  });
@@ -28,7 +28,7 @@ describe('Adot Adapter', function () {
28
28
  it('should build request (banner)', function () {
29
29
  const bidderRequestId = 'bidderRequestId';
30
30
  const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { banner: { sizes: [[300, 250]] } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
31
- const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
31
+ const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };
32
32
 
33
33
  const request = spec.buildRequests(validBidRequests, bidderRequest);
34
34
  const buildBidRequestResponse = {
@@ -54,10 +54,11 @@ describe('Adot Adapter', function () {
54
54
  publisher: {
55
55
  // id: 'adot'
56
56
  id: undefined
57
- }
57
+ },
58
+ ext: { schain: { ver: '1.0' } }
58
59
  },
59
60
  device: { ua: navigator.userAgent, language: navigator.language },
60
- user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
61
+ user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
61
62
  regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
62
63
  ext: {
63
64
  adot: { adapter_version: 'v2.0.0' },
@@ -76,7 +77,7 @@ describe('Adot Adapter', function () {
76
77
  it('should build request (native)', function () {
77
78
  const bidderRequestId = 'bidderRequestId';
78
79
  const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { native: { title: { required: true, len: 50, sizes: [[300, 250]] }, wrong: {}, image: {} } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
79
- const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
80
+ const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };
80
81
 
81
82
  const request = spec.buildRequests(validBidRequests, bidderRequest);
82
83
  const buildBidRequestResponse = {
@@ -101,10 +102,11 @@ describe('Adot Adapter', function () {
101
102
  publisher: {
102
103
  // id: 'adot'
103
104
  id: undefined
104
- }
105
+ },
106
+ ext: { schain: { ver: '1.0' } }
105
107
  },
106
108
  device: { ua: navigator.userAgent, language: navigator.language },
107
- user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
109
+ user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
108
110
  regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
109
111
  ext: {
110
112
  adot: { adapter_version: 'v2.0.0' },
@@ -123,7 +125,7 @@ describe('Adot Adapter', function () {
123
125
  it('should build request (video)', function () {
124
126
  const bidderRequestId = 'bidderRequestId';
125
127
  const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { video: { playerSize: [[300, 250]], minduration: 1, maxduration: 2, api: 'api', linearity: 'linearity', mimes: [], placement: 'placement', playbackmethod: 'playbackmethod', protocols: 'protocol', startdelay: 'startdelay' } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
126
- const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
128
+ const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };
127
129
 
128
130
  const request = spec.buildRequests(validBidRequests, bidderRequest);
129
131
  const buildBidRequestResponse = {
@@ -160,10 +162,11 @@ describe('Adot Adapter', function () {
160
162
  publisher: {
161
163
  // id: 'adot'
162
164
  id: undefined
163
- }
165
+ },
166
+ ext: { schain: { ver: '1.0' } }
164
167
  },
165
168
  device: { ua: navigator.userAgent, language: navigator.language },
166
- user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
169
+ user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
167
170
  regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
168
171
  ext: {
169
172
  adot: { adapter_version: 'v2.0.0' },
@@ -1,8 +1,13 @@
1
1
  import { expect } from 'chai';
2
2
  import { spec } from 'modules/adrinoBidAdapter.js';
3
+ import {config} from '../../../src/config.js';
3
4
  import * as utils from '../../../src/utils';
4
5
 
5
6
  describe('adrinoBidAdapter', function () {
7
+ afterEach(() => {
8
+ config.resetConfig();
9
+ });
10
+
6
11
  describe('isBidRequestValid', function () {
7
12
  const validBid = {
8
13
  bidder: 'adrino',
@@ -72,6 +77,23 @@ describe('adrinoBidAdapter', function () {
72
77
  auctionId: '01234567891234',
73
78
  };
74
79
 
80
+ it('should build the request correctly with custom domain', function () {
81
+ config.setConfig({adrino: { host: 'https://stg-prebid-bidder.adrino.io' }});
82
+ const result = spec.buildRequests(
83
+ [ bidRequest ],
84
+ { refererInfo: { page: 'http://example.com/' } }
85
+ );
86
+ expect(result.length).to.equal(1);
87
+ expect(result[0].method).to.equal('POST');
88
+ expect(result[0].url).to.equal('https://stg-prebid-bidder.adrino.io/bidder/bid/');
89
+ expect(result[0].data.bidId).to.equal('12345678901234');
90
+ expect(result[0].data.placementHash).to.equal('abcdef123456');
91
+ expect(result[0].data.referer).to.equal('http://example.com/');
92
+ expect(result[0].data.userAgent).to.equal(navigator.userAgent);
93
+ expect(result[0].data).to.have.property('nativeParams');
94
+ expect(result[0].data).not.to.have.property('gdprConsent');
95
+ });
96
+
75
97
  it('should build the request correctly with gdpr', function () {
76
98
  const result = spec.buildRequests(
77
99
  [ bidRequest ],