/** * Perform a partial pre-merge of bidder config for PBS. * * Prebid.js and Prebid Server use different strategies for merging global and bidder-specific config; JS attemps to * merge arrays (concatenating them, with some deduping, cfr. mergeDeep), while PBS only merges objects - * a bidder-specific array will replace a global array. * * This returns bidder config (from `bidder`) where arrays are replaced with what you get from merging them with `global`, * so that the result of merging in PBS is the same as in JS. */ export function getPBSBidderConfig({ global, bidder }: { global: any; bidder: any; }): { [k: string]: { [k: string]: any; }; }; /** * Extract all EIDs from FPD. * * Returns {eids, conflicts}, where: * * - `eids` contains an object of the form `{eid, bidders}` for each unique EID object found anywhere in FPD; * `bidders` is a list of all the bidders that refer to that specific EID object, or false if that EID object is defined globally. * - `conflicts` is a set containing all EID sources that appear in multiple, otherwise different, EID objects. */ export function extractEids({ global, bidder }: { global: any; bidder: any; }): { eids: { eid: any; bidders: any[]; }[]; conflicts: Set; }; /** * Consolidate extracted EIDs to take advantage of PBS's eidpermissions feature: * https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#eid-permissions * * If different bidders have different EID configurations, in most cases we can avoid repeating it in each bidder's * specific config. As long as there are no conflicts (different EID objects that refer to the same source constitute a conflict), * the EID can be set as global, and eidpermissions can restrict its access only to specific bidders. * * Returns {global, bidder, permissions}, where: * - `global` is a list of global EID objects (some of which may be restricted through `permissions` * - `bidder` is a map from bidder code to EID objects that are specific to that bidder, and cannot be restricted through `permissions` * - `permissions` is a list of EID permissions as expected by PBS. */ export function consolidateEids({ eids, conflicts }: { eids: any; conflicts?: Set; }): { global: any[]; permissions: { source: any; bidders: any; }[]; bidder: {}; }; export function premergeFpd(ortb2Fragments: any, requestedBidders: any): any;