forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'prebid:master' into UOE-11611
- Loading branch information
Showing
156 changed files
with
2,404 additions
and
2,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {gppDataHandler} from '../../src/consentHandler.js'; | ||
|
||
/** | ||
* Retrieves the GPP string value and additional GPP-related information. | ||
* This function extracts the GPP data, encodes it, and determines specific GPP flags such as GPI and applicable sections. | ||
* @return {Object} An object containing: | ||
* - `gppString` (string): The encoded GPP string value. | ||
* - `gpi` (number): An indicator representing whether GPP consent is available (0 if available, 1 if not). | ||
*/ | ||
export function getGppValue() { | ||
const gppData = gppDataHandler.getConsentData(); | ||
const gppString = gppData?.gppString || ''; | ||
const gpi = gppString ? 0 : 1; | ||
|
||
return { gppString, gpi }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {logError} from '../../src/utils.js'; | ||
|
||
export function interpretResponseUtil(serverResponse, {bidderRequest}, eachBidCallback) { | ||
const bids = []; | ||
if (!serverResponse.body || serverResponse.body.error) { | ||
let errorMessage = `in response for ${bidderRequest.bidderCode} adapter`; | ||
if (serverResponse.body && serverResponse.body.error) { errorMessage += `: ${serverResponse.body.error}`; } | ||
logError(errorMessage); | ||
return bids; | ||
} | ||
(serverResponse.body.tags || []).forEach(serverBid => { | ||
try { | ||
const bid = eachBidCallback(serverBid); | ||
if (bid) { | ||
bids.push(bid); | ||
} | ||
} catch (e) { | ||
// Do nothing | ||
} | ||
}); | ||
return bids; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function getCurrencyFromBidderRequest(bidderRequest) { | ||
return bidderRequest?.ortb2?.ext?.prebid?.adServerCurrency; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export function timeoutQueue() { | ||
const queue = []; | ||
return { | ||
submit(timeout, onResume, onTimeout) { | ||
const item = [ | ||
onResume, | ||
setTimeout(() => { | ||
queue.splice(queue.indexOf(item), 1); | ||
onTimeout(); | ||
}, timeout) | ||
]; | ||
queue.push(item); | ||
}, | ||
resume() { | ||
while (queue.length) { | ||
const [onResume, timerId] = queue.shift(); | ||
clearTimeout(timerId); | ||
onResume(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.