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.
package/dist/cjs/index.js CHANGED
@@ -39384,7 +39384,7 @@ var GameAdvertising = /** @class */ (function () {
39384
39384
  return GameAdvertising;
39385
39385
  }());
39386
39386
 
39387
- /** Route catalog for Azure-backed game website hosting. */
39387
+ /** Route catalog for game website hosting and its direct or Marketplace billing. */
39388
39388
  var HostingRoute = /** @class */ (function () {
39389
39389
  function HostingRoute() {
39390
39390
  }
@@ -39394,6 +39394,9 @@ var HostingRoute = /** @class */ (function () {
39394
39394
  channelAnalytics: { url: '/titles/{title_id}/hosting/analytics/channels', method: HTTP_METHODS.GET },
39395
39395
  billingCheckout: { url: '/titles/{title_id}/hosting/billing/checkout', method: HTTP_METHODS.POST },
39396
39396
  confirmBillingCheckout: { url: '/titles/{title_id}/hosting/billing/confirm', method: HTTP_METHODS.POST },
39397
+ resolveMarketplacePurchase: { url: '/hosting/marketplace/resolve', method: HTTP_METHODS.POST },
39398
+ activateMarketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}/activate', method: HTTP_METHODS.POST },
39399
+ marketplaceSubscription: { url: '/hosting/marketplace/subscriptions/{subscription_id}', method: HTTP_METHODS.GET },
39397
39400
  createSite: { url: '/titles/{title_id}/hosting/sites', method: HTTP_METHODS.POST },
39398
39401
  updateSite: { url: '/titles/{title_id}/hosting/sites/{site_id}', method: HTTP_METHODS.PUT },
39399
39402
  uploadUrl: { url: '/titles/{title_id}/hosting/sites/{site_id}/upload-url', method: HTTP_METHODS.POST },
@@ -39442,6 +39445,18 @@ var Hosting = /** @class */ (function () {
39442
39445
  Hosting.confirmBillingCheckout = function (title_id, checkout_session_id) {
39443
39446
  return Requests.processRoute(HostingRoute.routes.confirmBillingCheckout, { checkout_session_id: checkout_session_id }, { title_id: title_id });
39444
39447
  };
39448
+ /** Resolve the one-hour purchase token passed to Glitch by Microsoft Marketplace. */
39449
+ Hosting.resolveMarketplacePurchase = function (token) {
39450
+ return Requests.processRoute(HostingRoute.routes.resolveMarketplacePurchase, { token: token });
39451
+ };
39452
+ /** Link a resolved Microsoft Marketplace subscription to a billable Glitch business account. */
39453
+ Hosting.activateMarketplaceSubscription = function (subscription_id, community_id) {
39454
+ return Requests.processRoute(HostingRoute.routes.activateMarketplaceSubscription, { community_id: community_id }, { subscription_id: subscription_id });
39455
+ };
39456
+ /** Retrieve safe Microsoft Marketplace entitlement and lifecycle status. */
39457
+ Hosting.marketplaceSubscription = function (subscription_id) {
39458
+ return Requests.processRoute(HostingRoute.routes.marketplaceSubscription, undefined, { subscription_id: subscription_id });
39459
+ };
39445
39460
  Hosting.createSite = function (title_id, data) {
39446
39461
  return Requests.processRoute(HostingRoute.routes.createSite, data, { title_id: title_id });
39447
39462
  };