import { REJECTION_REASON } from '../src/constants.js'; import type { Currency, BidderCode } from "../src/types/common.d.ts"; export declare var currencySupportEnabled: boolean; export declare var currencyRates: any; export declare let responseReady: import("../src/utils/promise.js").Defer; export interface CurrencyConfig { /** * ISO 4217 3-letter currency code that represents the target currency. (e.g. 'EUR'). If this value is present, * the currency conversion feature is activated. */ adServerCurrency: Currency; /** * Optional URL to a file containing currency conversion data. Prebid.org hosts a file that is used as the default, * if not specified. */ conversionRateFile?: string; /** * Time (in milliseconds) that auctions should be delayed to wait for conversion rates to load. Default is 0. */ auctionDelay?: number; /** * A decimal value representing how much to scale the price granularity calculations. */ granularityMultiplier?: number; /** * This optional argument allows you to specify the rates with a JSON object, subverting the need for a external * config.conversionRateFile parameter. If this argument is specified, the conversion rate file will not be loaded. * * example: * { * 'GBP': { 'CNY': 8.8282, 'JPY': 141.7, 'USD': 1.2824 }, * 'USD': { 'CNY': 6.8842, 'GBP': 0.7798, 'JPY': 110.49 } * } */ rates?: { [from: Currency]: { [to: Currency]: number; }; }; /** * This optional currency rates definition follows the same format as config.rates, however it is only utilized if * there is an error loading the config.conversionRateFile. */ defaultRates?: CurrencyConfig['rates']; /** * An optional argument to specify bid currencies for bid adapters. This option is provided for the transitional phase * before every bid adapter will specify its own bid currency. If the adapter specifies a bid currency, this value is * ignored for that bidder. * * example: * { * rubicon: 'USD' * } */ bidderCurrencyDefault?: { [bidder: BidderCode]: Currency; }; } declare module '../src/config' { interface Config { currency?: CurrencyConfig; } } export declare function setConfig(config: CurrencyConfig): void; declare module '../src/prebidGlobal' { interface PrebidJS { convertCurrency: typeof convertCurrency; } } /** * Convert `amount` in currency `fromCurrency` to `toCurrency`. */ declare function convertCurrency(cpm: any, fromCurrency: any, toCurrency: any): number; export declare function resetCurrency(): void; declare module '../src/bidfactory' { interface BaseBid { /** * Convert this bid's CPM into the given currency. * @return the converted CPM as a string with 3 digit precision. */ getCpmInNewCurrency(toCurrency: Currency): string; } } export declare const addBidResponseHook: import("../src/hook.js").BeforeHook<"async", import("../src/hook.js").Hookable<"async", (adUnitCode: string, bid: Partial, reject: (reason: (typeof REJECTION_REASON)[keyof typeof REJECTION_REASON]) => void, args_3: () => void) => void>>; export declare function setOrtbCurrency(ortbRequest: any, bidderRequest: any, context: any): void; export declare const requestBidsHook: import("../src/hook.js").BeforeHook<"async", (options: import("../src/prebid.ts").PrivRequestBidsOptions | import("../src/prebid.ts").StartAuctionOptions) => void>; export {};