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.
@@ -621,5 +621,38 @@ declare class Campaigns {
621
621
  * @returns promise containing the fully enriched SourcedCreator object.
622
622
  */
623
623
  static enrichSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
624
+ /**
625
+ * Find and save Twitch creators for selected games to the database.
626
+ * @param campaign_id The UUID of the campaign.
627
+ * @param data The search criteria (source, igdb_ids, etc.).
628
+ * @returns promise
629
+ */
630
+ static sourcingFindAndSaveTwitchCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
631
+ /**
632
+ * Find and save YouTube creators for selected games to the database.
633
+ * @param campaign_id The UUID of the campaign.
634
+ * @param data The search criteria (igdb_ids, period).
635
+ * @returns promise
636
+ */
637
+ static sourcingFindAndSaveYouTubeCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
638
+ /**
639
+ * Export sourced creators for a campaign to a CSV or XLSX file.
640
+ * This method applies the same filtering and sorting parameters as getSourcedCreators.
641
+ * The browser will automatically trigger a download for the returned file.
642
+ *
643
+ * @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/exportSourcedCreators
644
+ *
645
+ * @param campaign_id The UUID of the campaign.
646
+ * @param params Query parameters for the export, including the required 'format' and any filters.
647
+ * @param params.format The desired file format ('csv' or 'xlsx').
648
+ * @param params.search Optional search term.
649
+ * @param params.status Optional status filter ('pending', 'approved', 'rejected').
650
+ * @param params.has_email Optional filter for creators with an email address (true/false).
651
+ * @returns A promise that resolves with the file blob for download.
652
+ */
653
+ static exportSourcedCreators<T>(campaign_id: string, params: {
654
+ format: 'csv' | 'xlsx';
655
+ [key: string]: any;
656
+ }): AxiosPromise<Response<T>>;
624
657
  }
625
658
  export default Campaigns;
package/dist/esm/index.js CHANGED
@@ -11718,6 +11718,9 @@ var CampaignsRoute = /** @class */ (function () {
11718
11718
  updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
11719
11719
  assignKeyToInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/assign-key', method: HTTP_METHODS.POST },
11720
11720
  enrichSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}/enrich', method: HTTP_METHODS.POST },
11721
+ sourcingFindAndSaveTwitchCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-twitch-creators', method: HTTP_METHODS.POST },
11722
+ sourcingFindAndSaveYouTubeCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-youtube-creators', method: HTTP_METHODS.POST },
11723
+ exportSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/export', method: HTTP_METHODS.GET },
11721
11724
  };
11722
11725
  return CampaignsRoute;
11723
11726
  }());
@@ -12477,6 +12480,42 @@ var Campaigns = /** @class */ (function () {
12477
12480
  Campaigns.enrichSourcedCreator = function (campaign_id, sourced_creator_id) {
12478
12481
  return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
12479
12482
  };
12483
+ /**
12484
+ * Find and save Twitch creators for selected games to the database.
12485
+ * @param campaign_id The UUID of the campaign.
12486
+ * @param data The search criteria (source, igdb_ids, etc.).
12487
+ * @returns promise
12488
+ */
12489
+ Campaigns.sourcingFindAndSaveTwitchCreators = function (campaign_id, data) {
12490
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveTwitchCreators, data, { campaign_id: campaign_id });
12491
+ };
12492
+ /**
12493
+ * Find and save YouTube creators for selected games to the database.
12494
+ * @param campaign_id The UUID of the campaign.
12495
+ * @param data The search criteria (igdb_ids, period).
12496
+ * @returns promise
12497
+ */
12498
+ Campaigns.sourcingFindAndSaveYouTubeCreators = function (campaign_id, data) {
12499
+ return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveYouTubeCreators, data, { campaign_id: campaign_id });
12500
+ };
12501
+ /**
12502
+ * Export sourced creators for a campaign to a CSV or XLSX file.
12503
+ * This method applies the same filtering and sorting parameters as getSourcedCreators.
12504
+ * The browser will automatically trigger a download for the returned file.
12505
+ *
12506
+ * @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/exportSourcedCreators
12507
+ *
12508
+ * @param campaign_id The UUID of the campaign.
12509
+ * @param params Query parameters for the export, including the required 'format' and any filters.
12510
+ * @param params.format The desired file format ('csv' or 'xlsx').
12511
+ * @param params.search Optional search term.
12512
+ * @param params.status Optional status filter ('pending', 'approved', 'rejected').
12513
+ * @param params.has_email Optional filter for creators with an email address (true/false).
12514
+ * @returns A promise that resolves with the file blob for download.
12515
+ */
12516
+ Campaigns.exportSourcedCreators = function (campaign_id, params) {
12517
+ return Requests.processRoute(CampaignsRoute.routes.exportSourcedCreators, undefined, { campaign_id: campaign_id }, params);
12518
+ };
12480
12519
  return Campaigns;
12481
12520
  }());
12482
12521