chromium/third_party/blink/public/mojom/interest_group/interest_group_types.mojom

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module blink.mojom;

import "mojo/public/mojom/base/int128.mojom";
import "mojo/public/mojom/base/time.mojom";
import "mojo/public/mojom/base/unguessable_token.mojom";
import "mojo/public/mojom/base/uuid.mojom";
import "third_party/blink/public/mojom/interest_group/ad_display_size.mojom";
import "url/mojom/origin.mojom";
import "url/mojom/url.mojom";

// An advertisement to display for an interest group.
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md#12-interest-group-attributes
struct InterestGroupAd {
  // Must use https.
  // string is used instead of url.mojom.Url to improve performance, since the
  // browser process only needs to pass this value as-is to worklet processes.
  // Validated by InterestGroup::IsValid(), which is called by typemapping.
  string render_url;
  // Optional size groups assigned to this Ad.
  string? size_group;
  // Optional identifiers that may be passed to reporting functions, if
  // sufficiently k-anonymous. Only meaningful in `InterestGroup.ads`, but
  // ignored in `InterestGroup.ad_components`. Where `buyer_reporting_id`
  // and `buyer_and_seller_reporting_id` are used as is, only one of the
  // elements in `selectable_buyer_and_seller_reporting_idss`, as indicated
  // by the response from `generateBid`, will be passed to the relevant
  // reporting functions.
  string? buyer_reporting_id;
  string? buyer_and_seller_reporting_id;
  array<string>? selectable_buyer_and_seller_reporting_ids;

  // Opaque JSON data, persisted, then passed as object to auction worklet.
  string? metadata;
  // Optional alias to use with B&A auctions.
  string? ad_render_id;
  // A list of up to `kMaxAllowedReportingOrigins` reporting origins that can
  // receive reports with macros. All origins must be HTTPS. Only meaningful in
  // `InterestGroup.ads`, but ignored in `InterestGroup.ad_components`.
  array<url.mojom.Origin>? allowed_reporting_origins;
};

// The maximum size of a valid interest group in bytes.
const uint32 kMaxInterestGroupSize = 1048576; // 1 * 1024 * 1024

// The maximum number of allowed reporting origins.
const uint16 kMaxAllowedReportingOrigins = 10;

// Permissions granted by an interest group to sellers.
struct SellerCapabilities {
  // Iff true, reports interest group and bid counts to the given seller.
  bool allows_interest_group_counts = false;
  // Iff true, reports bid and trusted signals fetch latency to the given
  // seller.
  bool allows_latency_stats = false;
};

// Controls fields sent for Bidding and Auction API server-side auctions.
struct AuctionServerRequestFlags {
  // If true, the ads and componentAds fields from the interest group are
  // omitted in the auction request. The ad render ID (or the full ad if
  // `include_full_ads` is also specified) would still be sent as part of the
  // `prevWins` field.
  bool omit_ads = false;
  // If true, the full ad object (including adRenderId) will be sent to the
  // auction server instead of just the ad render ID in all places where an ad
  // render ID would appear (currently just the ads, componentAds and prevWins
  // fields).
  bool include_full_ads = false;
  bool omit_user_bidding_signals = false;
};

// A container used for making changes to ad render URLs. 'match' is what we use
// to find a match within the url, and 'replacement' is what we replace it with.
struct AdKeywordReplacement {
  string match;
  string replacement;
};

// Interest group description, passed to JoinInterestGroup(). If an entry keyed
// by (owner, name) already exists, we "merge" by overwriting specified fields,
// leaving other existing fields intact.
//
// Interest groups are persisted and used as inputs to FLEDGE auctions.
// Therefore, any enumeration types used in the interest group should be
// marked [Stable].
//
// All URLs and origins must use https.
//
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md#11-joining-interest-groups
struct InterestGroup {
  [Stable, Extensible]
  // These values are persisted to logs. Entries should not be renumbered and
  // numeric values should never be reused.
  enum ExecutionMode {
    // kCompatibilityMode creates a new context for every execution. This is
    // potentially slow as it is only able to reuse the compilation cache from
    // other interest groups with the same bidding script.
    [Default] kCompatibilityMode = 0,
    // kGroupedByOriginMode, mode uses the same JavaScript context for groups
    // with the same joining origin. This can be much faster, but to mitigate
    // any privacy leaks FLEDGE will clear all of the interest groups for a
    // joining origin if another origin joins or leaves one of the interest
    // groups.
    kGroupedByOriginMode = 1,
    // kFrozenContext mode uses a "frozen" JavaScript context to execute the
    // bidding scripts for all interest groups that share a common biddnig
    // script. After the script is loaded, the script context is frozen and
    // checked for any state that may persist between function execution. If any
    // potentially persistent state is identified, execution is abandoned.
    kFrozenContext = 2
  };

