glitch-javascript-sdk 2.7.8 → 2.8.1

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/index.d.ts CHANGED
@@ -4263,6 +4263,32 @@ declare class Titles {
4263
4263
  * Delete a saved behavioral funnel definition.
4264
4264
  */
4265
4265
  static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>>;
4266
+ /**
4267
+ * Generates a presigned S3 URL for uploading a game build ZIP.
4268
+ */
4269
+ static getDeploymentUploadUrl<T>(title_id: string): AxiosPromise<Response<T>>;
4270
+ /**
4271
+ * Confirms the upload and starts the automated deployment/extraction process.
4272
+ * @param data { file_path: string, version_string: string, entry_point?: string }
4273
+ */
4274
+ static confirmDeployment<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
4275
+ /**
4276
+ * Initializes a play session. Handles age-gating and license verification.
4277
+ * Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
4278
+ */
4279
+ static getPlaySession<T>(title_id: string): AxiosPromise<Response<T>>;
4280
+ /**
4281
+ * List all developer payouts for a title.
4282
+ */
4283
+ static listDeveloperPayouts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4284
+ /**
4285
+ * View a specific payout record.
4286
+ */
4287
+ static viewDeveloperPayout<T>(title_id: string, payout_id: string): AxiosPromise<Response<T>>;
4288
+ /**
4289
+ * Get the total earnings and playtime summary for a title.
4290
+ */
4291
+ static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>>;
4266
4292
  }
4267
4293
 
4268
4294
  declare class Campaigns {
@@ -5117,6 +5143,12 @@ declare class Subscriptions {
5117
5143
  * @param data { priceId, paymentMethod, custom_name, limits: { posts, enrichments, invites, ads }, metered_prices: [] }
5118
5144
  */
5119
5145
  static createCustomCommunitySubscription<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5146
+ /**
5147
+ * Purchase a permanent license or rent a game title.
5148
+ * If a rental was active in the last 7 days, the fee is automatically deducted from the premium price.
5149
+ * @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
5150
+ */
5151
+ static purchaseLicense<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
5120
5152
  }
5121
5153
 
5122
5154
  declare class Messages {
@@ -5634,6 +5666,15 @@ declare class Newsletters {
5634
5666
  * Permanently delete a subscriber from the system (Admin only).
5635
5667
  */
5636
5668
  static deleteSubscriber<T>(id: string): AxiosPromise<Response<T>>;
5669
+ /**
5670
+ * Join the distribution platform waitlist for indie developers.
5671
+ *
5672
+ * @see https://api.glitch.fun/api/documentation#/Newsletters/joinDistributionWaitlist
5673
+ *
5674
+ * @param data { name: string, email: string, game: string, team_size: string, revenue_goal: string }
5675
+ * @returns Promise
5676
+ */
5677
+ static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5637
5678
  }
5638
5679
 
5639
5680
  declare class PlayTests {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.7.8",
3
+ "version": "2.8.1",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -161,7 +161,17 @@ class Newsletters {
161
161
  return Requests.processRoute(NewslettersRoutes.routes.deleteSubscriber, undefined, { id });
162
162
  }
163
163
 
164
-
164
+ /**
165
+ * Join the distribution platform waitlist for indie developers.
166
+ *
167
+ * @see https://api.glitch.fun/api/documentation#/Newsletters/joinDistributionWaitlist
168
+ *
169
+ * @param data { name: string, email: string, game: string, team_size: string, revenue_goal: string }
170
+ * @returns Promise
171
+ */
172
+ public static joinDistributionWaitlist<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
173
+ return Requests.processRoute(NewslettersRoutes.routes.joinDistributionWaitlist, data, undefined, params);
174
+ }
165
175
 
166
176
  }
167
177
 
@@ -115,6 +115,15 @@ class Subscriptions {
115
115
  return Requests.processRoute(SubscriptionsRoute.routes.createCustomCommunitySubscription, data, { community_id }, params);
116
116
  }
117
117
 
118
+ /**
119
+ * Purchase a permanent license or rent a game title.
120
+ * If a rental was active in the last 7 days, the fee is automatically deducted from the premium price.
121
+ * @param data { purchase_type: 'premium' | 'rental', payment_method_id: string }
122
+ */
123
+ public static purchaseLicense<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
124
+ return Requests.processRoute(SubscriptionsRoute.routes.purchaseLicense, data, { title_id });
125
+ }
126
+
118
127
 
