npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@openrtb-typings/v2.5

v0.1.3

Published

TypeScript definitions for OpenRTB v2.5

Downloads

126

Readme

OpenRTB v2.5 Type Definitions

This package provides TypeScript type definitions for OpenRTB v2.5. It allows you to handle programmatic advertising bid requests and responses while ensuring type safety.

Installation

npm install @openrtb-typings/v2.5

For bundle size optimization, IAB Category definitions are provided as a separate package:

npm install @openrtb-typings/iab-category

To install both packages together:

npm install @openrtb-typings/v2.5 @openrtb-typings/iab-category

Documentation

BidRequest

Type definitions related to bid requests.

// Usage example
import { BidRequest, App, Site } from '@openrtb-typings/v2.5';

// Creating a type-safe bid request
const request: BidRequest = {
  id: "bid-request-123",
  imp: [{
    id: "1",
    // ...
  }]
};

Provided type definitions:

  • App: Mobile application related information
  • Audio: Audio ad specifications
  • Banner: Banner ad specifications
  • BidRequest: Root element of bid request
  • Content: Information about content where ad is displayed
  • Data: User data segments
  • Device: Device information
  • Geo: Geographic information
  • Imp: Impression (ad slot) details
  • Metric: KPI metrics
  • Native: Native ad specifications
  • Pmp: Private marketplace settings
  • Publisher: Publisher information
  • Regs: Regulatory information
  • Site: Website related information
  • Source: Bid request delivery path information
  • User: User information
  • Video: Video ad specifications

For details, refer to the OpenRTB v2.5 documentation.

BidResponse

Type definitions related to bid responses.

Provided type definitions:

Bid: Individual bid information BidResponse: Root element of bid response SeatBid: Bidder group

Enum

Provides enums and constants used in the OpenRTB protocol.

// Usage example
import { APIFramework, CreativeAttribute } from '@openrtb-typings/v2.5';

const framework: APIFramework = APIFramework.VPAID_1_0;
const attribute: CreativeAttribute = CreativeAttribute.AUDIO_AUTO_PLAY;

Ad Display Related

  • BannerAdType

    • Indicates banner ad types (e.g., XHTML, HTML5)
    • Specifies ad creative rendering method
  • CreativeAttribute

    • Ad creative characteristics (audio autoplay, expandable, etc.)
    • Defines constraints on ad behavior and display methods
  • AdPosition

    • Ad display position (page top, bottom, sidebar, etc.)
    • Specifies placement information affecting viewability
  • ExpandableDirection

    • Direction of ad expansion (left, right, up, down, fullscreen)
    • Controls interactive ad behavior direction

API & Protocol Related

  • APIFramework

    • Ad execution environment (VPAID, MRAID, OMID, etc.)
    • Specifies API framework required for creative execution
  • Protocol

    • Video ad delivery protocol (VAST, DAAST)
    • Specifies version-specific ad delivery standards

Video Ad Related

  • VideoLinearity

    • Video ad display format (linear/non-linear)
    • Defines relationship with main content
  • VideoPlacement

    • Video ad placement type (in-stream, in-banner, etc.)
    • Specifies video ad display context
  • PlaybackMethod

    • Video playback start method (autoplay, click-to-play, etc.)
    • Controls playback behavior affecting user experience
  • PlaybackCessationMode

    • Video ad end conditions (on completion, on user action, etc.)
    • Controls ad playback end timing
  • StartDelay

    • Video ad start timing (pre-roll, mid-roll, post-roll)
    • Defines temporal relationship with main content

Quality & Content Related

  • ProductionQuality

    • Content production quality (professional, user-generated, etc.)
    • Indicates quality level of ad placement environment
  • CompanionType

    • Companion ad type (static image, HTML, etc.)
    • Specifies format of supplementary ads accompanying main ad
  • ContentDeliveryMethod

    • Content delivery method (streaming, progressive download)
    • Specifies technical delivery method
  • FeedType

    • Content feed type (music, radio, podcast, etc.)
    • Specifies media type where ad is inserted
  • VolumeNormalizationMode

    • Volume normalization method
    • Specifies ad audio control method
  • ContentContext

    • Content context (game, music, news, etc.)
    • Indicates category of ad display environment
  • IQGMediaRating

    • Media content quality rating
    • Rating based on IAB quality standards

Device & Location Related

  • LocationType

    • Location information acquisition method (GPS, IP address estimation, etc.)
    • Indicates geographic information accuracy and reliability
  • DeviceType

    • Device type (mobile, PC, CTV, etc.)
    • Specifies ad display device characteristics
  • ConnectionType

    • Network connection type (WiFi, cellular, etc.)
    • Affects quality and types of deliverable ads
  • IPLocationService

    • IP location service provider
    • Specifies geographic information data source

Bidding Related

  • NoBidReasonCode

    • Reasons for not participating in bid (technical error, no inventory, invalid request, etc.)
    • Used for debugging and optimization
  • LossReasonCode

    • Reasons for bid failure (insufficient price, delay, etc.)
    • Used for improving bidding strategy