  [Stable, Extensible]
  enum TrustedBiddingSignalsSlotSizeMode {
    // No information about ad slot sizes is added as a query param of
    // trustedBiddingSignalsURL fetches.
    [Default] kNone,
    // Only the ad slot size of the current ad slot is added to the query param
    // of trustedBiddingSignalsURL fetches. It is called "slotSize".
    kSlotSize,
    // All add slot sizes specified in the top-level AuctionConfig is added to
    // the query param of trustedBiddingSignalsURL fetches. They are provided as
    // a single parameter called "slotSizes".
    kAllSlotsRequestedSizes,
  };

  mojo_base.mojom.Time expiry;
  // `owner` must match the current frame URL's origin.
  url.mojom.Origin owner;
  string name;

  // `priority` of the interest group.
  double priority = 0.0;

  // True if the interest group priority should be calculated using
  // vectors from bidding signals fetch.
  bool enable_bidding_signals_prioritization;

  // Sparse vector whose dot product with the AuctionConfig's priority signals
  // will be used in place of `priority`, if set.
  map<string, double>? priority_vector;

  // Sparse vector whose values override the AuctionConfig's corresponding
  // priority signals.
  map<string, double>? priority_signals_overrides;

  // For each seller, list the capabilities this interest group grants.
  map<url.mojom.Origin, SellerCapabilities>? seller_capabilities;
  // Specifies the default capabilities granted to sellers not listed in
  // `seller_capabilities`.
  SellerCapabilities all_sellers_capabilities;
  // `execution_mode` of the interest group.
  ExecutionMode execution_mode = kCompatibilityMode;
  // `trusted_bidding_signals_slot_size_mode` of the interest group.
  TrustedBiddingSignalsSlotSizeMode trusted_bidding_signals_slot_size_mode =
      kNone;
  // `bidding_url` must match the current frame URL's origin.
  url.mojom.Url? bidding_url;
  // `bidding_wasm_helper_url` must match the current frame URL's origin.
  url.mojom.Url? bidding_wasm_helper_url;
  // `update_url` must match the current frame URL's origin.
  url.mojom.Url? update_url;
  // `trusted_bidding_signals_url` must match the current frame URL's origin.
  url.mojom.Url? trusted_bidding_signals_url;
  array<string>? trusted_bidding_signals_keys;
  // Must not be a negative value.
  int32 max_trusted_bidding_signals_url_length = 0;
  // An optional field for matching the encryption key, and indicating which
  // version of the key-value server this interest group uses.
  url.mojom.Origin? trusted_bidding_signals_coordinator;
  // Opaque JSON data, persisted, then passed as object to auction worklet.
  string? user_bidding_signals;
  array<InterestGroupAd>? ads;
  array<InterestGroupAd>? ad_components;
  map<string, AdSize>? ad_sizes;
  map<string, array<string>>? size_groups;
  AuctionServerRequestFlags auction_server_request_flags;

  // The Ed25519 public key (a 256-bit EdDSA public key) used to guarantee that
  // this InterestGroup, if used by an additional bid for a negative targeting,
  // can only be used by its owner.
  array<uint8, 32>? additional_bid_key;

  // Origin for the Coordinator to be used for Private Aggregation.
  url.mojom.Origin? aggregation_coordinator_origin;
};

// Packages the details necessary for the browser process to retrieve a
// DirectFromSellerSignals resource of a subresource bundle -- the actual
// subresource URL is constructed by the browser process from the
// DirectFromSellerSignals `prefix` and the browser supplied suffix, as
// described in DirectFromSellerSignals.
//
// To fetch a subresource bundle URL from the browser process, the `bundle_url`,
// subresource URL (constructed from the prefix + suffix), token, and renderer
// process ID are needed.
//
// The resource is only available while the <script type="webbundle"> tag that
// declared the resource is still alive.
//
// TODO(crbug.com/1355887): Consider adding a mechanism to extend the lifetime
// of the subresource for the duration of the auction.
struct DirectFromSellerSignalsSubresource {
  // URL of the bundle (.wbn / "application/webbundle") file.
  url.mojom.Url bundle_url;

