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
|
@@ -538,5 +538,62 @@ declare class Campaigns {
|
|
|
538
538
|
* @returns promise
|
|
539
539
|
*/
|
|
540
540
|
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
541
|
+
/**
|
|
542
|
+
* Search IGDB for the campaign's game.
|
|
543
|
+
* @param campaign_id The UUID of the campaign.
|
|
544
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
545
|
+
* @returns promise
|
|
546
|
+
*/
|
|
547
|
+
static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
548
|
+
/**
|
|
549
|
+
* Find popular similar games from IGDB.
|
|
550
|
+
* @param campaign_id The UUID of the campaign.
|
|
551
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
552
|
+
* @returns promise
|
|
553
|
+
*/
|
|
554
|
+
static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
555
|
+
/**
|
|
556
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
557
|
+
* @param campaign_id The UUID of the campaign.
|
|
558
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
559
|
+
* @returns promise
|
|
560
|
+
*/
|
|
561
|
+
static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
562
|
+
/**
|
|
563
|
+
* Update campaign sourcing settings.
|
|
564
|
+
* @param campaign_id The UUID of the campaign.
|
|
565
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
566
|
+
* @returns promise
|
|
567
|
+
*/
|
|
568
|
+
static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
569
|
+
/**
|
|
570
|
+
* Find and save content creators for selected games to the database.
|
|
571
|
+
* @param campaign_id The UUID of the campaign.
|
|
572
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
573
|
+
* @returns promise
|
|
574
|
+
*/
|
|
575
|
+
static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
576
|
+
/**
|
|
577
|
+
* Get sourced creators for a campaign from the database.
|
|
578
|
+
* @param campaign_id The UUID of the campaign.
|
|
579
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
580
|
+
* @returns promise
|
|
581
|
+
*/
|
|
582
|
+
static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
583
|
+
/**
|
|
584
|
+
* Get a single sourced creator.
|
|
585
|
+
* @param campaign_id The UUID of the campaign.
|
|
586
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
587
|
+
* @returns promise
|
|
588
|
+
*/
|
|
589
|
+
static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
590
|
+
/**
|
|
591
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
592
|
+
* @param campaign_id The UUID of the campaign.
|
|
593
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
594
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
595
|
+
* @returns promise
|
|
596
|
+
*/
|
|
597
|
+
static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>>;
|
|
541
598
|
}
|
|
542
599
|
export default Campaigns;
|
package/dist/esm/index.js
CHANGED
|
@@ -11448,6 +11448,14 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
11448
11448
|
listPayouts: { url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
11449
11449
|
generateCampaignContract: { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
11450
11450
|
sendCampaignContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
11451
|
+
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
11452
|
+
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
11453
|
+
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
11454
|
+
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
11455
|
+
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
11456
|
+
getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
|
|
11457
|
+
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
11458
|
+
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
11451
11459
|
};
|
|
11452
11460
|
return CampaignsRoute;
|
|
11453
11461
|
}());
|
|
@@ -12106,6 +12114,79 @@ var Campaigns = /** @class */ (function () {
|
|
|
12106
12114
|
Campaigns.sendCampaignContractWithDocusign = function (campaign_id, user_id, data, params) {
|
|
12107
12115
|
return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
12108
12116
|
};
|
|
12117
|
+
/**
|
|
12118
|
+
* Search IGDB for the campaign's game.
|
|
12119
|
+
* @param campaign_id The UUID of the campaign.
|
|
12120
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
12121
|
+
* @returns promise
|
|
12122
|
+
*/
|
|
12123
|
+
Campaigns.sourcingSearchIgdbForCampaignGame = function (campaign_id, params) {
|
|
12124
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id: campaign_id }, params);
|
|
12125
|
+
};
|
|
12126
|
+
/**
|
|
12127
|
+
* Find popular similar games from IGDB.
|
|
12128
|
+
* @param campaign_id The UUID of the campaign.
|
|
12129
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
12130
|
+
* @returns promise
|
|
12131
|
+
*/
|
|
12132
|
+
Campaigns.sourcingGetSimilarIgdbGames = function (campaign_id, params) {
|
|
12133
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id: campaign_id }, params);
|
|
12134
|
+
};
|
|
12135
|
+
/**
|
|
12136
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
12137
|
+
* @param campaign_id The UUID of the campaign.
|
|
12138
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
12139
|
+
* @returns promise
|
|
12140
|
+
*/
|
|
12141
|
+
Campaigns.sourcingFindCreators = function (campaign_id, data) {
|
|
12142
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id: campaign_id });
|
|
12143
|
+
};
|
|
12144
|
+
/**
|
|
12145
|
+
* Update campaign sourcing settings.
|
|
12146
|
+
* @param campaign_id The UUID of the campaign.
|
|
12147
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
12148
|
+
* @returns promise
|
|
12149
|
+
*/
|
|
12150
|
+
Campaigns.updateSourcingSettings = function (campaign_id, data) {
|
|
12151
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id: campaign_id });
|
|
12152
|
+
};
|
|
12153
|
+
/**
|
|
12154
|
+
* Find and save content creators for selected games to the database.
|
|
12155
|
+
* @param campaign_id The UUID of the campaign.
|
|
12156
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
12157
|
+
* @returns promise
|
|
12158
|
+
*/
|
|
12159
|
+
Campaigns.sourcingFindAndSaveCreators = function (campaign_id, data) {
|
|
12160
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id: campaign_id });
|
|
12161
|
+
};
|
|
12162
|
+
/**
|
|
12163
|
+
* Get sourced creators for a campaign from the database.
|
|
12164
|
+
* @param campaign_id The UUID of the campaign.
|
|
12165
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
12166
|
+
* @returns promise
|
|
12167
|
+
*/
|
|
12168
|
+
Campaigns.getSourcedCreators = function (campaign_id, params) {
|
|
12169
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id: campaign_id }, params);
|
|
12170
|
+
};
|
|
12171
|
+
/**
|
|
12172
|
+
* Get a single sourced creator.
|
|
12173
|
+
* @param campaign_id The UUID of the campaign.
|
|
12174
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
12175
|
+
* @returns promise
|
|
12176
|
+
*/
|
|
12177
|
+
Campaigns.getSourcedCreator = function (campaign_id, sourced_creator_id) {
|
|
12178
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
12179
|
+
};
|
|
12180
|
+
/**
|
|
12181
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
12182
|
+
* @param campaign_id The UUID of the campaign.
|
|
12183
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
12184
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
12185
|
+
* @returns promise
|
|
12186
|
+
*/
|
|
12187
|
+
Campaigns.updateSourcedCreator = function (campaign_id, sourced_creator_id, data) {
|
|
12188
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
12189
|
+
};
|
|
12109
12190
|
return Campaigns;
|
|
12110
12191
|
}());
|
|
12111
12192
|
|