glitch-javascript-sdk 2.0.7 → 2.0.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
@@ -24902,6 +24902,9 @@ var CampaignsRoute = /** @class */ (function () {
24902
24902
  updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
24903
24903
  assignKeyToInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/assign-key', method: HTTP_METHODS.POST },
24904
24904
  enrichSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}/enrich', method: HTTP_METHODS.POST },
24905
+ sourcingFindAndSaveTwitchCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-twitch-creators', method: HTTP_METHODS.POST },
24906
+ sourcingFindAndSaveYouTubeCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-youtube-creators', method: HTTP_METHODS.POST },
24907
+ exportSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/export', method: HTTP_METHODS.GET },
24905
24908
  };
24906
24909
  return CampaignsRoute;
24907
24910
  }());
@@ -25661,6 +25664,42 @@ var Campaigns = /** @class */ (function () {
25661
25664
  Campaigns.enrichSourcedCreator = function (campaign_id, sourced_creator_id) {
25662
25665
  return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
25663
25666
  };
25667
+ /**
25668
+ * Find and save Twitch creators for selected games to the database.
25669
+ * @param campaign_id The UUID of the campaign.
25670
+ * @param data The search criteria (source, igdb_ids, etc.).
25671
+ * @returns promise
25672
+ */
25673
+ Campaigns.sourcingFindAndSaveTwitchCreators = function (campaign_id, data) {
25674
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveTwitchCreators, data, { campaign_id: campaign_id });
25675
+ };
25676
+ /**
25677
+ * Find and save YouTube creators for selected games to the database.
25678
+ * @param campaign_id The UUID of the campaign.
25679
+ * @param data The search criteria (igdb_ids, period).
25680
+ * @returns promise
25681
+ */
25682
+ Campaigns.sourcingFindAndSaveYouTubeCreators = function (campaign_id, data) {
25683
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveYouTubeCreators, data, { campaign_id: campaign_id });
25684
+ };
25685
+ /**
25686
+ * Export sourced creators for a campaign to a CSV or XLSX file.
25687
+ * This method applies the same filtering and sorting parameters as getSourcedCreators.
25688
+ * The browser will automatically trigger a download for the returned file.
25689
+ *
25690
+ * @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/exportSourcedCreators
25691
+ *
25692
+ * @param campaign_id The UUID of the campaign.
25693
+ * @param params Query parameters for the export, including the required 'format' and any filters.
25694
+ * @param params.format The desired file format ('csv' or 'xlsx').
25695
+ * @param params.search Optional search term.
25696
+ * @param params.status Optional status filter ('pending', 'approved', 'rejected').
25697
+ * @param params.has_email Optional filter for creators with an email address (true/false).
25698
+ * @returns A promise that resolves with the file blob for download.
25699
+ */
25700
+ Campaigns.exportSourcedCreators = function (campaign_id, params) {
25701
+ return Requests.processRoute(CampaignsRoute.routes.exportSourcedCreators, undefined, { campaign_id: campaign_id }, params);
25702
+ };
25664
25703
  return Campaigns;
25665
25704
  }());
25666
25705