Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsDoc Lint Fix : multiple adapters and modules #11103

Merged
merged 29 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/appnexusUtils/anKeywords.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function convertKeywordStringToANMap(keyStr) {
}

/**
* @param {Array<String>} kwarray: keywords as an array of strings
* @param {Array<String>} kwarray keywords as an array of strings
* @return {{}} appnexus-style keyword map
*/
function convertKeywordsToANMap(kwarray) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/keywords/keywords.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ORTB_KEYWORDS_PATHS = ['user.keywords'].concat(
);

/**
* @param commaSeparatedKeywords: any number of either keyword arrays, or comma-separated keyword strings
* @param commaSeparatedKeywords any number of either keyword arrays, or comma-separated keyword strings
* @returns an array with all unique keywords contained across all inputs
*/
export function mergeKeywords(...commaSeparatedKeywords) {
Expand Down
2 changes: 2 additions & 0 deletions libraries/objectGuard/objectGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {isData, objectTransformer, sessionedApplies} from '../../src/activities/
import {deepAccess, deepClone, deepEqual, deepSetValue} from '../../src/utils.js';

/**
* @typedef {import('../src/activities/redactor.js').TransformationRuleDef} TransformationRuleDef
* @typedef {import('../src/adapters/bidderFactory.js').TransformationRule} TransformationRule
* @typedef {Object} ObjectGuard
* @property {*} obj a view on the guarded object
* @property {function(): void} verify a function that checks for and rolls back disallowed changes to the guarded object
Expand Down
4 changes: 4 additions & 0 deletions libraries/objectGuard/ortbGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import {
import {objectGuard, writeProtectRule} from './objectGuard.js';
import {mergeDeep} from '../../src/utils.js';

/**
* @typedef {import('./objectGuard.js').ObjectGuard} ObjectGuard
*/

function ortb2EnrichRules(isAllowed = isActivityAllowed) {
return [
{
Expand Down
1 change: 1 addition & 0 deletions libraries/video/shared/parentModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function ParentModule(submoduleBuilder_) {
}

/**
* @typedef {import('../../../modules/videoModule/coreVideo.js').vendorSubmoduleDirectory} vendorSubmoduleDirectory
* @typedef {Object} SubmoduleBuilder
* @summary Instantiates submodules
* @param {vendorSubmoduleDirectory} submoduleDirectory_
Expand Down
17 changes: 17 additions & 0 deletions modules/adotBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ import {config} from '../src/config.js';
import {OUTSTREAM} from '../src/video.js';
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
* @typedef {import('../src/adapters/bidderFactory.js').SyncOptions} SyncOptions
* @typedef {import('../src/adapters/bidderFactory.js').UserSync} UserSync
* @typedef {import('../src/adapters/bidderFactory.js').MediaType} MediaType
* @typedef {import('../src/adapters/bidderFactory.js').Site} Site
* @typedef {import('../src/adapters/bidderFactory.js').Device} Device
* @typedef {import('../src/adapters/bidderFactory.js').User} User
* @typedef {import('../src/adapters/bidderFactory.js').Banner} Banner
* @typedef {import('../src/adapters/bidderFactory.js').Video} Video
* @typedef {import('../src/adapters/bidderFactory.js').AdUnit} AdUnit
* @typedef {import('../src/adapters/bidderFactory.js').Imp} Imp
*/

const BIDDER_CODE = 'adot';
const ADAPTER_VERSION = 'v2.0.0';
const GVLID = 272;
Expand Down
1 change: 0 additions & 1 deletion modules/adriverIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const adriverIdSubmodule = {
* performs action to obtain id and return a value in the callback's response argument
* @function
* @param {SubmoduleConfig} [config]
* @param {ConsentData} [consentData]
* @returns {IdResponse|undefined}
*/
getId(config) {
Expand Down
3 changes: 2 additions & 1 deletion modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {chunk} from '../libraries/chunk/chunk.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
*/

const subdomainSuffixes = ['', 1, 2];
Expand Down Expand Up @@ -119,7 +120,7 @@ export const spec = {
/**
* Unpack the response from the server into a list of bids
* @param serverResponse
* @param bidderRequest
* @param adapterRequest
* @return {Bid[]} An array of bids which were nested inside the server
*/
interpretResponse: function (serverResponse, { adapterRequest }) {
Expand Down
4 changes: 3 additions & 1 deletion modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
*/

const VERSION = '1.0';
Expand Down Expand Up @@ -62,7 +63,8 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {bidRequests} - bidRequests.bids[] is an array of AdUnits and bids
* @param {BidRequest} bidRequests is an array of AdUnits and bids
* @param {BidderRequest} bidderRequest
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function (bidRequests, bidderRequest) {
Expand Down
2 changes: 1 addition & 1 deletion modules/airgridRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function init(rtdConfig, userConsent) {

/**
* Real-time data retrieval from AirGrid
* @param {Object} reqBidsConfigObj
* @param {Object} bidConfig
* @param {function} onDone
* @param {Object} rtdConfig
* @param {Object} userConsent
Expand Down
9 changes: 6 additions & 3 deletions modules/akamaiDapRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import {isPlainObject, mergeDeep, logMessage, logInfo, logError} from '../src/ut
import { loadExternalScript } from '../src/adloader.js';
import {MODULE_TYPE_RTD} from '../src/activities/modules.js';

/**
* @typedef {import('../modules/rtdModule/index.js').RtdSubmodule} RtdSubmodule
*/

const MODULE_NAME = 'realTimeData';
const SUBMODULE_NAME = 'dap';
const MODULE_CODE = 'akamaidap';
Expand Down Expand Up @@ -44,9 +48,8 @@ function mergeLazy(target, source) {

/**
* Add real-time data & merge segments.
* @param {Object} ortb2 destionation object to merge RTD into
* @param {Object} ortb2 destination object to merge RTD into
* @param {Object} rtd
* @param {Object} rtdConfig
*/
export function addRealTimeData(ortb2, rtd) {
logInfo('DEBUG(addRealTimeData) - ENTER');
Expand All @@ -60,7 +63,7 @@ export function addRealTimeData(ortb2, rtd) {

/**
* Real-time data retrieval from Audigent
* @param {Object} reqBidsConfigObj
* @param {Object} bidConfig
* @param {function} onDone
* @param {Object} rtdConfig
* @param {Object} userConsent
Expand Down
2 changes: 1 addition & 1 deletion modules/apacdexBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function validateGeoObject(geo) {
* Get bid floor from Price Floors Module
*
* @param {Object} bid
* @returns {float||null}
* @returns {?number}
*/
function getBidFloor(bid) {
if (!isFn(bid.getFloor)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/appierBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {bidRequests[]} - an array of bids
* @param {object} bidRequests - an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function (bidRequests, bidderRequest) {
Expand Down
3 changes: 2 additions & 1 deletion modules/astraoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { BANNER } from '../src/mediaTypes.js'
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
*/

const BIDDER_CODE = 'astraone';
Expand Down Expand Up @@ -100,7 +101,7 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequests[]} - an array of bids
* @param {validBidRequests} validBidRequests an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests(validBidRequests, bidderRequest) {
Expand Down
12 changes: 9 additions & 3 deletions modules/beopBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
import {config} from '../src/config.js';
import {getAllOrtbKeywords} from '../libraries/keywords/keywords.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
*/

const BIDDER_CODE = 'beop';
const ENDPOINT_URL = 'https://hb.beop.io/bid';
const TCF_VENDOR_ID = 666;
Expand All @@ -25,7 +31,7 @@ export const spec = {
/**
* Test if the bid request is valid.
*
* @param {bid} : The Bid params
* @param {Bid} bid The Bid params
* @return boolean true if the bid request is valid (aka contains a valid accountId or networkId and is open for BANNER), false otherwise.
*/
isBidRequestValid: function(bid) {
Expand All @@ -41,8 +47,8 @@ export const spec = {
/**
* Create a BeOp server request from a list of BidRequest
*
* @param {validBidRequests[], ...} : The array of validated bidRequests
* @param {... , bidderRequest} : Common params for each bidRequests
* @param {validBidRequests} validBidRequests The array of validated bidRequests
* @param {BidderRequest} bidderRequest Common params for each bidRequests
* @return ServerRequest Info describing the request to the BeOp's server
*/
buildRequests: function(validBidRequests, bidderRequest) {
Expand Down
3 changes: 2 additions & 1 deletion modules/betweenBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {getAdUnitSizes} from '../libraries/sizeUtils/sizeUtils.js';
/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
* @typedef {import('../src/adapters/bidderFactory.js').SyncOptions} SyncOptions
* @typedef {import('../src/adapters/bidderFactory.js').UserSync} UserSync
Expand All @@ -31,7 +32,7 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequest?pbjs_debug=trues[]} - an array of bids
* @param {validBidRequests} validBidRequests an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function(validBidRequests, bidderRequest) {
Expand Down
5 changes: 4 additions & 1 deletion modules/bidglassBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
*/

Expand All @@ -24,7 +26,8 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequests[]} - an array of bids
* @param {validBidRequests} validBidRequests an array of bids
* @param {BidderRequest} bidderRequest request by bidder
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function(validBidRequests, bidderRequest) {
Expand Down
3 changes: 1 addition & 2 deletions modules/bliinkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function getDomLoadingDuration() {
}

/**
* @param bidRequest
* @param bidResponse
* @return {({cpm, netRevenue: boolean, requestId, width: number, currency, ttl: number, creativeId, height: number}&{mediaType: string, vastXml})|null}
*/
export const buildBid = (bidResponse) => {
Expand Down Expand Up @@ -285,7 +285,6 @@ export const buildRequests = (validBidRequests, bidderRequest) => {
* @description Parse the response (from buildRequests) and generate one or more bid objects.
*
* @param serverResponse
* @param request
* @return
*/
const interpretResponse = (serverResponse) => {
Expand Down
5 changes: 2 additions & 3 deletions modules/blueconicRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ function parseJson(data) {

/**
* Add real-time data & merge segments.
* @param {Object} bidConfig
* @param {Object} ortb2
* @param {Object} rtd
* @param {Object} rtdConfig
*/
export function addRealTimeData(ortb2, rtd) {
if (isPlainObject(rtd.ortb2)) {
Expand Down Expand Up @@ -82,7 +81,7 @@ export function getRealTimeData(reqBidsConfigObj, onDone, rtdConfig, userConsent
/**
* Module init
* @param {Object} provider
* @param {Objkect} userConsent
* @param {Object} userConsent
* @return {boolean}
*/
function init(provider, userConsent) {
Expand Down
2 changes: 2 additions & 0 deletions modules/brandmetricsRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function checkConsent (userConsent) {
/**
* Add event- listeners to hook in to brandmetrics events
* @param {Object} reqBidsConfigObj
* @param {Object} moduleConfig
* @param {function} callback
*/
function processBrandmetricsEvents (reqBidsConfigObj, moduleConfig, callback) {
Expand Down Expand Up @@ -114,6 +115,7 @@ function processBrandmetricsEvents (reqBidsConfigObj, moduleConfig, callback) {
/**
* Sets bid targeting of specific bidders
* @param {Object} reqBidsConfigObj
* @param {Object} moduleConfig
* @param {string} key Targeting key
* @param {string} val Targeting value
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/britepoolIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const britepoolIdSubmodule = {
* @function
* @param {SubmoduleConfig} [submoduleConfig]
* @param {ConsentData|undefined} consentData
* @returns {function(callback:function)}
* @returns {function}
*/
getId(submoduleConfig, consentData) {
const submoduleConfigParams = (submoduleConfig && submoduleConfig.params) || {};
Expand Down
1 change: 0 additions & 1 deletion modules/browsiRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function getAllSlots() {
/**
* get prediction and return valid object for key value set
* @param {number} p
* @param {string?} keyName
* @return {Object} key:value
*/
function getKVObject(p) {
Expand Down
1 change: 0 additions & 1 deletion modules/buzzoolaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const spec = {
* Unpack the response from the server into a list of bids.
*
* @param {ServerResponse} serverResponse A successful response from the server.
* @param bidderRequest
* @return {Bid[]} An array of bids which were nested inside the server.
*/
interpretResponse: function ({body}, {data}) {
Expand Down
3 changes: 2 additions & 1 deletion modules/codefuelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {BANNER} from '../src/mediaTypes.js';
/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
* @typedef {import('../src/adapters/bidderFactory.js').SyncOptions} SyncOptions
* @typedef {import('../src/adapters/bidderFactory.js').UserSync} UserSync
Expand Down Expand Up @@ -32,7 +33,7 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequests[]} - an array of bids
* @param {validBidRequests} validBidRequests - an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function(validBidRequests, bidderRequest) {
Expand Down
16 changes: 13 additions & 3 deletions modules/dsp_genieeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { BANNER } from '../src/mediaTypes.js';
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
import { deepAccess, deepSetValue } from '../src/utils.js';
import { config } from '../src/config.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').validBidRequests} validBidRequests
* @typedef {import('../src/adapters/bidderFactory.js').BidderRequest} BidderRequest
* @typedef {import('../src/adapters/bidderFactory.js').ServerResponse} ServerResponse
* @typedef {import('../src/adapters/bidderFactory.js').SyncOptions} SyncOptions
* @typedef {import('../src/adapters/bidderFactory.js').UserSync} UserSync
*/

const BIDDER_CODE = 'dsp_geniee';
const ENDPOINT_URL = 'https://rt.gsspat.jp/prebid_auction';
const ENDPOINT_URL_UNCOMFORTABLE = 'https://rt.gsspat.jp/prebid_uncomfortable';
Expand Down Expand Up @@ -44,7 +54,7 @@ export const spec = {
/**
* Determines whether or not the given bid request is valid.
*
* @param {BidRequest} - The bid params to validate.
* @param {BidRequest} _ The bid params to validate.
* @return boolean True if this is a valid bid, and false otherwise.
*/
isBidRequestValid: function (_) {
Expand All @@ -53,8 +63,8 @@ export const spec = {
/**
* Make a server request from the list of BidRequests.
*
* @param {validBidRequests[]} - an array of bids
* @param {bidderRequest} - the master bidRequest object
* @param {validBidRequests} validBidRequests - an array of bids
* @param {BidderRequest} bidderRequest - the master bidRequest object
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function (validBidRequests, bidderRequest) {
Expand Down
4 changes: 2 additions & 2 deletions modules/dspxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ function getBannerSizes(bid) {

/**
* Parse size
* @param sizes
* @returns {width: number, h: height}
* @param size
* @returns {object} sizeObj
*/
function parseSize(size) {
let sizeObj = {}
Expand Down
Loading