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.
- package/dist/cjs/index.js +53 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +44 -0
- package/dist/esm/index.js +53 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +44 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +79 -25
- package/src/routes/CampaignsRoute.ts +4 -0
package/dist/cjs/index.js
CHANGED
|
@@ -24901,6 +24901,10 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
24901
24901
|
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
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
|
+
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 },
|
|
24904
24908
|
};
|
|
24905
24909
|
return CampaignsRoute;
|
|
24906
24910
|
}());
|
|
@@ -25647,6 +25651,55 @@ var Campaigns = /** @class */ (function () {
|
|
|
25647
25651
|
Campaigns.assignKeyToInfluencer = function (campaign_id, user_id, data, params) {
|
|
25648
25652
|
return Requests.processRoute(CampaignsRoute.routes.assignKeyToInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
25649
25653
|
};
|
|
25654
|
+
/**
|
|
25655
|
+
* Manually trigger a real-time profile enrichment for a sourced creator.
|
|
25656
|
+
* This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
|
|
25657
|
+
*
|
|
25658
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
|
|
25659
|
+
*
|
|
25660
|
+
* @param campaign_id The UUID of the campaign.
|
|
25661
|
+
* @param sourced_creator_id The UUID of the sourced creator to enrich.
|
|
25662
|
+
* @returns promise containing the fully enriched SourcedCreator object.
|
|
25663
|
+
*/
|
|
25664
|
+
Campaigns.enrichSourcedCreator = function (campaign_id, sourced_creator_id) {
|
|
25665
|
+
return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
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
|
+
};
|
|
25650
25703
|
return Campaigns;
|
|
25651
25704
|
}());
|
|
25652
25705
|
|