glitch-javascript-sdk 3.6.0 → 3.8.0

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
@@ -21043,12 +21043,13 @@ var Users = /** @class */ (function () {
21043
21043
  return Requests.processRoute(UserRoutes.routes.getCampaignInvites, {}, undefined, params);
21044
21044
  };
21045
21045
  /**
21046
- * Gets payouts from past campaings
21046
+ * Gets the authenticated influencer's payouts from campaigns and attributed
21047
+ * game advertising. Advertising revenue is returned as a separate additive
21048
+ * source with provider-period metrics and tracking-link/social-post IDs.
21047
21049
  *
21048
21050
  * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
21049
21051
  *
21050
- * @param user_id The id of the user to update.
21051
- * @param data The data to update.
21052
+ * @param params Optional campaign, date, status, source, and ordering filters.
21052
21053
  *
21053
21054
  * @returns promise
21054
21055
  */
@@ -27056,6 +27057,19 @@ var GameShowsRoute = /** @class */ (function () {
27056
27057
  joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
27057
27058
  confirmWishlist: { url: '/gameshows/wishlist/confirm/{token}', method: HTTP_METHODS.GET },
27058
27059
  listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
27060
+ // Festival awards, prizes, swag, metric leaderboards, and recipients.
27061
+ listPublicRewards: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.GET },
27062
+ getPublicReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.GET },
27063
+ getPublicRewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard/public', method: HTTP_METHODS.GET },
27064
+ manageRewards: { url: '/gameshows/{show_id}/rewards/manage', method: HTTP_METHODS.GET },
27065
+ claimReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/claim', method: HTTP_METHODS.POST },
27066
+ createReward: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.POST },
27067
+ updateReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
27068
+ deleteReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
27069
+ rewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard', method: HTTP_METHODS.GET },
27070
+ autoAwardReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/auto-award', method: HTTP_METHODS.POST },
27071
+ addRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients', method: HTTP_METHODS.POST },
27072
+ updateRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients/{recipient_id}', method: HTTP_METHODS.PUT },
27059
27073
  listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
27060
27074
  // Organizer sponsor lifecycle and placement administration.
27061
27075
  listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
@@ -27075,6 +27089,10 @@ var GameShowsRoute = /** @class */ (function () {
27075
27089
  sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
27076
27090
  sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
27077
27091
  sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
27092
+ sponsorInvitationRewards: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.GET },
27093
+ sponsorInvitationCreateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.POST },
27094
+ sponsorInvitationUpdateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
27095
+ sponsorInvitationDeleteReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
27078
27096
  };
27079
27097
  return GameShowsRoute;
27080
27098
  }());
