diff --git a/lib/addons/paapi.ts b/lib/addons/paapi.ts index acbcd60..5da24dd 100644 --- a/lib/addons/paapi.ts +++ b/lib/addons/paapi.ts @@ -9,11 +9,15 @@ declare global { type GPTSlotFilter = (slot: googletag.Slot) => boolean; +type RunAdAuctionOptions = { + iframe?: boolean; +}; + declare module "../sdk" { export interface OptableSDK { joinAdInterestGroups: () => Promise; auctionConfigFromCache: () => AuctionConfig | null; - runAdAuction: (domID: string) => Promise; + runAdAuction: (domID: string, options?: RunAdAuctionOptions) => Promise; installGPTAuctionConfigs: (filter?: GPTSlotFilter) => void; } } @@ -92,7 +96,7 @@ OptableSDK.prototype.installGPTAuctionConfigs = function (filter?: GPTSlotFilter /* * runAdAuction runs an ad auction locally for a given spot dom ID. */ -OptableSDK.prototype.runAdAuction = async function (domID: string): Promise { +OptableSDK.prototype.runAdAuction = async function (domID: string, options?: RunAdAuctionOptions): Promise { const supported = "runAdAuction" in navigator; if (!supported) { throw "run-ad-auction not supported"; @@ -114,16 +118,32 @@ OptableSDK.prototype.runAdAuction = async function (domID: string): Promise