tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

digital-goods.idl (1201B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Digital Goods API (https://wicg.github.io/digital-goods/)
      5 
      6 partial interface Window {
      7  [SecureContext] Promise<DigitalGoodsService> getDigitalGoodsService(
      8      DOMString serviceProvider);
      9 };
     10 
     11 [Exposed=Window, SecureContext] interface DigitalGoodsService {
     12 
     13  Promise<sequence<ItemDetails>> getDetails(sequence<DOMString> itemIds);
     14 
     15  Promise<sequence<PurchaseDetails>> listPurchases();
     16 
     17  Promise<sequence<PurchaseDetails>> listPurchaseHistory();
     18 
     19  Promise<undefined> consume(DOMString purchaseToken);
     20 };
     21 
     22 dictionary ItemDetails {
     23  required DOMString itemId;
     24  required DOMString title;
     25  required PaymentCurrencyAmount price;
     26  ItemType type;
     27  DOMString description;
     28  sequence<DOMString> iconURLs;
     29  DOMString subscriptionPeriod;
     30  DOMString freeTrialPeriod;
     31  PaymentCurrencyAmount introductoryPrice;
     32  DOMString introductoryPricePeriod;
     33  [EnforceRange] unsigned long long introductoryPriceCycles;
     34 };
     35 
     36 enum ItemType {
     37  "product",
     38  "subscription",
     39 };
     40 
     41 dictionary PurchaseDetails {
     42  required DOMString itemId;
     43  required DOMString purchaseToken;
     44 };