  // The UnguessableToken for this subresource, stored in the renderer's
  // ResourceFetcher.
  //
  // TODO(crbug.com/1364649): Change to use a base::TokenType specialization
  // along with other web / subresource bundle uses of UnguessableToken.
  mojo_base.mojom.UnguessableToken token;
};

// Signals to be loaded from resources in subresource bundle(s). Like
// `seller_signals`, `per_buyer_signals`, and `auction_signals` in
// AuctionAdConfigNonSharedParams, but the signals' contents are not revealed
// to the renderer process.
//
// The page specifies a URL prefix, and the subresource URLs of signals destined
// for particular origins are formed by concatenating a suffix (as described in
// field comments) to the prefix -- since the browser process is doing the
// concatenation, it can ensure that each signal is only given to the recipient
// intended by the seller.
//
// All subresource URLs must resolve to a valid application/json string. The
// origin of the prefix and the URL of each source bundle must have a scheme of
// https (uuid-in-package isn't supported since it doesn't support CORS), and
// each origin must match `seller` in AuctionAdConfig. The response must be
// served with the legacy headers `X-FLEDGE-Auction-Only: true` and
// `X-Allow-Fledge: true` or the new headers `Ad-Auction-Only: true` and
// `Ad-Auction-Allowed: true`. The request is made with CORS, using the caller
// of runAdAuction()'s frame as the initiator.
//
// The worklet process will parse the signals object and deliver it to worklet
// functions (generateBid(), scoreAd(), reportWin(), reportResult()).
//
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md#25-additional-trusted-signals-directfromsellersignals
struct DirectFromSellerSignals {
  // The prefix specified by the page. Must have no query string.
  url.mojom.Url prefix;

  // DirectFromSellerSignals for individual buyers. Keys determine the buyer
  // that should receive the signals loaded via the
  // DirectFromSellerSignalsSubresource value. The subresource URL should be:
  //
  // prefix + "?perBuyerSignals=" + encodeURIComponent(buyer_origin_key)
  //
  // where encodeURIComponent() is a function equivalent to the JavaScript
  // built-in function encodeURIComponent(), and buyer_origin_key is the buyer's
  // origin (and also the map key for the particular
  // DirectFromSellerSignalsSubresource).
  //
  // It's possible that not every buyer origin from `interest_group_buyers` is
  // present, or that any buyer is present -- only those subresource URLs that
  // are in the `interest_group_buyers` and have been declared in a
  // <script type="webbundle"> tag will be included.
  map<url.mojom.Origin, DirectFromSellerSignalsSubresource> per_buyer_signals;

  // directFromSellerSignals for the seller. The subresource URL should be:
  //
  // prefix + "?sellerSignals"
  //
  // iff such a subresource is declared in a <script type="webbundle"> tag.
  DirectFromSellerSignalsSubresource? seller_signals;

  // Signals that are delivered to all parties -- the seller, and all buyers.
  // The subresource URL should be:
  //
  // prefix + "?auctionSignals"
  //
  // iff such a subresource is declared in a <script type="webbundle"> tag.
  DirectFromSellerSignalsSubresource? auction_signals;
};

// See blink::AuctionConfig::MaybePromiseJson.
union AuctionAdConfigMaybePromiseJson {
  uint32 promise;  // value unused.
  string? value;
};

// See blink::AuctionConfig::MaybePromisePerBuyerSignals
union AuctionAdConfigMaybePromisePerBuyerSignals {
  uint32 promise;  // value unused

  // Keys of `value` must be valid HTTPS origins. Value is opaque
  // JSON data, passed as object to auction worklet.
  map<url.mojom.Origin, string>? value;
};

// See blink::AuctionConfig::BuyerTimeouts
struct AuctionAdConfigBuyerTimeouts {
  // The value restricts generateBid() script's runtime of all buyers with
  // unspecified timeouts, if not Null.
  mojo_base.mojom.TimeDelta? all_buyers_timeout;

  // Keys of `per_buyer_timeouts` must be valid HTTPS origins. Values restrict
  // the runtime of particular buyer's generateBid() scripts.
  map<url.mojom.Origin, mojo_base.mojom.TimeDelta>? per_buyer_timeouts;
};

// See blink::AuctionConfig::MaybePromisePerBuyerTimeouts
union AuctionAdConfigMaybePromiseBuyerTimeouts {
  uint32 promise;  // value unused
  AuctionAdConfigBuyerTimeouts value;
};

