// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Privacy-Preserving Attribution: Level 1 (https://w3c.github.io/ppa/)

partial interface Navigator {
  [SecureContext, SameObject] readonly attribute PrivateAttribution privateAttribution;
};

enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" };

dictionary PrivateAttributionAggregationService {
  required DOMString protocol;
};

[SecureContext, Exposed=Window]
interface PrivateAttributionAggregationServices {
  readonly maplike<USVString, PrivateAttributionAggregationService>;
};

[SecureContext, Exposed=Window]
interface PrivateAttribution {
  readonly attribute PrivateAttributionAggregationServices aggregationServices;
};

dictionary PrivateAttributionImpressionOptions {
  required unsigned long histogramIndex;
  unsigned long filterData = 0;
  required USVString conversionSite;
  unsigned long lifetimeDays = 30;
};

[SecureContext, Exposed=Window]
partial interface PrivateAttribution {
  undefined saveImpression(PrivateAttributionImpressionOptions options);
};

dictionary PrivateAttributionConversionOptions {
  required USVString aggregationService;
  double epsilon = 1.0;

  required unsigned long histogramSize;

  unsigned long lookbackDays;
  unsigned long filterData;
  sequence<USVString> impressionSites = [];
  sequence<USVString> intermediarySites = [];

  PrivateAttributionLogic logic = "last-touch";
  unsigned long value = 1;
  unsigned long maxValue = 1;
};

enum PrivateAttributionLogic {
  "last-touch",
};

dictionary PrivateAttributionConversionResult {
  required Uint8Array report;
};

[SecureContext, Exposed=Window]
partial interface PrivateAttribution {
  Promise<PrivateAttributionConversionResult> measureConversion(PrivateAttributionConversionOptions options);
};
