glitch-javascript-sdk 2.0.6 → 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.
@@ -610,5 +610,49 @@ declare class Campaigns {
610
610
  static assignKeyToInfluencer<T>(campaign_id: string, user_id: string, data: {
611
611
  platform: string;
612
612
  }, params?: Record<string, any>): AxiosPromise<Response<T>>;
613
+ /**
614
+ * Manually trigger a real-time profile enrichment for a sourced creator.
615
+ * This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
616
+ *
617
+ * @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
618
+ *
619
+ * @param campaign_id The UUID of the campaign.
620
+ * @param sourced_creator_id The UUID of the sourced creator to enrich.
621
+ * @returns promise containing the fully enriched SourcedCreator object.
622
+ */
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>>;
613
657
  }
614
658
  export default Campaigns;
package/dist/esm/index.js CHANGED
@@ -11717,6 +11717,10 @@ var CampaignsRoute = /** @class */ (function () {
11717
11717
  getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
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
+ 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 },
11720
11724
  };
11721
11725
  return CampaignsRoute;
11722
11726
  }());
@@ -12463,6 +12467,55 @@ var Campaigns = /** @class */ (function () {
12463
12467
  Campaigns.assignKeyToInfluencer = function (campaign_id, user_id, data, params) {
12464
12468
  return Requests.processRoute(CampaignsRoute.routes.assignKeyToInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
12465
12469
  };
12470
+ /**
12471
+ * Manually trigger a real-time profile enrichment for a sourced creator.
12472
+ * This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
12473
+ *
12474
+ * @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
12475
+ *
12476
+ * @param campaign_id The UUID of the campaign.
12477
+ * @param sourced_creator_id The UUID of the sourced creator to enrich.
12478
+ * @returns promise containing the fully enriched SourcedCreator object.
12479
+ */
12480
+ Campaigns.enrichSourcedCreator = function (campaign_id, sourced_creator_id) {
12481
+ return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
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
+ };
12466
12519
  return Campaigns;
12467
12520
  }());
12468
12521