prebid.js 8.5.0 → 8.7.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/adqueryBidAdapter.js +1 -1
  7. package/dist/adrelevantisBidAdapter.js +1 -1
  8. package/dist/adsinteractiveBidAdapter.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/alkimiBidAdapter.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/automatadAnalyticsAdapter.js +1 -0
  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/bridBidAdapter.js +1 -1
  24. package/dist/bridgewellBidAdapter.js +1 -1
  25. package/dist/brightMountainMediaBidAdapter.js +1 -1
  26. package/dist/carodaBidAdapter.js +1 -1
  27. package/dist/chtnwBidAdapter.js +1 -1
  28. package/dist/concertBidAdapter.js +1 -1
  29. package/dist/connatixBidAdapter.js +1 -0
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dependencies.json +6 -0
  38. package/dist/dspxBidAdapter.js +1 -1
  39. package/dist/eplanningBidAdapter.js +1 -1
  40. package/dist/euidIdSystem.js +1 -1
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/freepassBidAdapter.js +1 -1
  44. package/dist/freewheel-sspBidAdapter.js +1 -1
  45. package/dist/gmosspBidAdapter.js +1 -1
  46. package/dist/goldbachBidAdapter.js +1 -1
  47. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  48. package/dist/greenbidsRtdProvider.js +1 -1
  49. package/dist/gridBidAdapter.js +1 -1
  50. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  51. package/dist/gumgumBidAdapter.js +1 -1
  52. package/dist/h12mediaBidAdapter.js +1 -1
  53. package/dist/hypelabBidAdapter.js +1 -1
  54. package/dist/id5IdSystem.js +1 -1
  55. package/dist/imdsBidAdapter.js +1 -1
  56. package/dist/improvedigitalBidAdapter.js +1 -1
  57. package/dist/insticatorBidAdapter.js +1 -1
  58. package/dist/ixBidAdapter.js +1 -1
  59. package/dist/justpremiumBidAdapter.js +1 -1
  60. package/dist/kargoBidAdapter.js +1 -1
  61. package/dist/konduitAnalyticsAdapter.js +1 -1
  62. package/dist/kueezBidAdapter.js +1 -1
  63. package/dist/kueezRtbBidAdapter.js +1 -1
  64. package/dist/kulturemediaBidAdapter.js +1 -1
  65. package/dist/lassoBidAdapter.js +1 -1
  66. package/dist/lifestreetBidAdapter.js +1 -1
  67. package/dist/logicadBidAdapter.js +1 -1
  68. package/dist/loglyliftBidAdapter.js +1 -1
  69. package/dist/magniteAnalyticsAdapter.js +1 -1
  70. package/dist/malltvAnalyticsAdapter.js +1 -1
  71. package/dist/marsmediaBidAdapter.js +1 -1
  72. package/dist/mediafuseBidAdapter.js +1 -1
  73. package/dist/medianetBidAdapter.js +1 -1
  74. package/dist/mediasquareBidAdapter.js +1 -1
  75. package/dist/mgidBidAdapter.js +1 -1
  76. package/dist/minutemediaBidAdapter.js +1 -1
  77. package/dist/minutemediaplusBidAdapter.js +1 -1
  78. package/dist/mspa.js +1 -1
  79. package/dist/newspassidBidAdapter.js +1 -1
  80. package/dist/nexx360BidAdapter.js +1 -1
  81. package/dist/not-for-prod/prebid.js +140 -136
  82. package/dist/oguryBidAdapter.js +1 -1
  83. package/dist/onetagBidAdapter.js +1 -1
  84. package/dist/ooloAnalyticsAdapter.js +1 -1
  85. package/dist/optidigitalBidAdapter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/parrableIdSystem.js +1 -1
  88. package/dist/pixfutureBidAdapter.js +1 -1
  89. package/dist/prebid-core.js +1 -1
  90. package/dist/pubCircleBidAdapter.js +1 -0
  91. package/dist/publinkIdSystem.js +1 -1
  92. package/dist/pubmaticBidAdapter.js +1 -1
  93. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  94. package/dist/pxyzBidAdapter.js +1 -1
  95. package/dist/quantcastBidAdapter.js +1 -1
  96. package/dist/readpeakBidAdapter.js +1 -1
  97. package/dist/relaidoBidAdapter.js +1 -1
  98. package/dist/relevadRtdProvider.js +1 -1
  99. package/dist/retailspotBidAdapter.js +1 -1
  100. package/dist/rhythmoneBidAdapter.js +1 -1
  101. package/dist/riseBidAdapter.js +1 -1
  102. package/dist/rubiconBidAdapter.js +1 -1
  103. package/dist/seedingAllianceBidAdapter.js +1 -1
  104. package/dist/seedtagBidAdapter.js +1 -1
  105. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  106. package/dist/sharethroughBidAdapter.js +1 -1
  107. package/dist/shinezBidAdapter.js +1 -1
  108. package/dist/smaatoBidAdapter.js +1 -1
  109. package/dist/smartadserverBidAdapter.js +1 -1
  110. package/dist/smartxBidAdapter.js +1 -1
  111. package/dist/smilewantedBidAdapter.js +1 -1
  112. package/dist/sonobiBidAdapter.js +1 -1
  113. package/dist/sovrnAnalyticsAdapter.js +1 -1
  114. package/dist/sovrnBidAdapter.js +1 -1
  115. package/dist/ssmasBidAdapter.js +1 -1
  116. package/dist/sspBCBidAdapter.js +1 -1
  117. package/dist/stvBidAdapter.js +1 -1
  118. package/dist/sublimeBidAdapter.js +1 -1
  119. package/dist/tappxBidAdapter.js +1 -1
  120. package/dist/targetVideoBidAdapter.js +1 -1
  121. package/dist/teadsBidAdapter.js +1 -1
  122. package/dist/topicsFpdModule.js +1 -1
  123. package/dist/trionBidAdapter.js +1 -1
  124. package/dist/tripleliftBidAdapter.js +1 -1
  125. package/dist/ttdBidAdapter.js +1 -1
  126. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  127. package/dist/uid2IdSystem.js +1 -1
  128. package/dist/underdogmediaBidAdapter.js +1 -1
  129. package/dist/undertoneBidAdapter.js +1 -1
  130. package/dist/viantOrtbBidAdapter.js +1 -0
  131. package/dist/vidazooBidAdapter.js +1 -1
  132. package/dist/videobyteBidAdapter.js +1 -1
  133. package/dist/videojsVideoProvider.js +1 -1
  134. package/dist/visxBidAdapter.js +1 -1
  135. package/dist/vuukleBidAdapter.js +1 -1
  136. package/dist/widespaceBidAdapter.js +1 -1
  137. package/dist/winrBidAdapter.js +1 -1
  138. package/dist/yahoosspBidAdapter.js +1 -1
  139. package/dist/yieldmoBidAdapter.js +1 -1
  140. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  141. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  142. package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +1 -1
  143. package/integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html +137 -0
  144. package/integrationExamples/videoModule/jwplayer/eventListeners.html +1 -1
  145. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  146. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  147. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  148. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  149. package/integrationExamples/videoModule/videojs/bidsBackHandlerOverride.html +164 -0
  150. package/libraries/mspa/activityControls.js +51 -32
  151. package/modules/adagioBidAdapter.js +15 -1
  152. package/modules/adgenerationBidAdapter.js +5 -4
  153. package/modules/adsinteractiveBidAdapter.js +4 -2
  154. package/modules/alkimiBidAdapter.js +19 -7
  155. package/modules/appnexusBidAdapter.js +1 -1
  156. package/modules/automatadAnalyticsAdapter.js +325 -0
  157. package/modules/automatadAnalyticsAdapter.md +23 -0
  158. package/modules/connatixBidAdapter.js +185 -0
  159. package/modules/connatixBidAdapter.md +37 -0
  160. package/modules/criteoBidAdapter.js +18 -0
  161. package/modules/cwireBidAdapter.js +19 -0
  162. package/modules/freepassBidAdapter.js +20 -1
  163. package/modules/freepassBidAdapter.md +4 -1
  164. package/modules/gridBidAdapter.js +1 -8
  165. package/modules/growthCodeAnalyticsAdapter.js +7 -2
  166. package/modules/medianetBidAdapter.js +7 -4
  167. package/modules/mediasquareBidAdapter.js +3 -0
  168. package/modules/newspassid.md +76 -0
  169. package/modules/newspassidBidAdapter.js +44 -18
  170. package/modules/optidigitalBidAdapter.js +25 -16
  171. package/modules/pubCircleBidAdapter.js +231 -0
  172. package/modules/pubCircleBidAdapter.md +79 -0
  173. package/modules/relevadRtdProvider.js +6 -7
  174. package/modules/ssmasBidAdapter.js +2 -2
  175. package/modules/tappxBidAdapter.js +27 -15
  176. package/modules/tappxBidAdapter.md +17 -0
  177. package/modules/topicsFpdModule.js +21 -48
  178. package/modules/undertoneBidAdapter.md +1 -1
  179. package/modules/userId/eids.md +7 -0
  180. package/modules/viantOrtbBidAdapter.js +113 -0
  181. package/modules/viantOrtbBidAdapter.md +54 -0
  182. package/modules/vidazooBidAdapter.js +9 -2
  183. package/modules/videojsVideoProvider.js +9 -2
  184. package/package.json +1 -1
  185. package/test/spec/libraries/mspa/activityControls_spec.js +145 -212
  186. package/test/spec/modules/adagioBidAdapter_spec.js +89 -0
  187. package/test/spec/modules/adgenerationBidAdapter_spec.js +6 -6
  188. package/test/spec/modules/alkimiBidAdapter_spec.js +3 -9
  189. package/test/spec/modules/appnexusBidAdapter_spec.js +12 -1
  190. package/test/spec/modules/automatadAnalyticsAdapter_spec.js +533 -0
  191. package/test/spec/modules/connatixBidAdapter_spec.js +366 -0
  192. package/test/spec/modules/criteoBidAdapter_spec.js +52 -3
  193. package/test/spec/modules/cwireBidAdapter_spec.js +47 -0
  194. package/test/spec/modules/freepassBidAdapter_spec.js +44 -0
  195. package/test/spec/modules/gridBidAdapter_spec.js +68 -0
  196. package/test/spec/modules/medianetBidAdapter_spec.js +18 -18
  197. package/test/spec/modules/mediasquareBidAdapter_spec.js +5 -0
  198. package/test/spec/modules/newspassidBidAdapter_spec.js +6 -0
  199. package/test/spec/modules/optidigitalBidAdapter_spec.js +9 -2
  200. package/test/spec/modules/pubCircleBidAdapter_spec.js +399 -0
  201. package/test/spec/modules/tappxBidAdapter_spec.js +19 -0
  202. package/test/spec/modules/topicsFpdModule_spec.js +343 -365
  203. package/test/spec/modules/viantOrtbBidAdapter_spec.js +432 -0
