glitch-javascript-sdk 3.0.5 → 3.0.7

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
@@ -25165,6 +25165,11 @@ var TitlesRoute = /** @class */ (function () {
25165
25165
  communityActivity: { url: '/titles/activity/trending', method: HTTP_METHODS.GET },
25166
25166
  socialTrending: { url: '/titles/activity/social', method: HTTP_METHODS.GET },
25167
25167
  discoveryQueue: { url: '/titles/discovery/queue', method: HTTP_METHODS.GET },
25168
+ /**
25169
+ * Curated, playable feed for the Swipe interface.
25170
+ * GET /titles/discovery/swipe
25171
+ */
25172
+ swipeFeed: { url: '/titles/discovery/swipe', method: HTTP_METHODS.GET },
25168
25173
  };
25169
25174
  return TitlesRoute;
25170
25175
  }());
@@ -26047,6 +26052,23 @@ var Titles = /** @class */ (function () {
26047
26052
  Titles.getDiscoveryQueue = function (params) {
26048
26053
  return Requests.processRoute(TitlesRoute.routes.discoveryQueue, {}, {}, params);
26049
26054
  };
26055
+ /**
26056
+ * Get a curated, playable feed for the Swipe interface.
26057
+ * This route ensures games have builds and images, and supports seeded randomization.
26058
+ *
26059
+ * @see https://api.glitch.fun/api/documentation#/Discovery/getSwipeFeed
26060
+ *
26061
+ * @param params Object of query params:
26062
+ * - seed?: number (For consistent randomization)
26063
+ * - genres?: string[] (Filter by genre names)
26064
+ * - models?: string[] (premium, rental, subscription, free)
26065
+ * - excluded_ids?: string[] (UUIDs to skip)
26066
+ * - page?: number
26067
+ * - per_page?: number
26068
+ */
26069
+ Titles.swipeFeed = function (params) {
26070
+ return Requests.processRoute(TitlesRoute.routes.swipeFeed, {}, undefined, params);
26071
+ };
26050
26072
  return Titles;
26051
26073
  }());
26052
26074
 
@@ -27096,6 +27118,7 @@ var SubscriptionsRoute = /** @class */ (function () {
27096
27118
  purchaseGift: { url: '/subscriptions/gifts/purchase', method: HTTP_METHODS.POST },
27097
27119
  redeemGift: { url: '/subscriptions/gifts/redeem', method: HTTP_METHODS.POST },
27098
27120
  cancelGift: { url: '/subscriptions/gifts/{gift_id}', method: HTTP_METHODS.DELETE },
27121
+ validateCoupon: { url: '/subscriptions/coupons/validate', method: HTTP_METHODS.POST },
27099
27122
  };
27100
27123
  return SubscriptionsRoute;
27101
27124
  }());
@@ -27257,6 +27280,13 @@ var Subscriptions = /** @class */ (function () {
27257
27280
  Subscriptions.cancelGift = function (gift_id) {
27258
27281
  return Requests.processRoute(SubscriptionsRoute.routes.cancelGift, {}, { gift_id: gift_id });
27259
27282
  };
27283
+ /**
27284
+ * Validates a coupon code and returns the calculated discount.
27285
+ * @param data { code: string, price: number, currency?: string }
27286
+ */
27287
+ Subscriptions.validateCoupon = function (data) {
27288
+ return Requests.processRoute(SubscriptionsRoute.routes.validateCoupon, data);
27289
+ };
27260
27290
  return Subscriptions;
27261
27291
  }());
27262
27292