@@ -27372,6 +27390,55 @@ var GameShows = /** @class */ (function () {
27372
27390
  GameShows.listWishlist = function (show_id, params) {
27373
27391
  return Requests.processRoute(GameShowsRoute.routes.listWishlist, {}, { show_id: show_id }, params);
27374
27392
  };
27393
+ /** List the anonymous, published festival award/prize/swag catalog. */
27394
+ GameShows.listPublicRewards = function (show_id, params) {
27395
+ return Requests.processRoute(GameShowsRoute.routes.listPublicRewards, {}, { show_id: show_id }, params);
27396
+ };
27397
+ /** Retrieve one SSR-ready public festival reward. */
27398
+ GameShows.getPublicReward = function (show_id, reward_id, params) {
27399
+ return Requests.processRoute(GameShowsRoute.routes.getPublicReward, {}, { show_id: show_id, reward_id: reward_id }, params);
27400
+ };
27401
+ /** Retrieve a privacy-safe public game leaderboard for one reward. */
27402
+ GameShows.getPublicRewardLeaderboard = function (show_id, reward_id, params) {
27403
+ return Requests.processRoute(GameShowsRoute.routes.getPublicRewardLeaderboard, {}, { show_id: show_id, reward_id: reward_id }, params);
27404
+ };
27405
+ /** List drafts, sponsor items, inventory, recipients, and fulfillment for organizers. */
27406
+ GameShows.manageRewards = function (show_id, params) {
27407
+ return Requests.processRoute(GameShowsRoute.routes.manageRewards, {}, { show_id: show_id }, params);
27408
+ };
27409
+ /** Claim an eligible attendee, entrant, points, or previously awarded festival reward. */
27410
+ GameShows.claimReward = function (show_id, reward_id, data, params) {
27411
+ if (data === void 0) { data = {}; }
27412
+ return Requests.processRoute(GameShowsRoute.routes.claimReward, data, { show_id: show_id, reward_id: reward_id }, params);
27413
+ };
27414
+ /** Create an organizer-controlled festival award, prize, swag item, or reward. */
27415
+ GameShows.createReward = function (show_id, data, params) {
27416
+ return Requests.processRoute(GameShowsRoute.routes.createReward, data, { show_id: show_id }, params);
27417
+ };
27418
+ /** Update publication, eligibility, metrics, inventory, or rich content. */
27419
+ GameShows.updateReward = function (show_id, reward_id, data, params) {
27420
+ return Requests.processRoute(GameShowsRoute.routes.updateReward, data, { show_id: show_id, reward_id: reward_id }, params);
27421
+ };
27422
+ /** Soft-delete one festival reward. */
27423
+ GameShows.deleteReward = function (show_id, reward_id, params) {
27424
+ return Requests.processRoute(GameShowsRoute.routes.deleteReward, {}, { show_id: show_id, reward_id: reward_id }, params);
27425
+ };
27426
+ /** Preview the organizer-only game or attendee performance leaderboard. */
27427
+ GameShows.rewardLeaderboard = function (show_id, reward_id, params) {
27428
+ return Requests.processRoute(GameShowsRoute.routes.rewardLeaderboard, {}, { show_id: show_id, reward_id: reward_id }, params);
27429
+ };
27430
+ /** Snapshot current metric leaders as reward recipients. */
27431
+ GameShows.autoAwardReward = function (show_id, reward_id, params) {
27432
+ return Requests.processRoute(GameShowsRoute.routes.autoAwardReward, {}, { show_id: show_id, reward_id: reward_id }, params);
27433
+ };
27434
+ /** Add a manual nominee, winner, honoree, claimant, or fulfillment record. */
27435
+ GameShows.addRewardRecipient = function (show_id, reward_id, data, params) {
27436
+ return Requests.processRoute(GameShowsRoute.routes.addRewardRecipient, data, { show_id: show_id, reward_id: reward_id }, params);
27437
+ };
27438
+ /** Update judging, claim, revocation, rank, or fulfillment state. */
27439
+ GameShows.updateRewardRecipient = function (show_id, reward_id, recipient_id, data, params) {
27440
+ return Requests.processRoute(GameShowsRoute.routes.updateRewardRecipient, data, { show_id: show_id, reward_id: reward_id, recipient_id: recipient_id }, params);
27441
+ };
27375
27442
  /**
27376
27443
  * List public game shows that include a title. Useful for game-page festival banners.
27377
27444
  */
@@ -27460,6 +27527,22 @@ var GameShows = /** @class */ (function () {
27460
27527
  GameShows.confirmSponsorInvitationPayment = function (token, params) {
27461
27528
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token: token }, params);
27462
27529
  };
27530
+ /** List awards, prizes, and swag owned by a sponsor invitation. */
27531
+ GameShows.sponsorInvitationRewards = function (token, params) {
27532
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationRewards, {}, { token: token }, params);
27533
+ };
27534
+ /** Create a draft sponsor-owned award, prize, or swag item. */
27535
+ GameShows.createSponsorInvitationReward = function (token, data, params) {
27536
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationCreateReward, data, { token: token }, params);
27537
+ };
27538
+ /** Update sponsor-owned reward content and eligibility. */
27539
+ GameShows.updateSponsorInvitationReward = function (token, reward_id, data, params) {
27540
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationUpdateReward, data, { token: token, reward_id: reward_id }, params);
27541
+ };
27542
+ /** Remove a sponsor-owned draft reward. */
27543
+ GameShows.deleteSponsorInvitationReward = function (token, reward_id, params) {
27544
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationDeleteReward, {}, { token: token, reward_id: reward_id }, params);
27545
+ };
27463
27546
  return GameShows;
27464
27547
  }());
27465
27548
 
@@ -32959,46 +33042,84 @@ var MarketResearch = /** @class */ (function () {
32959
33042
  var GameAdvertisingRoute = /** @class */ (function () {
32960
33043
  function GameAdvertisingRoute() {
32961
33044
  }
33045
+ /**
33046
+ * Route templates for publisher game-ad inventory, telemetry, earnings, and
33047
+ * site administration. Placeholders are expanded by Requests.processRoute.
33048
+ */
32962
33049
  GameAdvertisingRoute.routes = {
32963
33050
  settings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.GET },
32964
33051
  updateSettings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.PUT },
32965
33052
  createSession: { url: '/titles/{title_id}/advertising/sessions', method: HTTP_METHODS.POST },
32966
33053
  storeEvent: { url: '/titles/{title_id}/advertising/sessions/{session_id}/events', method: HTTP_METHODS.POST },
32967
33054
  revenueSummary: { url: '/titles/{title_id}/advertising/revenue-summary', method: HTTP_METHODS.GET },
33055
+ inGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.GET },
33056
+ replaceInGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.PUT },
32968
33057
  adminDashboard: { url: '/admin/game-advertising', method: HTTP_METHODS.GET },
32969
33058
  adminUpdateSettings: { url: '/admin/game-advertising/settings', method: HTTP_METHODS.PUT },
32970
33059
  adminStoreRevenue: { url: '/admin/game-advertising/revenue', method: HTTP_METHODS.POST },
33060
+ adminProviderApps: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.GET },
33061
+ adminUpsertProviderApp: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.PUT },
32971
33062
  };
