This package includes all of AIB's OpenRTB v2.5 spec types and enums in TypeScript.
Using npm:
$ npm i --save openrtb-types
Import needed types and use them to type-guard your code:
import {SeatBid, Bid, BidResponse} from 'openrtb-types'
let bid: Bid = {
id: 'abc',
impid: 'abc',
price: 1.23
};
let seatBid: SeatBid = {
bid: [bid]
};
let bidResponse: BidResponse = {
id: 'abc',
seatbid: [seatBid]
};