// 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.
// Name, origin owner, and metadata for ad interest groups.
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md#11-joining-interest-groups
// sellerCapabilities:
// https://github.com/WICG/turtledove/blob/main/FLEDGE_extended_PA_reporting.md
// USVString is used instead of the enum type, since enums don't allow unknown
// values, making forward compatibility difficult.
// See https://github.com/whatwg/webidl/issues/893
dictionary AuctionAdInterestGroupSize {
required USVString width;
required USVString height;
};
// Used for leaving interest groups. Other fields ignored.
dictionary AuctionAdInterestGroupKey {
required USVString owner;
required USVString name;
};
dictionary AuctionAdInterestGroup {
required USVString owner;
required USVString name;
// TODO(crbug.com/1451034): Make required once support for old
// joinAdInterestGroup() duration parameter can be removed.
double lifetimeMs;
double priority;
boolean enableBiddingSignalsPrioritization;
// TODO(https://crbug.com/1517378): These should be DOMString, per spec, but
// that leads to other issues, currently.
record<USVString, double> priorityVector;
record<USVString, double> prioritySignalsOverrides;
// Do not use the "enum" type for `sellerCapabilities`, since it throws on
// unsupported enum values, making forward compatibility more difficult for
// API users.
record<USVString, sequence<DOMString>> sellerCapabilities;
DOMString executionMode;
USVString biddingLogicURL;
[ImplementedAs=biddingLogicUrlDeprecated]
USVString biddingLogicUrl;
USVString biddingWasmHelperURL;
[ImplementedAs=biddingWasmHelperUrlDeprecated]
USVString biddingWasmHelperUrl;
USVString updateURL;
[ImplementedAs=updateUrlDeprecated]
USVString updateUrl;
// TODO(https://crbug.com/1420080): Remove this deprecated field, in favor of
// `updateUrl` above.
[DeprecateAs=DeprecatedInterestGroupDailyUpdateUrl] USVString dailyUpdateUrl;
USVString trustedBiddingSignalsURL;
[ImplementedAs=trustedBiddingSignalsUrlDeprecated]
USVString trustedBiddingSignalsUrl;
sequence<USVString> trustedBiddingSignalsKeys;
DOMString trustedBiddingSignalsSlotSizeMode;
long maxTrustedBiddingSignalsURLLength;
[RuntimeEnabled=FledgeTrustedSignalsKVv2Support]
USVString trustedBiddingSignalsCoordinator;
any userBiddingSignals;
sequence<AuctionAd> ads;
sequence<AuctionAd> adComponents;
record<DOMString, AuctionAdInterestGroupSize> adSizes;
record<DOMString, sequence<DOMString>> sizeGroups;
sequence<DOMString> auctionServerRequestFlags;
DOMString additionalBidKey;
ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
};