/** * This module adds Multibid support to prebid.js * @module modules/multibid */ import type { BidderCode } from "../../src/types/common.d.ts"; type MultiBidConfig = ({ /** * A bidder code. */ bidder: BidderCode; bidders?: undefined; } | { /** * Multiple bidder codes. */ bidders: BidderCode[]; bidder?: undefined; }) & { /** * The number of bids the named bidder(s) can supply. Max of 9. */ maxBids: number; /** * An alternate (short) bidder code to send to the ad server. A number will be appended, starting from 2, e.g. hb_pb_PREFIX2. * If not provided, the extra bids will not go to the ad server. */ targetBiddercodePrefix?: string; }; declare module '../../src/config' { interface Config { multibid?: MultiBidConfig[]; } } /** * @summary validates multibid configuration entries * @param {Object[]} conf - example [{bidder: 'bidderA', maxbids: 2, prefix: 'bidA'}, {bidder: 'bidderB', maxbids: 2}] * @return {Boolean} */ export declare function validateMultibid(conf: any): boolean; /** * @summary addBidderRequests before hook * @param {Function} fn reference to original function (used by hook logic) * @param {Object[]} bidderRequests containing copy of each bidderRequest object */ export declare function adjustBidderRequestsHook(fn: any, bidderRequests: any): void; declare module '../../src/bidfactory' { interface BaseBid { multibidPrefix?: string; originalBidder?: BaseBid['bidderCode']; originalRequestId?: BaseBid['requestId']; targetingBidder?: string; } } /** * @summary addBidResponse before hook * @param {Function} fn reference to original function (used by hook logic) * @param {String} ad unit code for bid * @param {Object} bid object */ export declare const addBidResponseHook: import("../../src/hook.js").BeforeHook<"async", import("../../src/hook.js").Hookable<"async", (adUnitCode: string, bid: Partial, reject: (reason: typeof import("../../src/constants.js").REJECTION_REASON[keyof typeof import("../../src/constants.js").REJECTION_REASON]) => void, args_3: () => void) => void>>; /** * A descending sort function that will sort the list of objects based on the following: * - bids without dynamic aliases are sorted before bids with dynamic aliases */ export declare function sortByMultibid(a: any, b: any): 0 | 1 | -1; /** * @summary getHighestCpmBidsFromBidPool before hook * @param {Function} fn reference to original function (used by hook logic) * @param {Object[]} bidsReceived array of objects containing all bids from bid pool * @param {Function} highestCpmCallback function to reduce to only highest cpm value for each bidderCode * @param {Number} adUnitBidLimit bidder targeting limit, default set to 0 * @param {Boolean} hasModified default set to false, this hook modifies targeting and sets to true */ export declare function targetBidPoolHook(fn: any, bidsReceived: any, highestCpmCallback: any, adUnitBidLimit?: number, hasModified?: boolean): void; /** * Resets globally stored multibid configuration */ export declare const resetMultiConfig: () => void; /** * Resets globally stored multibid ad unit bids */ export declare const resetMultibidUnits: () => void; export declare function setOrtbExtPrebidMultibid(ortbRequest: any): void; export {};