glitch-javascript-sdk 3.0.2 → 3.0.4

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
@@ -25067,7 +25067,7 @@ var TitlesRoute = /** @class */ (function () {
25067
25067
  // Aegis Deployment
25068
25068
  getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
25069
25069
  confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
25070
- getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
25070
+ getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.POST },
25071
25071
  initiateMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/initiate', method: HTTP_METHODS.POST },
25072
25072
  getMultipartUrls: { url: '/titles/{title_id}/deployments/multipart/urls', method: HTTP_METHODS.POST },
25073
25073
  completeMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/complete', method: HTTP_METHODS.POST },
@@ -25783,8 +25783,8 @@ var Titles = /** @class */ (function () {
25783
25783
  * Initializes a play session. Handles age-gating and license verification.
25784
25784
  * Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
25785
25785
  */
25786
- Titles.getPlaySession = function (title_id, params) {
25787
- return Requests.processRoute(TitlesRoute.routes.getPlaySession, {}, { title_id: title_id }, params);
25786
+ Titles.getPlaySession = function (title_id, data, params) {
25787
+ return Requests.processRoute(TitlesRoute.routes.getPlaySession, data, { title_id: title_id }, params);
25788
25788
  };
25789
25789
  /**
25790
25790
  * List all developer payouts for a title.
@@ -27077,6 +27077,7 @@ var SubscriptionsRoute = /** @class */ (function () {
27077
27077
  refundLicense: { url: '/subscriptions/licenses/{license_id}/refund', method: HTTP_METHODS.POST },
27078
27078
  purchaseGift: { url: '/subscriptions/gifts/purchase', method: HTTP_METHODS.POST },
27079
27079
  redeemGift: { url: '/subscriptions/gifts/redeem', method: HTTP_METHODS.POST },
27080
+ cancelGift: { url: '/subscriptions/gifts/{gift_id}', method: HTTP_METHODS.DELETE },
27080
27081
  };
27081
27082
  return SubscriptionsRoute;
27082
27083
  }());
@@ -27226,6 +27227,18 @@ var Subscriptions = /** @class */ (function () {
27226
27227
  Subscriptions.redeemGift = function (redemption_code) {
27227
27228
  return Requests.processRoute(SubscriptionsRoute.routes.redeemGift, { redemption_code: redemption_code });
27228
27229
  };
27230
+ /**
27231
+ * Cancel an unredeemed gift and trigger a refund.
27232
+ * Only the user who purchased the gift (the giver) can perform this action.
27233
+ *
27234
+ * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelGift
27235
+ *
27236
+ * @param gift_id The UUID of the gift to cancel.
27237
+ * @returns promise
27238
+ */
27239
+ Subscriptions.cancelGift = function (gift_id) {
27240
+ return Requests.processRoute(SubscriptionsRoute.routes.cancelGift, {}, { gift_id: gift_id });
27241
+ };
27229
27242
  return Subscriptions;
27230
27243
  }());
27231
27244