Skip to content

Commit

Permalink
feat(realtimebidding): update the API
Browse files Browse the repository at this point in the history
#### realtimebidding:v1alpha

The following keys were added:
- schemas.BiddingFunction.properties.type.description
- schemas.BiddingFunction.properties.type.enum
- schemas.BiddingFunction.properties.type.enumDescriptions
- schemas.BiddingFunction.properties.type.type
  • Loading branch information
yoshi-automation authored and bcoe committed May 3, 2021
1 parent e506eff commit 7fd2e32
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
16 changes: 15 additions & 1 deletion discovery/realtimebidding-v1alpha.json
Expand Up @@ -178,7 +178,7 @@
}
}
},
"revision": "20210406",
"revision": "20210429",
"rootUrl": "https://realtimebidding.googleapis.com/",
"schemas": {
"BiddingFunction": {
Expand All @@ -192,6 +192,20 @@
"name": {
"description": "The name of the bidding function that must follow the pattern: `bidders/{bidder_account_id}/biddingFunctions/{bidding_function_name}`.",
"type": "string"
},
"type": {
"description": "The type of the bidding function to be created.",
"enum": [
"FUNCTION_TYPE_UNSPECIFIED",
"TURTLEDOVE_SIMULATION_BIDDING_FUNCTION",
"FLEDGE_BIDDING_FUNCTION"
],
"enumDescriptions": [
"Default value that should not be used.",
"Bidding function that can be used by Authorized Buyers in the original TURTLEDOVE simulation. See The function takes in a Javascript object, `inputs`, that contains the following named fields: `openrtbContextualBidRequest` OR `googleContextualBidRequest`, `customContextualSignal`, `interestBasedBidData`, `interestGroupData`, `recentImpressionAges`, and returns the bid price CPM. Example: ``` /* Returns a bid price CPM. * * @param {Object} inputs an object with the * following named fields: * - openrtbContextualBidRequest * OR googleContextualBidRequest * - customContextualSignal * - interestBasedBidData * - interestGroupData * - recentImpressionAges */ function biddingFunction(inputs) { ... return inputs.interestBasedBidData.cpm * inputs.customContextualSignals.placementMultiplier; } ```",
"Buyer's interest group bidding function that can be used by Authorized Buyers in the FLEDGE simulation. See the FLEDGE explainer at https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding. The function takes one argument, `inputs`, that contains an object with the following named fields of the form: ``` { \"interestGroup\" : [ { \"buyerCreativeId\": \"...\", # Ad creative ID \"adData\": { # any JSON of your choosing }, \"userBiddingSignals\": { . # any JSON of your choosing } } ], \"auctionSignals\": { \"url: # string, \"slotVisibility\": # enum value, \"slotDimensions\": [ { \"height\": # number value \"width\": # number value } ] }, \"perBuyerSignals\": { # Any JSON }, \"trustedBiddingSignals\": { # Any JSON }, \"browserSignals\": { \"recent_impression_ages_secs: [ # number ] } } ``` `interestGroup`: An object containing a list of `ad` objects, which contain the following named fields: - `buyerCreativeId`: The ad creative ID string. - `adData`: Any JSON value of the bidder's choosing to contain data associated with an ad provided in `BidResponse.ad.adslot.ad_data` for the Google Authorized Buyers protocol and `BidResponse.seatbid.bid.ext.ad_data` for the OpenRTB protocol. - `userBiddingSignals`: Any JSON value of the bidder's choosing containing interest group data that corresponds to user_bidding_signals (as in FLEDGE). This field will be populated from `BidResponse.interest_group_map.user_bidding_signals` for Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. `auctionSignals`: Contains data from the seller. It corresponds to the auction signals data described in the FLEDGE proposal. It is an object containing the following named fields: - `url`: The string URL of the page with parameters removed. - `slotVisibility`: Enum of one of the following potential values: - NO_DETECTION = 0 - ABOVE_THE_FOLD = 1 - BELOW_THE_FOLD = 2 - `slotDimensions`: A list of objects containing containing width and height pairs in `width` and `height` fields, respectively, from `BidRequest.adslot.width` and `BidRequest.adslot.height` for the Google Authorized Buyers protocol and `BidRequest.imp.banner.format.w` and `BidRequest.imp.banner.format.h` for the OpenRTB protocol. `perBuyerSignals`: The contextual signals from the bid response that are populated in `BidResponse.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the OpenRTB protocol. These signals can be of any JSON format of your choosing, however, the buyer's domain name must match between: - the interest group response in `BidResponse.interest_group_map.buyer_domain` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_map.buyer_domain` for the OpenRTB protocol. - the contextual response as a key to the map in `BidResponse.interest_group_bidding.interest_group_buyers` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_bidding.interest_group_buyers` for the OpenRTB protocol. In other words, there must be a match between the buyer domain of the contextual per_buyer_signals and the domain of an interest group. `trustedBiddingSignals`: The trusted bidding signals that corresponds to the trusted_bidding_signals in the FLEDGE proposal. It is provided in the interest group response as `BidResponse.interest_group_map.user_bidding_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. This field can be any JSON format of your choosing. `browserSignals`: An object of simulated browser-provider signals. It is an object with a single named field, `recent_impression_ages_secs`, that contains a list of estimated number value recent impression ages in seconds for a given interest group. The function returns the string creative ID of the selected ad, the bid price CPM, and (optionally) selected product IDs. Example: ``` function biddingFunction(inputs) { ... return { \"buyerCreativeId\": \"ad_creative_id_1\", \"bidPriceCpm\": 0.3, \"productIds\": [\"product_id_1\", \"product_id_2\", \"product_id_3\"] } } ```"
],
"type": "string"
}
},
"type": "object"
Expand Down
10 changes: 8 additions & 2 deletions src/apis/realtimebidding/v1alpha.ts
Expand Up @@ -137,6 +137,10 @@ export namespace realtimebidding_v1alpha {
* The name of the bidding function that must follow the pattern: `bidders/{bidder_account_id\}/biddingFunctions/{bidding_function_name\}`.
*/
name?: string | null;
/**
* The type of the bidding function to be created.
*/
type?: string | null;
}
/**
* A response containing a list of a bidder's bidding functions.
Expand Down Expand Up @@ -204,7 +208,8 @@ export namespace realtimebidding_v1alpha {
* // request body parameters
* // {
* // "biddingFunction": "my_biddingFunction",
* // "name": "my_name"
* // "name": "my_name",
* // "type": "my_type"
* // }
* },
* });
Expand All @@ -213,7 +218,8 @@ export namespace realtimebidding_v1alpha {
* // Example response
* // {
* // "biddingFunction": "my_biddingFunction",
* // "name": "my_name"
* // "name": "my_name",
* // "type": "my_type"
* // }
* }
*
Expand Down

0 comments on commit 7fd2e32

Please sign in to comment.