@types/pxr-oneline
TypeScript icon, indicating that this package has built-in type declarations

1.5.1 • Public • Published

Installation

npm install --save @types/pxr-oneline

Summary

This package contains type definitions for pxr-oneline (https://github.com/diogopxrnextday/pxr-advertising).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pxr-oneline.

declare namespace OneLine {
    interface OneLine {
        event: EventObject;
        adUnitRequest(arrFoAdIds?: string[], allowReload?: boolean): void;
        preBidAdUnit(prebidBids: PrebidBids, gtag: string, isDebug: boolean): any;
        requestVideoPlayerAds(onBiddingComplete: () => void): void;
        buildVideoUrl(
            bidder: BidderConfig[],
            placementID: string,
            customParams: VideoCustomParameters,
            videoTitle?: string,
        ): string;
    }
    interface VideoCustomParameters {
        [key: string]: number | string | undefined;
    }

    interface VideoParameters {
        cust_params: VideoCustomParameters;
        iu: string;
        output: string;
    }

    interface BidderParams {
        placementId: string;
    }

    interface BidderConfig {
        bidder: string;
        params: BidderParams;
    }

    interface PrebidBids {
        [key: string]: {
            bidder: string;
            params: {
                placementId: string;
            };
        };
    }

    interface EventObject {
        o: { [key: string]: (NoParamFunction[] | "ONE-TIME-DONE") | (ParamFunction[] | "ONE-TIME-DONE") };
        topic: {
            tcfReady: string;
            documentReady: string;
            isEmpty: string;
            isNotEmpty: string;
            ageGateReady: string;
            socialVendorsReady: string;
        };
        cons: {
            OneTime: string;
        };
        subscribe(topic: string, fn: NoParamFunction): void;
        subscribe(topic: EventObject["topic"]["socialVendorsReady"], fn: (data: SocialVendorConsents) => void): void;
        broadcast(oneTime: boolean, topic: string, data?: any): void;
    }

    interface SocialVendorConsents {
        vendors: {
            tiktok: boolean;
            twitter: boolean;
            youtube: boolean;
            instagram: boolean;
            facebook: boolean;
            google_maps: boolean;
            spotify: boolean;
        };
    }

    type NoParamFunction = () => void;
    type ParamFunction = (arg: any) => void;
}

declare const OneLine: OneLine.OneLine;
export = OneLine;

Additional Details

  • Last updated: Tue, 12 Nov 2024 08:36:17 GMT
  • Dependencies: none

Credits

These definitions were written by PXR Advertising.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/pxr-oneline

Weekly Downloads

484

Version

1.5.1

License

MIT

Unpacked Size

6.97 kB

Total Files

5

Last publish

Collaborators

  • types