119
128
  }
120
129
 
package/src/api/Titles.ts CHANGED
@@ -932,6 +932,50 @@ class Titles {
932
932
  public static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>> {
933
933
  return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id, funnel_id });
934
934
  }
935
+
936
+ /**
937
+ * Generates a presigned S3 URL for uploading a game build ZIP.
938
+ */
939
+ public static getDeploymentUploadUrl<T>(title_id: string): AxiosPromise<Response<T>> {
940
+ return Requests.processRoute(TitlesRoute.routes.getDeploymentUploadUrl, {}, { title_id });
941
+ }
942
+
943
+ /**
944
+ * Confirms the upload and starts the automated deployment/extraction process.
945
+ * @param data { file_path: string, version_string: string, entry_point?: string }
946
+ */
947
+ public static confirmDeployment<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
948
+ return Requests.processRoute(TitlesRoute.routes.confirmDeployment, data, { title_id });
949
+ }
950
+
951
+ /**
952
+ * Initializes a play session. Handles age-gating and license verification.
953
+ * Returns the CDN URL for WASM/iFrame or Signaling URL for Pixel Streaming.
954
+ */
955
+ public static getPlaySession<T>(title_id: string): AxiosPromise<Response<T>> {
956
+ return Requests.processRoute(TitlesRoute.routes.getPlaySession, {}, { title_id });
957
+ }
958
+
959
+ /**
960
+ * List all developer payouts for a title.
961
+ */
962
+ public static listDeveloperPayouts<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
963
+ return Requests.processRoute(TitlesRoute.routes.listDeveloperPayouts, undefined, { title_id }, params);
964
+ }
965
+
966
+ /**
967
+ * View a specific payout record.
968
+ */
969
+ public static viewDeveloperPayout<T>(title_id: string, payout_id: string): AxiosPromise<Response<T>> {
970
+ return Requests.processRoute(TitlesRoute.routes.viewDeveloperPayout, {}, { title_id, payout_id });
971
+ }
972
+
973
+ /**
974
+ * Get the total earnings and playtime summary for a title.
975
+ */
976
+ public static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>> {
977
+ return Requests.processRoute(TitlesRoute.routes.developerPayoutSummary, {}, { title_id });
978
+ }
935
979
  }
936
980
 
937
981
  export default Titles;
@@ -29,6 +29,8 @@ class NewslettersRoutes {
29
29
  viewSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.GET },
30
30
  updateSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.PUT },
31
31
  deleteSubscriber: { url: '/admin/newsletters/subscribers/{id}', method: HTTP_METHODS.DELETE },
32
+ joinDistributionWaitlist: { url: '/newsletters/joinDistributionWaitlist', method: HTTP_METHODS.POST },
33
+
32
34
  };
33
35
 
34
36
  }
@@ -19,6 +19,9 @@ class SubscriptionsRoute {
19
19
  url: '/subscriptions/communities/custom/{community_id}',
20
20
  method: HTTP_METHODS.POST
21
21
  },
22
+
23
+ purchaseLicense: { url: '/titles/{title_id}/purchase', method: HTTP_METHODS.POST },
24
+
22
25
  };
23
26
 
24
27
  }
@@ -180,6 +180,16 @@ class TitlesRoute {
180
180
  behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
181
181
  deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
182
182
 
183
+ // Aegis Deployment
184
+ getDeploymentUploadUrl: { url: '/titles/{title_id}/deployments/presigned-url', method: HTTP_METHODS.POST },
185
+ confirmDeployment: { url: '/titles/{title_id}/deployments/confirm', method: HTTP_METHODS.POST },
186
+ getPlaySession: { url: '/titles/{title_id}/play', method: HTTP_METHODS.GET },
187
+
188
+ // Aegis Payouts
189
+ listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
190
+ viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
191
+ developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
192
+
183
193
  };
184
194
 
185
195
  }