struct AdCurrency {
  // Must meet blink::IsValidAdCurrencyCode
  string currency_code;
};

// See blink::AuctionConfig::BuyerCurrencies
struct AuctionAdConfigBuyerCurrencies {
  // Requirement for bid currency that, if specified, will apply to all bids
  // made by buyers not specified in `per_buyer_currencies`.
  AdCurrency? all_buyers_currency;

  // Can provide a requirement for bid currency for buyers by origin.
  map<url.mojom.Origin, AdCurrency>? per_buyer_currencies;
};

// See blink::AuctionConfig::MaybePromiseBuyerCurrencies
union AuctionAdConfigMaybePromiseBuyerCurrencies {
  uint32 promise; // value unused
  AuctionAdConfigBuyerCurrencies value;
};

union AuctionAdConfigMaybePromiseDirectFromSellerSignals {
  uint32 promise;  // value unused
  DirectFromSellerSignals? value;
};

// See blink::AuctionConfig::MaybePromiseDeprecatedRenderURLReplacements
union AuctionAdConfigMaybePromiseDeprecatedRenderURLReplacements {
  uint32 promise;  // value unused
  array<AdKeywordReplacement> value;
};

struct AuctionAdServerResponseConfig {
  // The response will be filled in later when a promise resolves.
  mojo_base.mojom.Uuid request_id;
};

// TODO(alexmt): Consider merging with DebugModeDetails.
struct AuctionReportBuyerDebugModeConfig {
  bool is_enabled = false;

  // Must be null if `is_enabled` is false. Otherwise, optional.
  uint64? debug_key;
};

// For each report type, provides the bucket offset and scalar multiplier for
// that report.
//
// See blink::AuctionConfig::NonSharedParams::AuctionReportBuyersConfig.
struct AuctionReportBuyersConfig {
  // The bucket offset, added to the base per-buyer bucket value to obtain the
  // actual bucket number used for reporting.
  mojo_base.mojom.Uint128 bucket;

  // A scalar multiplier multiplied by the reported value, to control the amount
  // of noise added by the aggregation service. (Reading aggreaged reported
  // values is subject to a privacy budget, so this controls how much budget is
  // spent on each report).
  double scale;
};

// Subset of AuctionAdConfig that is not shared by all auctions that are
// using the same SellerWorklet object (so it's "not shared" between
// AuctionConfigs that share the same SellerWorklet). Other AuctionAdConfig
// parameters all must be the same for two auctions to share a Sellerworklet, or
// otherwise be parameters that don't need to be resent to each seller worklet
// method invocation.
struct AuctionAdConfigNonSharedParams {
  // For each report requested by the seller, this enum specifies the type of
  // the report.
  enum BuyerReportType {
    // The number of interest groups owned by buyers in `interest_group_buyers`,
    // unconstrained by `per_buyer_group_limits`.
    kInterestGroupCount,
    // The total number of bids made at auction.
    kBidCount,
    // The total time in milliseconds spent executing generateBid().
    kTotalGenerateBidLatency,
    // The toal time in milliseconds spent fetching trusted bidding signals over
    // the network.
    kTotalSignalsFetchLatency,
  };

  // For each realtime monitoring report, this enum specifies the type of the
  // report.
  enum RealTimeReportingType {
    // The default local DP type.
    kDefaultLocalReporting,
  };

  // Owners of interest groups allowed to participate in the auction.
  // Must all be HTTPS.
  array<url.mojom.Origin>? interest_group_buyers;

  // Opaque JSON data, passed as object to all worklets. At time of call to
  // browser, it may also be a promise, but it should be resolved at time of
  // call to worklet.
  AuctionAdConfigMaybePromiseJson auction_signals;

  // Opaque JSON data, passed as object to the seller worklet.  At time of call
  // to browser, it may also be a promise, but it should be resolved at time of
  // call to worklet.
  AuctionAdConfigMaybePromiseJson seller_signals;

  // The value restricts the runtime of the seller's scoreAd() script.
  mojo_base.mojom.TimeDelta? seller_timeout;

  AuctionAdConfigMaybePromisePerBuyerSignals per_buyer_signals;

  // Timeouts for individual interest group worklet Javascript execution.
  AuctionAdConfigMaybePromiseBuyerTimeouts buyer_timeouts;

