glitch-javascript-sdk 3.3.1 → 3.3.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
@@ -27279,6 +27279,7 @@ var NewslettersRoutes = /** @class */ (function () {
27279
27279
  joinRaffleWaitlist: { url: '/newsletters/joinRaffleWaitlist', method: HTTP_METHODS.POST },
27280
27280
  joinDiscordMarketplaceWaitlist: { url: '/newsletters/joinDiscordMarketplaceWaitlist', method: HTTP_METHODS.POST },
27281
27281
  joinNsfwWaitlist: { url: '/newsletters/joinNsfwWaitlist', method: HTTP_METHODS.POST },
27282
+ joinCodexCreditWaitlist: { url: '/newsletters/joinCodexCreditWaitlist', method: HTTP_METHODS.POST },
27282
27283
  // --- Admin Campaign Management ---
27283
27284
  listCampaigns: { url: '/admin/newsletters/campaigns', method: HTTP_METHODS.GET },
27284
27285
  createCampaign: { url: '/admin/newsletters/campaigns', method: HTTP_METHODS.POST },
@@ -27350,6 +27351,14 @@ var Newsletters = /** @class */ (function () {
27350
27351
  Newsletters.joinNsfwWaitlist = function (data, params) {
27351
27352
  return Requests.processRoute(NewslettersRoutes.routes.joinNsfwWaitlist, data, undefined, params);
27352
27353
  };
27354
+ /**
27355
+ * Apply for Codex credit support for a playable AI game.
27356
+ *
27357
+ * @param data { name, email, game, game_description, game_url }
27358
+ */
27359
+ Newsletters.joinCodexCreditWaitlist = function (data, params) {
27360
+ return Requests.processRoute(NewslettersRoutes.routes.joinCodexCreditWaitlist, data, undefined, params);
27361
+ };
27353
27362
  // --- ADMINISTRATIVE CAMPAIGN METHODS ---
27354
27363
  /**
27355
27364
  * List all newsletter campaigns (Admin only).
@@ -27474,6 +27483,8 @@ var PlayTestsRoute = /** @class */ (function () {
27474
27483
  cancelRequest: { url: '/playtests/{title_id}/cancel/{playtest_id}', method: HTTP_METHODS.POST },
27475
27484
  show: { url: '/playtests/{title_id}/view/{playtest_id}', method: HTTP_METHODS.GET },
27476
27485
  mine: { url: '/playtests/mine', method: HTTP_METHODS.GET },
27486
+ getResults: { url: '/playtests/{title_id}/{playtest_id}/results', method: HTTP_METHODS.GET },
27487
+ uploadAnswer: { url: '/playtests/{title_id}/{playtest_id}/upload-answer', method: HTTP_METHODS.POST },
27477
27488
  };
27478
27489
  return PlayTestsRoute;
27479
27490
  }());
@@ -27603,6 +27614,35 @@ var PlayTests = /** @class */ (function () {
27603
27614
  PlayTests.mine = function (params) {
27604
27615
  return Requests.processRoute(PlayTestsRoute.routes.mine, {}, {}, params);
27605
27616
  };
27617
+ /**
27618
+ * Get aggregated results for a play test (publisher view).
27619
+ *
27620
+ * @param title_id The ID of the title.
27621
+ * @param playtest_id The ID of the play test.
27622
+ * @returns Promise
27623
+ */
27624
+ PlayTests.getResults = function (title_id, playtest_id, params) {
27625
+ return Requests.processRoute(PlayTestsRoute.routes.getResults, {}, { title_id: title_id, playtest_id: playtest_id }, params);
27626
+ };
27627
+ /**
27628
+ * Upload an audio/video answer file for a play test question. The file is
27629
+ * stored by the Glitch backend (authenticated with the session token) and a
27630
+ * media URL is returned that can then be passed to submitAnswers().
27631
+ *
27632
+ * @param title_id The ID of the title.
27633
+ * @param playtest_id The ID of the play test.
27634
+ * @param file The recorded audio/video file or blob.
27635
+ * @param data Additional fields (question_id, media_type, title, description).
27636
+ * @param params Optional query parameters.
27637
+ * @param onUploadProgress Optional progress callback.
27638
+ * @returns Promise
27639
+ */
27640
+ PlayTests.uploadAnswer = function (title_id, playtest_id, file, data, params, onUploadProgress) {
27641
+ var url = PlayTestsRoute.routes.uploadAnswer.url
27642
+ .replace('{title_id}', title_id)
27643
+ .replace('{playtest_id}', playtest_id);
27644
+ return Requests.uploadFile(url, 'file', file, data, params, onUploadProgress);
27645
+ };
27606
27646
  return PlayTests;
27607
27647
  }());
27608
27648