glitch-javascript-sdk 3.9.4 → 3.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5651,7 +5651,7 @@
5651
5651
  DELETE: 'DELETE',
5652
5652
  };
5653
5653
 
5654
- /** Route catalog for Azure-backed game website hosting. */
5654
+ /** Route catalog for game website hosting and its direct or Marketplace billing. */
5655
5655
  class HostingRoute {
5656
5656
  }
5657
5657
  HostingRoute.routes = {
@@ -5660,6 +5660,9 @@
5660
5660
  channelAnalytics: { url: '/titles/{title_id}/hosting/analytics/channels', method: HTTP_METHODS.GET },
5661
5661
  billingCheckout: { url: '/titles/{title_id}/hosting/billing/checkout', method: HTTP_METHODS.POST },
5662
5662
  confirmBillingCheckout: { url: '/titles/{title_id}/hosting/billing/confirm', method: HTTP_METHODS.POST },
5663
+ resolveMarketplacePurchase: { url: '/hosting/marketplace/resolve', method: HTTP_METHODS.POST },
5664
+ activateMarketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
5665
+ marketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
5663
5666
  createSite: { url: '/titles/{title_id}/hosting/sites', method: HTTP_METHODS.POST },
5664
5667
  updateSite: { url: '/titles/{title_id}/hosting/sites/{site_id}', method: HTTP_METHODS.PUT },
5665
5668
  uploadUrl: { url: '/titles/{title_id}/hosting/sites/{site_id}/upload-url', method: HTTP_METHODS.POST },
@@ -6181,6 +6184,18 @@
6181
6184
  static confirmBillingCheckout(title_id, checkout_session_id) {
6182
6185
  return Requests.processRoute(HostingRoute.routes.confirmBillingCheckout, { checkout_session_id }, { title_id });
6183
6186
  }
6187
+ /** Resolve the one-hour purchase token passed to Glitch by Microsoft Marketplace. */
6188
+ static resolveMarketplacePurchase(token) {
6189
+ return Requests.processRoute(HostingRoute.routes.resolveMarketplacePurchase, { token });
6190
+ }
6191
+ /** Link a resolved Microsoft Marketplace subscription to a billable Glitch business account. */
6192
+ static activateMarketplaceSubscription(subscription_id, community_id) {
6193
+ return Requests.processRoute(HostingRoute.routes.activateMarketplaceSubscription, { community_id }, { subscription_id });
6194
+ }
6195
+ /** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
6196
+ static marketplaceSubscription(subscription_id) {
6197
+ return Requests.processRoute(HostingRoute.routes.marketplaceSubscription, undefined, { subscription_id });
6198
+ }
6184
6199
  static createSite(title_id, data) {
6185
6200
  return Requests.processRoute(HostingRoute.routes.createSite, data, { title_id });
6186
6201
  }