@@ -1,220 +1,153 @@
1
- import {mspaRule, setupRules, isTransmitUfpdConsentDenied, isTransmitGeoConsentDenied, isBasicConsentDenied, isSensitiveNoticeMissing, isConsentDenied} from '../../../../libraries/mspa/activityControls.js';
1
+ import {mspaRule, setupRules, isTransmitUfpdConsentDenied, isTransmitGeoConsentDenied, isBasicConsentDenied, sensitiveNoticeIs, isConsentDenied} from '../../../../libraries/mspa/activityControls.js';
2
2
  import {ruleRegistry} from '../../../../src/activities/rules.js';
3
- describe('isBasicConsentDenied', () => {
4
- const cd = {
5
- // not covered, opt in to targeted, sale, and share, all notices given, opt into precise geo
6
- Gpc: 0,
7
- KnownChildSensitiveDataConsents: [0, 0],
8
- MspaCoveredTransaction: 2,
9
- MspaOptOutOptionMode: 0,
10
- MspaServiceProviderMode: 0,
11
- PersonalDataConsents: 0,
12
- SaleOptOut: 2,
13
- SaleOptOutNotice: 1,
14
- SensitiveDataLimitUseNotice: 1,
15
- SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
16
- SensitiveDataProcessingOptOutNotice: 1,
17
- SharingNotice: 1,
18
- SharingOptOut: 2,
19
- SharingOptOutNotice: 1,
20
- TargetedAdvertisingOptOut: 2,
21
- TargetedAdvertisingOptOutNotice: 1,
22
- Version: 1
23
- };
24
- it('should be false (basic consent conditions pass) with variety of notice and opt in', () => {
25
- const result = isBasicConsentDenied(cd);
26
- expect(result).to.equal(false);
27
- });
28
- it('should be true (basic consent conditions do not pass) with personal data consent set to true (invalid state)', () => {
29
- cd.PersonalDataConsents = 2;
30
- const result = isBasicConsentDenied(cd);
31
- expect(result).to.equal(true);
32
- cd.PersonalDataConsents = 0;
33
- });
34
- it('should be true (basic consent conditions do not pass) with sensitive opt in but no notice', () => {
35
- cd.SensitiveDataLimitUseNotice = 0;
36
- const result = isBasicConsentDenied(cd);
37
- expect(result).to.equal(true);
38
- cd.SensitiveDataLimitUseNotice = 1;
39
- });
40
- })
41
- describe('isSensitiveNoticeMissing', () => {
42
- const cd = {
43
- // not covered, opt in to targeted, sale, and share, all notices given, opt into precise geo
44
- Gpc: 0,
45
- KnownChildSensitiveDataConsents: [0, 0],
46
- MspaCoveredTransaction: 2,
47
- MspaOptOutOptionMode: 0,
48
- MspaServiceProviderMode: 0,
49
- PersonalDataConsents: 0,
50
- SaleOptOut: 2,
51
- SaleOptOutNotice: 1,
52
- SensitiveDataLimitUseNotice: 1,
53
- SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
54
- SensitiveDataProcessingOptOutNotice: 1,
55
- SharingNotice: 1,
56
- SharingOptOut: 2,
57
- SharingOptOutNotice: 1,
58
- TargetedAdvertisingOptOut: 2,
59
- TargetedAdvertisingOptOutNotice: 1,
60
- Version: 1
61
- };
62
- it('should be false (sensitive notice is given or not needed) with variety of notice and opt in', () => {
63
- const result = isSensitiveNoticeMissing(cd);
64
- expect(result).to.equal(false);
65
- });
66
- it('should be true (sensitive notice is missing) with variety of notice and opt in', () => {
67
- cd.SensitiveDataLimitUseNotice = 2;
68
- const result = isSensitiveNoticeMissing(cd);
69
- expect(result).to.equal(true);
70
- cd.SensitiveDataLimitUseNotice = 1;
71
- });
72
- })
73
- describe('isConsentDenied', () => {
74
- const cd = {
75
- // not covered, opt in to targeted, sale, and share, all notices given, opt into precise geo
76
- Gpc: 0,
77
- KnownChildSensitiveDataConsents: [0, 0],
78
- MspaCoveredTransaction: 2,
79
- MspaOptOutOptionMode: 0,
80
- MspaServiceProviderMode: 0,
81
- PersonalDataConsents: 0,
82
- SaleOptOut: 2,
83
- SaleOptOutNotice: 1,
84
- SensitiveDataLimitUseNotice: 1,
85
- SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
86
- SensitiveDataProcessingOptOutNotice: 1,
87
- SharingNotice: 1,
88
- SharingOptOut: 2,
89
- SharingOptOutNotice: 1,
90
- TargetedAdvertisingOptOut: 2,
91
- TargetedAdvertisingOptOutNotice: 1,
92
- Version: 1
93
- };
94
- it('should be false (consent given personalized ads / sale / share) with variety of notice and opt in', () => {
95
- const result = isConsentDenied(cd);
96
- expect(result).to.equal(false);
97
- });
98
- it('should be true (no consent) on opt out of targeted ads via TargetedAdvertisingOptOut', () => {
99
- cd.TargetedAdvertisingOptOut = 1;
100
- const result = isConsentDenied(cd);
101
- expect(result).to.equal(true);
102
- cd.TargetedAdvertisingOptOut = 2;
103
- });
104
- it('should be true (no consent) on opt out of targeted ads via no TargetedAdvertisingOptOutNotice', () => {
105
- cd.TargetedAdvertisingOptOutNotice = 2;
106
- const result = isConsentDenied(cd);
107
- expect(result).to.equal(true);
108
- cd.TargetedAdvertisingOptOutNotice = 1;
109
- });
110
- it('should be true (no consent) if TargetedAdvertisingOptOutNotice is 0 and TargetedAdvertisingOptOut is 2', () => {
111
- cd.TargetedAdvertisingOptOutNotice = 0;
112
- const result = isConsentDenied(cd);
113
- expect(result).to.equal(true);
114
- cd.TargetedAdvertisingOptOutNotice = 1;
115
- });
116
- })
117
- describe('isTransmitUfpdConsentDenied', () => {
118
- const cd = {
119
- // not covered, opt in to targeted, sale, and share, all notices given, opt into precise geo
120
- Gpc: 0,
121
- KnownChildSensitiveDataConsents: [0, 0],
122
- MspaCoveredTransaction: 2,
123
- MspaOptOutOptionMode: 0,
124
- MspaServiceProviderMode: 0,
125
- PersonalDataConsents: 0,
126
- SaleOptOut: 2,
127
- SaleOptOutNotice: 1,
128
- SensitiveDataLimitUseNotice: 1,
129
- SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
130
- SensitiveDataProcessingOptOutNotice: 1,
131
- SharingNotice: 1,
132
- SharingOptOut: 2,
133
- SharingOptOutNotice: 1,
134
- TargetedAdvertisingOptOut: 2,
135
- TargetedAdvertisingOptOutNotice: 1,
136
- Version: 1
137
- };
138
- it('should be false (consent given to add ufpd) with variety of notice and opt in', () => {
139
- const result = isTransmitUfpdConsentDenied(cd);
140
- expect(result).to.equal(false);
141
- });
142
- it('should be true (consent denied to add ufpd) if no consent to process health information', () => {
143
- cd.SensitiveDataProcessing[2] = 1;
144
- const result = isTransmitUfpdConsentDenied(cd);
145
- expect(result).to.equal(true);
146
- cd.SensitiveDataProcessing[2] = 0;
147
- });
148
- it('should be true (consent denied to add ufpd) with consent to process biometric data, as this should not be on openrtb', () => {
149
- cd.SensitiveDataProcessing[6] = 1;
150
- const result = isTransmitUfpdConsentDenied(cd);
151
- expect(result).to.equal(true);
152
- cd.SensitiveDataProcessing[6] = 1;
153
- });
154
- it('should be true (consent denied to add ufpd) without sharing notice', () => {
155
- cd.SharingNotice = 2;
156
- const result = isTransmitUfpdConsentDenied(cd);
157
- expect(result).to.equal(true);
158
- cd.SharingNotice = 1;
159
- });
160
- it('should be true (consent denied to add ufpd) with sale opt out', () => {
161
- cd.SaleOptOut = 1;
162
- const result = isTransmitUfpdConsentDenied(cd);
163
- expect(result).to.equal(true);
164
- cd.SaleOptOut = 2;
165
- });
166
- it('should be true (consent denied to add ufpd) without targeted ads opt out', () => {
167
- cd.TargetedAdvertisingOptOut = 1;
168
- const result = isTransmitUfpdConsentDenied(cd);
169
- expect(result).to.equal(true);
170
- cd.TargetedAdvertisingOptOut = 2;
171
- });
172
- it('should be true (consent denied to add ufpd) with missing sensitive data limit notice', () => {
173
- cd.SensitiveDataLimitUseNotice = 2;
174
- const result = isTransmitUfpdConsentDenied(cd);
175
- expect(result).to.equal(true);
176
- cd.SensitiveDataLimitUseNotice = 1;
177
- });
178
- })
179
3
 