  // The value restricts the runtime of seller's reportResult() and buyer's
  // reportWin() scripts. Must be non-negative. 0 is allowed, which will just
  // terminate reportWin()/reportResult() in the beginning of their execution.
  mojo_base.mojom.TimeDelta? reporting_timeout;

  // Expectations for currency provided by seller when modifying bids for
  // parent auctions or to help with mixed-currency reporting. If this is set,
  // any currency annotation from seller will be checked against it.
  AdCurrency? seller_currency;

  // Expectations for currencies used by buyers to bid. If a currency is
  // specified for a buyer here, and they annotate their bid with a currency,
  // their consistency will be checked before accepting the bid.
  AuctionAdConfigMaybePromiseBuyerCurrencies buyer_currencies;

  // Cumulative timeouts for all interest groups with the same buyer. Includes
  // launching worklet processes, loading scripts and signals, and running
  // the buyer's generateBid() functions.
  AuctionAdConfigMaybePromiseBuyerTimeouts buyer_cumulative_timeouts;

  // Keys of `per_buyer_group_limits` must be valid HTTPS origins. Values
  // restrict the number of bidding interest groups for a particular buyer
  // that can participate in an auction. Values must be greater than 0.
  map<url.mojom.Origin, uint16> per_buyer_group_limits;

  // Per-buyer sparse vector that, along with a similar per-interest group
  // sparse vector, has its dot product taken to calculate interest group
  // priorities.
  //
  // No signals key start with "browserSignals.", which is reserved for
  // values coming from the browser.
  map<url.mojom.Origin, map<string, double>>? per_buyer_priority_signals;

  // Merged with `per_buyer_priority_signals` before calculating
  // per-interest group priorities. In the case both have entries with the
  // same key, the entry in `per_buyer_priority_signals` takes precedence.
  //
  // No signals key start with "browserSignals.", which is reserved for
  // values coming from the browser.
  map<string, double>? all_buyers_priority_signals;

  // Limit on the number of bidding interest groups for any buyer. Must be
  // greater than 0. Defaults to the largest uint16 value, which is fine
  // in our case since the backend storage applies a lower limit.
  uint16 all_buyers_group_limit = 65535;

  // For each buyer in `interest_group_buyers`, specifies the aggregation base
  // bucket ID number for that buyer. To be used in conjunction with
  // `auction_report_buyers`; for each buyer, for each report type, the base
  // bucket ID is added to the `auction_report_buyers` bucket offset to obtain
  // the actual bucket numbers used for reporting.
  array<mojo_base.mojom.Uint128>? auction_report_buyer_keys;

  // For each type of buyer extended private aggregation reporting event,
  // provides the bucket offset and scalar multiplier for that event.
  map<BuyerReportType, AuctionReportBuyersConfig>? auction_report_buyers;

  // Whether debug mode has been enabled for the auction report buyer extended
  // private aggregation reporting and, if so, any debug key that has been set.
  AuctionReportBuyerDebugModeConfig? auction_report_buyer_debug_mode_config;

  // The set of capabilities that each interest group must declare to
  // participate in the auction. Interest groups that don't declare all these
  // capabilities will not participate in the auction.
  SellerCapabilities required_seller_capabilities;

  // The requested ad creative size for the auction (strictly optional).
  // If specified in the auction config, it is surfaced during the auction
  // through browser signals and stored after the auction in the winning
  // fenced frame config as its container size.
  AdSize? requested_size;

  // All ad slot sizes on a page. Each AdSize must be unique. Interest
  // groups can request this be included in trusted seller signals fetches.
  array<AdSize>? all_slots_requested_sizes;

  // Limits on how many bids generateBid() can return at once.
  // Every entry should be at least 1.
  map<url.mojom.Origin, uint16> per_buyer_multi_bid_limits;
  uint16 all_buyers_multi_bid_limit;

  // A unique identifier associated with this and only this invocation of
  // runAdAuction. This must come from a prior call to createAuctionNonce.
  // This is only required for auctions that provide additional bids, and each
  // of those additional bids must use the same auction nonce to ensure that
  // each of those additional bids was intended for this and only this auction.
  // In multi-seller auctions, it must be component auction configs providing
  // this for their auctions.
  mojo_base.mojom.Uuid? auction_nonce;

  // The seller's real time reports type.
  RealTimeReportingType? seller_real_time_reporting_type;

  // Per buyer's real time reports type.
  map<url.mojom.Origin, RealTimeReportingType>? per_buyer_real_time_reporting_types;

