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.
@@ -113,5 +113,15 @@ declare class Subscriptions {
113
113
  * @returns promise
114
114
  */
115
115
  static redeemGift<T>(redemption_code: string): AxiosPromise<Response<T>>;
116
+ /**
117
+ * Cancel an unredeemed gift and trigger a refund.
118
+ * Only the user who purchased the gift (the giver) can perform this action.
119
+ *
120
+ * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelGift
121
+ *
122
+ * @param gift_id The UUID of the gift to cancel.
123
+ * @returns promise
124
+ */
125
+ static cancelGift<T>(gift_id: string): AxiosPromise<Response<T>>;
116
126
  }
117
127
  export default Subscriptions;
@@ -488,7 +488,7 @@ declare class Titles {
488
488
  * Initializes a play session. Handles age-gating and license verification.
489
489
  * Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
490
490
  */
491
- static getPlaySession<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
491
+ static getPlaySession<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
492
492
  /**
493
493
  * List all developer payouts for a title.
494
494
  */
package/dist/esm/index.js CHANGED
@@ -11883,7 +11883,7 @@ var TitlesRoute = /** @class */ (function () {
11883
11883
  // Aegis Deployment
11884
11884
  getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
11885
11885
  confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
11886
- getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
11886
+ getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.POST },
11887
11887
  initiateMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/initiate', method: HTTP_METHODS.POST },
11888
11888
  getMultipartUrls: { url: '/titles/{title_id}/deployments/multipart/urls', method: HTTP_METHODS.POST },
11889
11889
  completeMultipartUpload: { url: '/titles/{title_id}/deployments/multipart/complete', method: HTTP_METHODS.POST },
@@ -12599,8 +12599,8 @@ var Titles = /** @class */ (function () {
12599
12599
  * Initializes a play session. Handles age-gating and license verification.
12600
12600
  * Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
12601
12601
  */
12602
- Titles.getPlaySession = function (title_id, params) {
12603
- return Requests.processRoute(TitlesRoute.routes.getPlaySession, {}, { title_id: title_id }, params);
12602
+ Titles.getPlaySession = function (title_id, data, params) {
12603
+ return Requests.processRoute(TitlesRoute.routes.getPlaySession, data, { title_id: title_id }, params);
12604
12604
  };
12605
12605
  /**
12606
12606
  * List all developer payouts for a title.
@@ -13893,6 +13893,7 @@ var SubscriptionsRoute = /** @class */ (function () {
13893
13893
  refundLicense: { url: '/subscriptions/licenses/{license_id}/refund', method: HTTP_METHODS.POST },
13894
13894
  purchaseGift: { url: '/subscriptions/gifts/purchase', method: HTTP_METHODS.POST },
13895
13895
  redeemGift: { url: '/subscriptions/gifts/redeem', method: HTTP_METHODS.POST },
13896
+ cancelGift: { url: '/subscriptions/gifts/{gift_id}', method: HTTP_METHODS.DELETE },
13896
13897
  };
13897
13898
  return SubscriptionsRoute;
13898
13899
  }());
@@ -14042,6 +14043,18 @@ var Subscriptions = /** @class */ (function () {
14042
14043
  Subscriptions.redeemGift = function (redemption_code) {
14043
14044
  return Requests.processRoute(SubscriptionsRoute.routes.redeemGift, { redemption_code: redemption_code });
14044
14045
  };
14046
+ /**
14047
+ * Cancel an unredeemed gift and trigger a refund.
14048
+ * Only the user who purchased the gift (the giver) can perform this action.
14049
+ *
14050
+ * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelGift
14051
+ *
14052
+ * @param gift_id The UUID of the gift to cancel.
14053
+ * @returns promise
14054
+ */
14055
+ Subscriptions.cancelGift = function (gift_id) {
14056
+ return Requests.processRoute(SubscriptionsRoute.routes.cancelGift, {}, { gift_id: gift_id });
14057
+ };
14045
14058
  return Subscriptions;
14046
14059
  }());
14047
14060