180
- describe('isTransmitGeoConsentDenied', () => {
181
- const cd = {
182
- // not covered, opt out of geo
183
- Gpc: 0,
184
- KnownChildSensitiveDataConsents: [0, 0],
185
- MspaCoveredTransaction: 2,
186
- MspaOptOutOptionMode: 0,
187
- MspaServiceProviderMode: 0,
188
- PersonalDataConsents: 0,
189
- SaleOptOut: 2,
190
- SaleOptOutNotice: 1,
191
- SensitiveDataLimitUseNotice: 1,
192
- SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
193
- SensitiveDataProcessingOptOutNotice: 1,
194
- SharingNotice: 1,
195
- SharingOptOut: 2,
196
- SharingOptOutNotice: 1,
197
- TargetedAdvertisingOptOut: 2,
198
- TargetedAdvertisingOptOutNotice: 1,
199
- Version: 1
200
- };
201
- it('should be true (consent denied to add precise geo) -- sensitive flag denied', () => {
202
- const result = isTransmitGeoConsentDenied(cd);
203
- expect(result).to.equal(true);
4
+ describe('Consent interpretation', () => {
5
+ function mkConsent(flags) {
6
+ return Object.assign({
7
+ // not covered, opt in to targeted, sale, and share, all notices given, opt into precise geo
8
+ Gpc: 0,
9
+ KnownChildSensitiveDataConsents: [0, 0],
10
+ MspaCoveredTransaction: 2,
11
+ MspaOptOutOptionMode: 0,
12
+ MspaServiceProviderMode: 0,
13
+ PersonalDataConsents: 0,
14
+ SaleOptOut: 2,
15
+ SaleOptOutNotice: 1,
16
+ SensitiveDataLimitUseNotice: 1,
17
+ SensitiveDataProcessing: [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0],
18
+ SensitiveDataProcessingOptOutNotice: 1,
19
+ SharingNotice: 1,
20
+ SharingOptOut: 2,
21
+ SharingOptOutNotice: 1,
22
+ TargetedAdvertisingOptOut: 2,
23
+ TargetedAdvertisingOptOutNotice: 1,
24
+ Version: 1
25
+ }, flags)
26
+ }
27
+ describe('isBasicConsentDenied', () => {
28
+ it('should be false (basic consent conditions pass) with variety of notice and opt in', () => {
29
+ const result = isBasicConsentDenied(mkConsent());
30
+ expect(result).to.equal(false);
31
+ });
32
+ it('should be true (basic consent conditions do not pass) with personal data consent set to true (invalid state)', () => {
33
+ const result = isBasicConsentDenied(mkConsent({
34
+ PersonalDataConsents: 2
35
+ }));
36
+ expect(result).to.equal(true);
37
+ });
38
+ it('should not deny when consent for under-13 is null', () => {
39
+ expect(isBasicConsentDenied(mkConsent({
40
+ KnownChildSensitiveDataConsents: [0, null]
41
+ }))).to.be.false;
42
+ })
204
43
  });
205
- it('should be true (consent denied to add precise geo) -- sensitive data limit usage not given', () => {
206
- cd.SensitiveDataLimitUseNotice = 0;
207
- const result = isTransmitGeoConsentDenied(cd);
208
- expect(result).to.equal(true);
209
- cd.SensitiveDataLimitUseNotice = 1;
44
+
45
+ describe('isConsentDenied', () => {
46
+ it('should be false (consent given personalized ads / sale / share) with variety of notice and opt in', () => {
47
+ const result = isConsentDenied(mkConsent());
48
+ expect(result).to.equal(false);
49
+ });
50
+ it('should be true (no consent) on opt out of targeted ads via TargetedAdvertisingOptOut', () => {
51
+ const result = isConsentDenied(mkConsent({
52
+ TargetedAdvertisingOptOut: 1
53
+ }));
54
+ expect(result).to.equal(true);
55
+ });
56
+ it('should be true (no consent) on opt out of targeted ads via no TargetedAdvertisingOptOutNotice', () => {
57
+ const result = isConsentDenied(mkConsent({
58
+ TargetedAdvertisingOptOutNotice: 2
59
+ }));
60
+ expect(result).to.equal(true);
61
+ });
62
+ it('should be true (no consent) if TargetedAdvertisingOptOutNotice is 0 and TargetedAdvertisingOptOut is 2', () => {
63
+ const result = isConsentDenied(mkConsent({
64
+ TargetedAdvertisingOptOutNotice: 0
65
+ }));
66
+ expect(result).to.equal(true);
67
+ });
68
+ it('requires also SharingNotice to accept opt-in for Sharing', () => {
69
+ expect(isConsentDenied(mkConsent({
70
+ SharingNotice: 0
71
+ }))).to.be.true;
72
+ })
210
73
  });
211
- it('should be false (consent given to add precise geo) -- sensitive position 8 (index 7) is true', () => {
212
- cd.SensitiveDataProcessing[7] = 2;
213
- const result = isTransmitGeoConsentDenied(cd);
214
- expect(result).to.equal(false);
215
- cd.SensitiveDataProcessing[7] = 1;
74
+
75
+ describe('isTransmitUfpdConsentDenied', () => {
76
+ it('should be false (consent given to add ufpd) with variety of notice and opt in', () => {
77
+ const result = isTransmitUfpdConsentDenied(mkConsent());
78
+ expect(result).to.equal(false);
79
+ });
80
+ Object.entries({
81
+ 'health information': 2,
82
+ 'biometric data': 6,
83
+ }).forEach(([t, flagNo]) => {
84
+ it(`'should be true (consent denied to add ufpd) if no consent to process ${t}'`, () => {
85
+ const consent = mkConsent();
86
+ consent.SensitiveDataProcessing[flagNo] = 1;
87
+ expect(isTransmitUfpdConsentDenied(consent)).to.be.true;
88
+ })
89
+ });
90
+
91
+ ['SharingNotice', 'SensitiveDataLimitUseNotice'].forEach(flag => {
92
+ it(`should be true (consent denied to add ufpd) without ${flag}`, () => {
93
+ expect(isTransmitUfpdConsentDenied(mkConsent({
94
+ [flag]: 2
95
+ }))).to.be.true;
96
+ })
97
+ });
98
+
99
+ ['SaleOptOut', 'TargetedAdvertisingOptOut'].forEach(flag => {
100
+ it(`should be true (consent denied to add ufpd) with ${flag}`, () => {
101
+ expect(isTransmitUfpdConsentDenied(mkConsent({
102
+ [flag]: 1
103
+ }))).to.be.true;
104
+ })
105
+ });
106
+
107
+ it('should be true (basic consent conditions do not pass) with sensitive opt in but no notice', () => {
108
+ const cd = mkConsent({
109
+ SensitiveDataLimitUseNotice: 0
110
+ });
111
+ cd.SensitiveDataProcessing[0] = 2;
112
+ expect(isTransmitUfpdConsentDenied(cd)).to.be.true;
113
+ });
114
+
115
+ it('should deny when sensitive notice is missing', () => {
116
+ const result = isTransmitUfpdConsentDenied(mkConsent({
117
+ SensitiveDataLimitUseNotice: 2
118
+ }));
119
+ expect(result).to.equal(true);
120
+ });
121
+
122
+ it('should not deny when biometric data opt-out is null', () => {
123
+ const cd = mkConsent();
124
+ cd.SensitiveDataProcessing[6] = null;
125
+ expect(isTransmitUfpdConsentDenied(cd)).to.be.false;
126
+ })
216
127
  });
217
- })
128
+
129
+ describe('isTransmitGeoConsentDenied', () => {
130
+ function geoConsent(geoOptOut, flags) {
131
+ const consent = mkConsent(flags);
132
+ consent.SensitiveDataProcessing[7] = geoOptOut;
133
+ return consent;
134
+ }
135
+ it('should be true (consent denied to add precise geo) -- sensitive flag denied', () => {
136
+ const result = isTransmitGeoConsentDenied(geoConsent(1));
137
+ expect(result).to.equal(true);
138
+ });
139
+ it('should be true (consent denied to add precise geo) -- sensitive data limit usage not given', () => {
140
+ const result = isTransmitGeoConsentDenied(geoConsent(1, {
141
+ SensitiveDataLimitUseNotice: 0
142
+ }));
143
+ expect(result).to.equal(true);
144
+ });
145
+ it('should be false (consent given to add precise geo) -- sensitive position 8 (index 7) is true', () => {
146
+ const result = isTransmitGeoConsentDenied(geoConsent(2));
147
+ expect(result).to.equal(false);
148
+ });
149
+ })
150
+ });
218
151
 
219
152
  describe('mspaRule', () => {
220
153
  it('does not apply if SID is not applicable', () => {
@@ -697,6 +697,95 @@ describe('Adagio bid adapter', () => {
697
697
  });
698
698
  });
699
699
 
700
+ describe('with GPP', function() {
701
+ const bid01 = new BidRequestBuilder().withParams().build();
702
+
703
+ const regsGpp = 'regs_gpp_consent_string';
704
+ const regsApplicableSections = [2];
705
+
706
+ const ortb2Gpp = 'ortb2_gpp_consent_string';
707
+ const ortb2GppSid = [1];
708
+
709
+ context('When GPP in regs module', function() {
710
+ it('send gpp and gppSid to the server', function() {
711
+ const bidderRequest = new BidderRequestBuilder({
712
+ gppConsent: {
713
+ gppString: regsGpp,
714
+ applicableSections: regsApplicableSections,
715
+ }
716
+ }).build();
717
+
718
+ const requests = spec.buildRequests([bid01], bidderRequest);
719
+
720
+ expect(requests[0].data.regs.gpp).to.equal(regsGpp);
721
+ expect(requests[0].data.regs.gppSid).to.equal(regsApplicableSections);
722
+ });
723
+ });
724
+
725
+ context('When GPP partially defined in regs module', function() {
726
+ it('send gpp and gppSid coming from ortb2 to the server', function() {
727
+ const bidderRequest = new BidderRequestBuilder({
728
+ gppConsent: {
729
+ gppString: regsGpp,
730
+ },
731
+ ortb2: {
732
+ regs: {
733
+ gpp: ortb2Gpp,
734
+ gpp_sid: ortb2GppSid,
735
+ }
736
+ }
737
+ }).build();
738
+
739
+ const requests = spec.buildRequests([bid01], bidderRequest);
740
+
741
+ expect(requests[0].data.regs.gpp).to.equal(ortb2Gpp);
742
+ expect(requests[0].data.regs.gppSid).to.equal(ortb2GppSid);
743
+ });
744
+
745
+ it('send empty gpp and gppSid if no ortb2 fields to the server', function() {
746
+ const bidderRequest = new BidderRequestBuilder({
747
+ gppConsent: {
748
+ gppString: regsGpp,
749
+ }
750
+ }).build();
751
+
752
+ const requests = spec.buildRequests([bid01], bidderRequest);
753
+
754
+ expect(requests[0].data.regs.gpp).to.equal('');
755
+ expect(requests[0].data.regs.gppSid).to.be.empty;
756
+ });
757
+ });
758
+
759
+ context('When GPP defined in ortb2 module', function() {
760
+ it('send gpp and gppSid coming from ortb2 to the server', function() {
761
+ const bidderRequest = new BidderRequestBuilder({
762
+ ortb2: {
763
+ regs: {
764
+ gpp: ortb2Gpp,
765
+ gpp_sid: ortb2GppSid,
766
+ }
767
+ }
768
+ }).build();
769
+
770
+ const requests = spec.buildRequests([bid01], bidderRequest);
771
+
772
+ expect(requests[0].data.regs.gpp).to.equal(ortb2Gpp);
773
+ expect(requests[0].data.regs.gppSid).to.equal(ortb2GppSid);
774
+ });
775
+ });
776
+
777
+ context('When GPP not defined in any modules', function() {
778
+ it('send empty gpp and gppSid', function() {
779
+ const bidderRequest = new BidderRequestBuilder({}).build();
780
+
781
+ const requests = spec.buildRequests([bid01], bidderRequest);
782
+
783
+ expect(requests[0].data.regs.gpp).to.equal('');
784
+ expect(requests[0].data.regs.gppSid).to.be.empty;
785
+ });
786
+ });
787
+ });
788
+
700
789
  describe('with userID modules', function() {
701
790
  const userIdAsEids = [{
702
791
  'source': 'pubcid.org',
@@ -184,12 +184,12 @@ describe('AdgenerationAdapter', function () {
184
184
  }
185
185
  };
186
186
  const data = {
187
- banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&imark=1&tp=https%3A%2F%2Fexample.com`,
188
- bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&imark=1&tp=https%3A%2F%2Fexample.com`,
189
- native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&tp=https%3A%2F%2Fexample.com`,
190
- bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
191
- bannerWithAdgextCriteoId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com`,
192
- bannerWithAdgextIds: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.0&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&adgext_imuid=i.KrAH6ZAZTJOnH5S4N2sogA&adgext_uid2=%5Bobject%20Object%5D&gpid=%252F1111%252Fhomepage%2523300x250&uach=%7B%22source%22%3A2%2C%22platform%22%3A%7B%22brand%22%3A%22macOS%22%7D%2C%22browsers%22%3A%5B%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Not%3AA-Brand%22%2C%22version%22%3A%5B%2299%22%5D%7D%5D%2C%22mobile%22%3A0%7D&schain=%257B%2522ver%2522%253A%25221.0%2522%252C%2522complete%2522%253A1%252C%2522nodes%2522%253A%255B%257B%2522asi%2522%253A%2522indirectseller.com%2522%252C%2522sid%2522%253A%252200001%2522%252C%2522hp%2522%253A1%257D%255D%257D&imark=1&tp=https%3A%2F%2Fexample.com`,
187
+ banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com`,
188
+ bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com`,
189
+ native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&tp=https%3A%2F%2Fexample.com`,
190
+ bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
191
+ bannerWithAdgextCriteoId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com`,
192
+ bannerWithAdgextIds: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&adgext_imuid=i.KrAH6ZAZTJOnH5S4N2sogA&adgext_uid2=AgAAAAVacu1uAxgAxH%2BHJ8%2BnWlS2H4uVqr6i%2BHBDCNREHD8WKsio%2Fx7D8xXFuq1cJycUU86yXfTH9Xe%2F4C8KkH%2B7UCiU7uQxhyD7Qxnv251pEs6K8oK%2BBPLYR%2B8BLY%2FsJKesa%2FkoKwx1FHgUzIBum582tSy2Oo%2B7C6wYUaaV4QcLr%2F4LPA%3D&gpid=%2F1111%2Fhomepage%23300x250&uach=%7B%22source%22%3A2%2C%22platform%22%3A%7B%22brand%22%3A%22macOS%22%7D%2C%22browsers%22%3A%5B%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Not%3AA-Brand%22%2C%22version%22%3A%5B%2299%22%5D%7D%5D%2C%22mobile%22%3A0%7D&schain=%7B%22ver%22%3A%221.0%22%2C%22complete%22%3A1%2C%22nodes%22%3A%5B%7B%22asi%22%3A%22indirectseller.com%22%2C%22sid%22%3A%2200001%22%2C%22hp%22%3A1%7D%5D%7D&imark=1&tp=https%3A%2F%2Fexample.com`,
193
193
  };
194
194
  it('sends bid request to ENDPOINT via GET', function () {
195
195
  const request = spec.buildRequests(bidRequests, bidderRequest)[0];
@@ -14,8 +14,7 @@ const REQUEST = {
14
14
  },
15
15
  'params': {
16
16
  bidFloor: 0.1,
17
- token: 'e64782a4-8e68-4c38-965b-80ccf115d46f',
18
- pos: 7
17
+ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f'
19
18
  },
20
19
  'userIdAsEids': [{
21
20
  'source': 'criteo.com',
@@ -96,10 +95,6 @@ describe('alkimiBidAdapter', function () {
96
95
  delete bid.params.token
97
96
  expect(spec.isBidRequestValid(bid)).to.equal(false)
98
97
 
99
- bid = Object.assign({}, REQUEST)
100
- delete bid.params.bidFloor
101
- expect(spec.isBidRequestValid(bid)).to.equal(false)
102
-
103
98
  bid = Object.assign({}, REQUEST)
104
99
  delete bid.params
105
100
  expect(spec.isBidRequestValid(bid)).to.equal(false)
@@ -109,7 +104,6 @@ describe('alkimiBidAdapter', function () {
109
104
  describe('buildRequests', function () {
110
105
  let bidRequests = [REQUEST]
111
106
  let requestData = {
112
- auctionId: '123',
113
107
  refererInfo: {
114
108
  page: 'http://test.com/path.html'
115
109
  },
@@ -137,10 +131,10 @@ describe('alkimiBidAdapter', function () {
137
131
 
138
132
  it('sends bid request to ENDPOINT via POST', function () {
139
133
  expect(bidderRequest.method).to.equal('POST')
140
- expect(bidderRequest.data.requestId).to.equal('123')
134
+ expect(bidderRequest.data.requestId).to.not.equal(undefined)
141
135
  expect(bidderRequest.data.referer).to.equal('http://test.com/path.html')
142
136
  expect(bidderRequest.data.schain).to.deep.contains({ ver: '1.0', complete: 1, nodes: [{ asi: 'alkimi-onboarding.com', sid: '00001', hp: 1 }] })
143
- expect(bidderRequest.data.signRequest.bids).to.deep.contains({ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7, bidFloor: 0.1, sizes: [{width: 300, height: 250}], playerSizes: [], impMediaTypes: ['Banner'], adUnitCode: 'bannerAdUnitCode' })
137
+ expect(bidderRequest.data.signRequest.bids).to.deep.contains({ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f', bidFloor: 0.1, sizes: [{ width: 300, height: 250 }], playerSizes: [], impMediaTypes: ['Banner'], adUnitCode: 'bannerAdUnitCode', instl: undefined, exp: undefined, banner: { sizes: [[300, 250]] }, video: undefined })
144
138
  expect(bidderRequest.data.signRequest.randomUUID).to.equal(undefined)
145
139
  expect(bidderRequest.data.bidIds).to.deep.contains('456')
146
140
  expect(bidderRequest.data.signature).to.equal(undefined)
@@ -1093,7 +1093,18 @@ describe('AppNexusAdapter', function () {
1093
1093
  expect(payload.tags[0].use_pmt_rule).to.equal(true);
1094
1094
  });
1095
1095
 
1096
- it('should add gpid to the request', function () {
1096
+ it('should add preferred gpid to the request', function () {
1097
+ let testGpid = '/12345/my-gpt-tag-0';
1098
+ let bidRequest = deepClone(bidRequests[0]);
1099
+ bidRequest.ortb2Imp = { ext: { gpid: testGpid } };
1100
+
1101
+ const request = spec.buildRequests([bidRequest]);
1102
+ const payload = JSON.parse(request.data);
1103
+
1104
+ expect(payload.tags[0].gpid).to.exist.and.equal(testGpid)
1105
+ });
1106
+
1107
+ it('should add backup gpid to the request', function () {
1097
1108
  let testGpid = '/12345/my-gpt-tag-0';
1098
1109
  let bidRequest = deepClone(bidRequests[0]);
1099
1110
  bidRequest.ortb2Imp = { ext: { data: { pbadslot: testGpid } } };