  // Nested auctions whose results will also be fed to `seller`. Only the top
  // level auction config can have component auctions.
  array<AuctionAdConfig> component_auctions;

  // The ad render url replacements for their respective ad URL. If promise is
  // never given, this will resolve to an empty vector.
  AuctionAdConfigMaybePromiseDeprecatedRenderURLReplacements deprecated_render_url_replacements;

  // The maximum length limit for the trusted scoring signal fetch URL. Can
  // only be set as either 0 or a positive number. A value of 0 indicates
  // that there is no limit.
  int32 max_trusted_scoring_signals_url_length = 0;

  // An optional field for matching the encryption key, and indicating which
  // version of the key-value server the auction uses for fetching trusted
  // scoring signals.
  url.mojom.Origin? trusted_scoring_signals_coordinator;
};

// Configuration to pass to RunAdAuction().
//
// All URLs and origins must use https.
//
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md#21-initiating-an-on-device-auction
struct AuctionAdConfig {
  // The entity running the ad auction. Unlike for interest groups, `seller`
  // *doesn't* need to match the current frame URL's origin since the
  // `decision_logic_url` determines the behavior of the auction. This allows
  // the publisher page embedding the ad to call runAdAuction() directly if it
  // desires, rather than requiring the runAdAuction() call to be made inside a
  // seller-hosted iframe -- the decision logic has to be hosted by the seller
  // though, even though signals from the page can come from the publisher. The
  // seller and publisher could be different entities, or the same entity.
  url.mojom.Origin seller;

  // Server response and the request ID (for server side auctions). If this
  // field is present then this auction is assumed to have run on the server.
  AuctionAdServerResponseConfig? server_response;

  // `decision_logic_url`'s origin must match the seller's origin.
  url.mojom.Url? decision_logic_url;

  // Base URL for per-bid data passed to the seller worklet. Must be same
  // origin with `seller`.
  url.mojom.Url? trusted_scoring_signals_url;

  // Other parameters are grouped in a struct that is passed to SellerWorklets.
  AuctionAdConfigNonSharedParams auction_ad_config_non_shared_params;

  // DirectFromSellerSignals to be loaded from resources in subresource
  // bundle(s).  Like `seller_signals`,`per_buyer_signals`, and
  // `auction_signals`, but the signals' contents are not revealed to the
  // renderer process. See details in the DirectFromSellerSignals comment.
  AuctionAdConfigMaybePromiseDirectFromSellerSignals direct_from_seller_signals;


  // Like `direct_from_seller_signals`, but passed from the page via a different
  // mechanism. `direct_from_seller_signals` searches for the contents of
  // subresource bundles to find signals, whereas
  // `expects_direct_from_signals_header_ad_slot` looks for the values of
  // Ad-Auction-Signals response headers provided to fetch() requests with the
  // {adAuctionHeaders: true} option made by frames on the page.
  //
  // The signals are delivered to worklets using the same JavaScript object as
  // used for `direct_from_seller_signals`, so it is not valid for both
  // `direct_from_seller_signals` and
  // `expects_direct_from_seller_signals_header_ad_slot` to be non-null.
  //
  // The actual ad slot string is passed via
  // ResolvedDirectFromSellerSignalsHeaderAdSlotPromise().
  bool expects_direct_from_seller_signals_header_ad_slot = false;

  // Optional identifier for an experiment group, used when getting trusted
  // signals (and as part of AuctionConfig given to worklets).
  uint16? seller_experiment_group_id;
  uint16? all_buyer_experiment_group_id;
  map<url.mojom.Origin, uint16> per_buyer_experiment_group_ids;

  // Optionally specifies that some bids will be provided as signed exchanges,
  // via `AbortableAdAuction.ResolvedAdditionalBids()`.
  bool expects_additional_bids = false;

  // Origin for the Coordinator to be used for the seller's Private Aggregation
  // requests.
  url.mojom.Origin? aggregation_coordinator_origin;
};

// Per-buyer config for GetInterestGroupAdAuctionData().
struct AuctionDataBuyerConfig {
  // Target size (in bytes) to allocate to this buyer.
  uint32? target_size;
};

// Configuration to pass to GetInterestGroupAdAuctionData().
struct AuctionDataConfig {
  // A specific list of buyers to include in the encrypted request and any
  // specific options for them.
  map<url.mojom.Origin, AuctionDataBuyerConfig> per_buyer_configs;

  // Maximum size to make the returned encrypted request.
  uint32? request_size;
};