Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
428d4ed
Move slot templates from creative-opportunities.toml into trusted-ser…
prk-Jr May 29, 2026
9fe0f34
Namespace window globals under window._ts
prk-Jr May 29, 2026
cac4fd0
Fix ts.bids comment and test teardown in GPT globals rename
prk-Jr May 29, 2026
9aa7e89
Fix TsAdSlot formats type and extract ts_initial constant
prk-Jr May 29, 2026
2fa3eb8
Fix prettier formatting in reviewer findings plan doc
prk-Jr May 29, 2026
e592c3b
Add spec: Prebid creative rendering fix (hb_adid cache UUID + cache h…
prk-Jr May 29, 2026
be0ca38
Update spec: add AuctionBid conversion note, partial cache warning, T…
prk-Jr May 29, 2026
793a523
Add implementation plan: Prebid creative rendering fix
prk-Jr May 29, 2026
24f1c26
Add cache_id, cache_host, cache_path fields to Bid struct
prk-Jr May 29, 2026
7c31415
Fix rustfmt in parse_bid cache extraction tests
prk-Jr May 29, 2026
fc8b94d
Emit hb_adid from PBS Cache UUID and add hb_cache_host/hb_cache_path …
prk-Jr May 29, 2026
c44ae51
Integrate window._ts to window.tsjs
prk-Jr Jun 1, 2026
af6341d
Forward hb_cache_host/hb_cache_path to GPT targeting and add test cov…
prk-Jr Jun 1, 2026
d511897
Add inject_adm_for_testing debug flag for end-to-end creative validation
prk-Jr Jun 1, 2026
53e4fe8
Add TS pbRender bridge and APS apstag.setDisplayBids() integration
prk-Jr Jun 1, 2026
1d13c0f
Fix pbRender bridge: move to gpt bundle, install synchronously, add s…
prk-Jr Jun 1, 2026
3a10374
Add Phase B refresh handler, userID module config, and slim-Prebid UR…
prk-Jr Jun 2, 2026
9d76c31
Add server-side ad render bridge diagnostics
prk-Jr Jun 3, 2026
aab37f4
Intercept GAM for adm render
prk-Jr Jun 4, 2026
628f6d4
Auto-expand config.bidders for creative opportunity slots with empty …
prk-Jr Jun 5, 2026
5a83c83
Fix GAM adm intercept for APS async iframe rendering
prk-Jr Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions crates/js/lib/src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,49 @@ export interface AdUnit {
bids?: Bid[];
}

/** Minimal shape of a server-side auction slot injected into `window.tsjs.adSlots`. */
export interface AuctionSlot {
id: string;
gam_unit_path: string;
div_id: string;
formats: Array<[number, number]>;
targeting?: Record<string, string>;
}

/** Debug-only copy of server-side bid fields exposed for pipeline inspection. */
export interface AuctionDebugBidData {
slot_id?: string;
price?: number | null;
currency?: string;
creative?: string | null;
adomain?: string[] | null;
bidder?: string;
width?: number;
height?: number;
nurl?: string | null;
burl?: string | null;
ad_id?: string | null;
cache_id?: string | null;
cache_host?: string | null;
cache_path?: string | null;
metadata?: Record<string, unknown>;
}

/** Bid targeting data from the server-side auction, injected into `window.tsjs.bids`. */
export interface AuctionBidData {
hb_pb?: string;
hb_bidder?: string;
hb_adid?: string;
hb_cache_host?: string;
hb_cache_path?: string;
nurl?: string;
burl?: string;
/** Raw creative markup. Only present when `[debug] inject_adm_for_testing = true`. */
adm?: string;
/** Debug-only bid field mirror. Only present when `[debug] inject_adm_for_testing = true`. */
debug_bid?: AuctionDebugBidData;
}

export interface TsjsApi {
version: string;
que: Array<() => void>;
Expand All @@ -41,4 +84,20 @@ export interface TsjsApi {
error(...args: unknown[]): void;
debug(...args: unknown[]): void;
};

// ── Server-side auction runtime (populated by TS edge injection) ──────────
/** Ad slot definitions injected at <head> open. */
adSlots?: AuctionSlot[];
/** Winning bid targeting data injected before </body>. */
bids?: Record<string, AuctionBidData>;
/** Initialises GPT slots with server-side bid targeting and calls refresh(). */
adInit?: () => void;
/** GPT slot objects TS defined — used to destroy stale slots on SPA navigation. */
prevGptSlots?: unknown[];
/** Guards one-time-per-page enableSingleRequest/enableServices calls. */
servicesEnabled?: boolean;
/** Maps actualDivId → slotId for slotRenderEnded billing lookup. */
divToSlotId?: Record<string, string>;
/** Guards SPA pushState hook installation. */
spaHookInstalled?: boolean;
}
Loading
Loading