UNPKG

@topsort/toppie-sdk

Version:

Toppie sdk is a JS library that allows to integrate Topsort auctions and analytics into your website.

39 lines (38 loc) 1.01 kB
import { CreateBannerAuctionOptions } from 'services/banners/banner-auction'; import { config } from 'services/config'; import { EventCollector } from 'services/event-collector/event-collector'; declare class Toppie { eventCollector: EventCollector; config: typeof config; constructor(); init(opts: { appId: string; debug?: boolean; cookieName?: string; userId?: string; baseURL?: string; }): void; preload(): void; identify(opts: { userId: string; }): void; auctions(opts: { type: "banners"; target: { selector: string; } & Omit<CreateBannerAuctionOptions["target"], "target">; auction: CreateBannerAuctionOptions["auction"]; } | { type: "listings"; }): void; } declare const toppie: Toppie; declare global { interface Window { toppie: Toppie; __toppie_devtools__: { debug: (data: any) => void; }; } } export { toppie };