32972
33063
  return GameAdvertisingRoute;
32973
33064
  }());
32974
33065
 
33066
+ /**
33067
+ * Typed client for platform-served game advertising.
33068
+ *
33069
+ * These endpoints manage publisher inventory displayed around playable games;
33070
+ * they are intentionally separate from APIs used to buy advertising campaigns.
33071
+ */
32975
33072
  var GameAdvertising = /** @class */ (function () {
32976
33073
  function GameAdvertising() {
32977
33074
  }
33075
+ /** Return developer-visible ad-earnings settings for a title. */
32978
33076
  GameAdvertising.settings = function (title_id) {
32979
33077
  return Requests.processRoute(GameAdvertisingRoute.routes.settings, undefined, { title_id: title_id });
32980
33078
  };
33079
+ /** Update developer ad-earnings activation and optional title provider ID. */
32981
33080
  GameAdvertising.updateSettings = function (title_id, data) {
32982
33081
  return Requests.processRoute(GameAdvertisingRoute.routes.updateSettings, data, { title_id: title_id });
32983
33082
  };
33083
+ /** Resolve ad eligibility and create an expiring provider manifest/session. */
32984
33084
  GameAdvertising.createSession = function (title_id, data) {
32985
33085
  return Requests.processRoute(GameAdvertisingRoute.routes.createSession, data, { title_id: title_id });
32986
33086
  };
33087
+ /** Store one normalized, idempotent event for an advertising session. */
32987
33088
  GameAdvertising.storeEvent = function (title_id, session_id, data) {
32988
33089
  return Requests.processRoute(GameAdvertisingRoute.routes.storeEvent, data, { title_id: title_id, session_id: session_id });
32989
33090
  };
33091
+ /** Return developer-visible estimated/finalized earnings and delivery totals. */
32990
33092
  GameAdvertising.revenueSummary = function (title_id, params) {
32991
33093
  return Requests.processRoute(GameAdvertisingRoute.routes.revenueSummary, undefined, { title_id: title_id }, params);
32992
33094
  };
33095
+ /** Return every intrinsic-ad surface configured for a title. */
33096
+ GameAdvertising.inGamePlacements = function (title_id) {
33097
+ return Requests.processRoute(GameAdvertisingRoute.routes.inGamePlacements, undefined, { title_id: title_id });
33098
+ };
33099
+ /** Atomically replace a title's provider-neutral intrinsic-ad surfaces. */
33100
+ GameAdvertising.replaceInGamePlacements = function (title_id, placements) {
33101
+ return Requests.processRoute(GameAdvertisingRoute.routes.replaceInGamePlacements, { placements: placements }, { title_id: title_id });
33102
+ };
33103
+ /** Return site-admin delivery settings, aggregate metrics, and recent revenue. */
32993
33104
  GameAdvertising.adminDashboard = function () {
32994
33105
  return Requests.processRoute(GameAdvertisingRoute.routes.adminDashboard);
32995
33106
  };
33107
+ /** Partially update platform-wide providers and delivery frequency. */
32996
33108
  GameAdvertising.adminUpdateSettings = function (data) {
32997
33109
  return Requests.processRoute(GameAdvertisingRoute.routes.adminUpdateSettings, data);
32998
33110
  };
33111
+ /** Import or reconcile one provider revenue report row. */
32999
33112
  GameAdvertising.adminStoreRevenue = function (data) {
33000
33113
  return Requests.processRoute(GameAdvertisingRoute.routes.adminStoreRevenue, data);
33001
33114
  };
33115
+ /** Return public provider app keys and platform mappings for site admins. */
33116
+ GameAdvertising.adminProviderApps = function () {
33117
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminProviderApps);
33118
+ };
33119
+ /** Create or update a provider app mapping without accepting report secrets. */
33120
+ GameAdvertising.adminUpsertProviderApp = function (data) {
33121
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminUpsertProviderApp, data);
33122
+ };
33002
33123
  return GameAdvertising;
33003
33124
  }());
33004
33125