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/index.d.ts
CHANGED
|
@@ -4205,6 +4205,63 @@ declare class Campaigns {
|
|
|
4205
4205
|
* @returns promise
|
|
4206
4206
|
*/
|
|
4207
4207
|
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4208
|
+
/**
|
|
4209
|
+
* Search IGDB for the campaign's game.
|
|
4210
|
+
* @param campaign_id The UUID of the campaign.
|
|
4211
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
4212
|
+
* @returns promise
|
|
4213
|
+
*/
|
|
4214
|
+
static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4215
|
+
/**
|
|
4216
|
+
* Find popular similar games from IGDB.
|
|
4217
|
+
* @param campaign_id The UUID of the campaign.
|
|
4218
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
4219
|
+
* @returns promise
|
|
4220
|
+
*/
|
|
4221
|
+
static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4222
|
+
/**
|
|
4223
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
4224
|
+
* @param campaign_id The UUID of the campaign.
|
|
4225
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
4226
|
+
* @returns promise
|
|
4227
|
+
*/
|
|
4228
|
+
static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4229
|
+
/**
|
|
4230
|
+
* Update campaign sourcing settings.
|
|
4231
|
+
* @param campaign_id The UUID of the campaign.
|
|
4232
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
4233
|
+
* @returns promise
|
|
4234
|
+
*/
|
|
4235
|
+
static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4236
|
+
/**
|
|
4237
|
+
* Find and save content creators for selected games to the database.
|
|
4238
|
+
* @param campaign_id The UUID of the campaign.
|
|
4239
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
4240
|
+
* @returns promise
|
|
4241
|
+
*/
|
|
4242
|
+
static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4243
|
+
/**
|
|
4244
|
+
* Get sourced creators for a campaign from the database.
|
|
4245
|
+
* @param campaign_id The UUID of the campaign.
|
|
4246
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
4247
|
+
* @returns promise
|
|
4248
|
+
*/
|
|
4249
|
+
static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4250
|
+
/**
|
|
4251
|
+
* Get a single sourced creator.
|
|
4252
|
+
* @param campaign_id The UUID of the campaign.
|
|
4253
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
4254
|
+
* @returns promise
|
|
4255
|
+
*/
|
|
4256
|
+
static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
4257
|
+
/**
|
|
4258
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
4259
|
+
* @param campaign_id The UUID of the campaign.
|
|
4260
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
4261
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
4262
|
+
* @returns promise
|
|
4263
|
+
*/
|
|
4264
|
+
static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>>;
|
|
4208
4265
|
}
|
|
4209
4266
|
|
|
4210
4267
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -766,6 +766,86 @@ class Campaigns {
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
|
|
769
|
+
/**
|
|
770
|
+
* Search IGDB for the campaign's game.
|
|
771
|
+
* @param campaign_id The UUID of the campaign.
|
|
772
|
+
* @param params Query parameters (e.g., search_query, limit).
|
|
773
|
+
* @returns promise
|
|
774
|
+
*/
|
|
775
|
+
public static sourcingSearchIgdbForCampaignGame<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
776
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingSearchIgdbForCampaignGame, undefined, { campaign_id }, params);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Find popular similar games from IGDB.
|
|
781
|
+
* @param campaign_id The UUID of the campaign.
|
|
782
|
+
* @param params Query parameters (e.g., igdb_id, limit).
|
|
783
|
+
* @returns promise
|
|
784
|
+
*/
|
|
785
|
+
public static sourcingGetSimilarIgdbGames<T>(campaign_id: string, params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
786
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingGetSimilarIgdbGames, undefined, { campaign_id }, params);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Find content creators for selected games. This does not save them to the database.
|
|
791
|
+
* @param campaign_id The UUID of the campaign.
|
|
792
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
793
|
+
* @returns promise
|
|
794
|
+
*/
|
|
795
|
+
public static sourcingFindCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
796
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindCreators, data, { campaign_id });
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Update campaign sourcing settings.
|
|
801
|
+
* @param campaign_id The UUID of the campaign.
|
|
802
|
+
* @param data The settings to update (igdb_id, similar_game_igdb_ids, etc.).
|
|
803
|
+
* @returns promise
|
|
804
|
+
*/
|
|
805
|
+
public static updateSourcingSettings<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
806
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcingSettings, data, { campaign_id });
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Find and save content creators for selected games to the database.
|
|
811
|
+
* @param campaign_id The UUID of the campaign.
|
|
812
|
+
* @param data The search criteria (source, igdb_ids, etc.).
|
|
813
|
+
* @returns promise
|
|
814
|
+
*/
|
|
815
|
+
public static sourcingFindAndSaveCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
|
|
816
|
+
return Requests.processRoute(CampaignsRoute.routes.sourcingFindAndSaveCreators, data, { campaign_id });
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Get sourced creators for a campaign from the database.
|
|
821
|
+
* @param campaign_id The UUID of the campaign.
|
|
822
|
+
* @param params Query parameters for filtering, sorting, and pagination.
|
|
823
|
+
* @returns promise
|
|
824
|
+
*/
|
|
825
|
+
public static getSourcedCreators<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
826
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreators, undefined, { campaign_id }, params);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Get a single sourced creator.
|
|
831
|
+
* @param campaign_id The UUID of the campaign.
|
|
832
|
+
* @param sourced_creator_id The UUID of the sourced creator.
|
|
833
|
+
* @returns promise
|
|
834
|
+
*/
|
|
835
|
+
public static getSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>> {
|
|
836
|
+
return Requests.processRoute(CampaignsRoute.routes.getSourcedCreator, undefined, { campaign_id, sourced_creator_id });
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Update a sourced creator (e.g., approve or reject).
|
|
841
|
+
* @param campaign_id The UUID of the campaign.
|
|
842
|
+
* @param sourced_creator_id The UUID of the sourced creator to update.
|
|
843
|
+
* @param data The update data (e.g., is_approved, is_rejected).
|
|
844
|
+
* @returns promise
|
|
845
|
+
*/
|
|
846
|
+
public static updateSourcedCreator<T>(campaign_id: string, sourced_creator_id: string, data: object): AxiosPromise<Response<T>> {
|
|
847
|
+
return Requests.processRoute(CampaignsRoute.routes.updateSourcedCreator, data, { campaign_id, sourced_creator_id });
|
|
848
|
+
}
|
|
769
849
|
}
|
|
770
850
|
|
|
771
851
|
export default Campaigns;
|
|
@@ -61,6 +61,14 @@ class CampaignsRoute {
|
|
|
61
61
|
listPayouts :{ url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
62
62
|
generateCampaignContract : { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
63
63
|
sendCampaignContractWithDocusign : { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
64
|
+
sourcingSearchIgdbForCampaignGame: { url: '/campaigns/{campaign_id}/sourcing/search-game', method: HTTP_METHODS.GET },
|
|
65
|
+
sourcingGetSimilarIgdbGames: { url: '/campaigns/{campaign_id}/sourcing/similar-games', method: HTTP_METHODS.GET },
|
|
66
|
+
sourcingFindCreators: { url: '/campaigns/{campaign_id}/sourcing/find-creators', method: HTTP_METHODS.POST },
|
|
67
|
+
updateSourcingSettings: { url: '/campaigns/{campaign_id}/sourcing/settings', method: HTTP_METHODS.PUT },
|
|
68
|
+
sourcingFindAndSaveCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-creators', method: HTTP_METHODS.POST },
|
|
69
|
+
getSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators', method: HTTP_METHODS.GET },
|
|
70
|
+
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
71
|
+
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
64
72
|
|
|
65
73
|
|
|
66
74
|
};
|