import type {AllConsentData} from "../../src/consentHandler.ts"; import type {AdUnitCode, ByAdUnit, StorageDisclosure} from "../../src/types/common"; import {EVENTS} from '../../src/constants.ts'; import type {EventPayload} from "../../src/events.ts"; import type {TargetingMap} from "../../src/targeting.ts"; import type {StartAuctionOptions} from "../../src/prebid.ts"; export type RTDProvider = string; // eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface ProviderConfig { /** * Map from ID provider name to the type of their configuration params. */ } type BaseConfig
= { /** * RTD provider name. */ name: P; /** * If true, delay the auction up to `auctionDelay` milliseconds to wait for this module. */ waitForIt?: boolean; } export type RTDProviderConfig
= BaseConfig
& (
P extends keyof ProviderConfig ? ProviderConfig[P] : Record = {
[EV in RTDEvent]: (payload: EventPayload , consent: AllConsentData) => void;
};
export type RtdProviderSpec = Partial , consent: AllConsentData) => boolean;
getTargetingData?: (adUnitCodes: AdUnitCode[], config: RTDProviderConfig , consent: AllConsentData, auction: EventPayload , consent: AllConsentData, timeout: number) => void;
onDataDeletionRequest?: (config: RTDProviderConfig ) => void;
}
declare module '../../src/hook' {
interface Submodules {
realTimeData: [RtdProviderSpec