glitch-javascript-sdk 1.9.7 → 1.9.8
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 +81 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +57 -0
- package/dist/esm/index.js +81 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +57 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +80 -0
- package/src/routes/CampaignsRoute.ts +8 -0
package/dist/cjs/index.js
CHANGED
|
@@ -24632,6 +24632,14 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
24632
24632
|
listPayouts: { url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
24633
24633
|
generateCampaignContract: { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
24634
24634
|
sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
24635
|
+
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
24636
|
+
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
24637
|
+
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
24638
|
+
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
24639
|
+
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
24640
|
+
getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
|
|
24641
|
+
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
24642
|
+
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
24635
24643
|
};
|
|
24636
24644
|
return CampaignsRoute;
|
|
24637
24645
|
}());
|
|
@@ -25290,6 +25298,79 @@ var Campaigns = /** @class */ (function () {
|
|
|
25290
25298
|
Campaigns.sendCampaignContractWithDocusign = function (campaign_id, user_id, data, params) {
|
|
25291
25299
|
return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
25292
25300
|
};
|
|
25301
|
+
/**
|
|
25302
|
+
* Search IGDB for the campaign's game.
|
|
25303
|
+
* @param campaign_id The UUID of the campaign.
|
|
25304
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
25305
|
+
* @returns promise
|
|
25306
|
+
*/
|
|
25307
|
+
Campaigns.sourcingSearchIgdbForCampaignGame = function (campaign_id, params) {
|
|
25308
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id: campaign_id }, params);
|
|
25309
|
+
};
|
|
25310
|
+
/**
|
|
25311
|
+
* Find popular similar games from IGDB.
|
|
25312
|
+
* @param campaign_id The UUID of the campaign.
|
|
25313
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
25314
|
+
* @returns promise
|
|
25315
|
+
*/
|
|
25316
|
+
Campaigns.sourcingGetSimilarIgdbGames = function (campaign_id, params) {
|
|
25317
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id: campaign_id }, params);
|
|
25318
|
+
};
|
|
25319
|
+
/**
|
|
25320
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
25321
|
+
* @param campaign_id The UUID of the campaign.
|
|
25322
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
25323
|
+
* @returns promise
|
|
25324
|
+
*/
|
|
25325
|
+
Campaigns.sourcingFindCreators = function (campaign_id, data) {
|
|
25326
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id: campaign_id });
|
|
25327
|
+
};
|
|
25328
|
+
/**
|
|
25329
|
+
* Update campaign sourcing settings.
|
|
25330
|
+
* @param campaign_id The UUID of the campaign.
|
|
25331
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
25332
|
+
* @returns promise
|
|
25333
|
+
*/
|
|
25334
|
+
Campaigns.updateSourcingSettings = function (campaign_id, data) {
|
|
25335
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id: campaign_id });
|
|
25336
|
+
};
|
|
25337
|
+
/**
|
|
25338
|
+
* Find and save content creators for selected games to the database.
|
|
25339
|
+
* @param campaign_id The UUID of the campaign.
|
|
25340
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
25341
|
+
* @returns promise
|
|
25342
|
+
*/
|
|
25343
|
+
Campaigns.sourcingFindAndSaveCreators = function (campaign_id, data) {
|
|
25344
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id: campaign_id });
|
|
25345
|
+
};
|
|
25346
|
+
/**
|
|
25347
|
+
* Get sourced creators for a campaign from the database.
|
|
25348
|
+
* @param campaign_id The UUID of the campaign.
|
|
25349
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
25350
|
+
* @returns promise
|
|
25351
|
+
*/
|
|
25352
|
+
Campaigns.getSourcedCreators = function (campaign_id, params) {
|
|
25353
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id: campaign_id }, params);
|
|
25354
|
+
};
|
|
25355
|
+
/**
|
|
25356
|
+
* Get a single sourced creator.
|
|
25357
|
+
* @param campaign_id The UUID of the campaign.
|
|
25358
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
25359
|
+
* @returns promise
|
|
25360
|
+
*/
|
|
25361
|
+
Campaigns.getSourcedCreator = function (campaign_id, sourced_creator_id) {
|
|
25362
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
25363
|
+
};
|
|
25364
|
+
/**
|
|
25365
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
25366
|
+
* @param campaign_id The UUID of the campaign.
|
|
25367
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
25368
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
25369
|
+
* @returns promise
|
|
25370
|
+
*/
|
|
25371
|
+
Campaigns.updateSourcedCreator = function (campaign_id, sourced_creator_id, data) {
|
|
25372
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
25373
|
+
};
|
|
25293
25374
|
return Campaigns;
|
|
25294
25375
|
}());
|
|
25295
25376
|
|