glitch-javascript-sdk 1.9.7 → 1.9.9

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
@@ -20870,6 +20870,9 @@ var CommunitiesRoute = /** @class */ (function () {
20870
20870
  acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
20871
20871
  retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
20872
20872
  listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
20873
+ myInvites: { url: '/communities/invites/mine', method: HTTP_METHODS.GET },
20874
+ resendInvite: { url: '/communities/{community_id}/invites/{invite_id}/resend', method: HTTP_METHODS.POST },
20875
+ deleteInvite: { url: '/communities/{community_id}/invites/{invite_id}', method: HTTP_METHODS.DELETE },
20873
20876
  addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
20874
20877
  showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
20875
20878
  updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
@@ -21686,6 +21689,36 @@ var Communities = /** @class */ (function () {
21686
21689
  Communities.importGameInstalls = function (community_id, newsletter_id, data, params) {
21687
21690
  return Requests.processRoute(CommunitiesRoute.routes.importGameInstalls, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
21688
21691
  };
21692
+ /**
21693
+ * Retrieve the current user's pending community invitations across all communities.
21694
+ *
21695
+ * @returns promise
21696
+ */
21697
+ Communities.myInvites = function (params) {
21698
+ return Requests.processRoute(CommunitiesRoute.routes.myInvites, {}, undefined, params);
21699
+ };
21700
+ /**
21701
+ * Resends an invitation to a user.
21702
+ *
21703
+ * @param community_id The id of the community.
21704
+ * @param invite_id The id of the invite to resend.
21705
+ *
21706
+ * @returns promise
21707
+ */
21708
+ Communities.resendInvite = function (community_id, invite_id, params) {
21709
+ return Requests.processRoute(CommunitiesRoute.routes.resendInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
21710
+ };
21711
+ /**
21712
+ * Revokes/deletes a community invitation.
21713
+ *
21714
+ * @param community_id The id of the community.
21715
+ * @param invite_id The id of the invite to delete.
21716
+ *
21717
+ * @returns promise
21718
+ */
21719
+ Communities.deleteInvite = function (community_id, invite_id, params) {
21720
+ return Requests.processRoute(CommunitiesRoute.routes.deleteInvite, {}, { community_id: community_id, invite_id: invite_id }, params);
21721
+ };
21689
21722
  return Communities;
21690
21723
  }());
21691
21724
 
@@ -24632,6 +24665,14 @@ var CampaignsRoute = /** @class */ (function () {
24632
24665
  listPayouts: { url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
24633
24666
  generateCampaignContract: { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
24634
24667
  sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
24668
+ sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
24669
+ sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
24670
+ sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
24671
+ updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
24672
+ sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
24673
+ getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
24674
+ getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
24675
+ updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
24635
24676
  };
24636
24677
  return CampaignsRoute;
24637
24678
  }());
@@ -25290,6 +25331,79 @@ var Campaigns = /** @class */ (function () {
25290
25331
  Campaigns.sendCampaignContractWithDocusign = function (campaign_id, user_id, data, params) {
25291
25332
  return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
25292
25333
  };
25334
+ /**
25335
+ * Search IGDB for the campaign's game.
25336
+ * @param campaign_id The UUID of the campaign.
25337
+ * @param params Query parameters (e.g., search_query, limit).
25338
+ * @returns promise
25339
+ */
25340
+ Campaigns.sourcingSearchIgdbForCampaignGame = function (campaign_id, params) {
25341
+ return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id: campaign_id }, params);
25342
+ };
25343
+ /**
25344
+ * Find popular similar games from IGDB.
25345
+ * @param campaign_id The UUID of the campaign.
25346
+ * @param params Query parameters (e.g., igdb_id, limit).
25347
+ * @returns promise
25348
+ */
25349
+ Campaigns.sourcingGetSimilarIgdbGames = function (campaign_id, params) {
25350
+ return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id: campaign_id }, params);
25351
+ };
25352
+ /**
25353
+ * Find content creators for selected games. This does not save them to the database.
25354
+ * @param campaign_id The UUID of the campaign.
25355
+ * @param data The search criteria (source, igdb_ids, etc.).
25356
+ * @returns promise
25357
+ */
25358
+ Campaigns.sourcingFindCreators = function (campaign_id, data) {
25359
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id: campaign_id });
25360
+ };
25361
+ /**
25362
+ * Update campaign sourcing settings.
25363
+ * @param campaign_id The UUID of the campaign.
25364
+ * @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
25365
+ * @returns promise
25366
+ */
25367
+ Campaigns.updateSourcingSettings = function (campaign_id, data) {
25368
+ return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id: campaign_id });
25369
+ };
25370
+ /**
25371
+ * Find and save content creators for selected games to the database.
25372
+ * @param campaign_id The UUID of the campaign.
25373
+ * @param data The search criteria (source, igdb_ids, etc.).
25374
+ * @returns promise
25375
+ */
25376
+ Campaigns.sourcingFindAndSaveCreators = function (campaign_id, data) {
25377
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id: campaign_id });
25378
+ };
25379
+ /**
25380
+ * Get sourced creators for a campaign from the database.
25381
+ * @param campaign_id The UUID of the campaign.
25382
+ * @param params Query parameters for filtering, sorting, and pagination.
25383
+ * @returns promise
25384
+ */
25385
+ Campaigns.getSourcedCreators = function (campaign_id, params) {
25386
+ return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id: campaign_id }, params);
25387
+ };
25388
+ /**
25389
+ * Get a single sourced creator.
25390
+ * @param campaign_id The UUID of the campaign.
25391
+ * @param sourced_creator_id The UUID of the sourced creator.
25392
+ * @returns promise
25393
+ */
25394
+ Campaigns.getSourcedCreator = function (campaign_id, sourced_creator_id) {
25395
+ return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
25396
+ };
25397
+ /**
25398
+ * Update a sourced creator (e.g., approve or reject).
25399
+ * @param campaign_id The UUID of the campaign.
25400
+ * @param sourced_creator_id The UUID of the sourced creator to update.
25401
+ * @param data The update data (e.g., is_approved, is_rejected).
25402
+ * @returns promise
25403
+ */
25404
+ Campaigns.updateSourcedCreator = function (campaign_id, sourced_creator_id, data) {
25405
+ return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
25406
+ };
25293
25407
  return Campaigns;
25294
25408
  }());
25295
25409