glitch-javascript-sdk 2.0.9 → 2.1.0

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/index.d.ts CHANGED
@@ -4484,6 +4484,26 @@ declare class Campaigns {
4484
4484
  format: 'csv' | 'xlsx';
4485
4485
  [key: string]: any;
4486
4486
  }): AxiosPromise<Response<T>>;
4487
+ /**
4488
+ * Search IGDB for any game by a query string.
4489
+ * @param campaign_id The UUID of the campaign (for permission checking).
4490
+ * @param params Query parameters including 'search_query' and optional 'limit'.
4491
+ * @returns promise
4492
+ */
4493
+ static sourcingSearchAnyIgdbGame<T>(campaign_id: string, params: {
4494
+ search_query: string;
4495
+ limit?: number;
4496
+ }): AxiosPromise<Response<T>>;
4497
+ /**
4498
+ * Get full game details from a list of IGDB IDs.
4499
+ * @param campaign_id The UUID of the campaign.
4500
+ * @param data An object containing the array of IGDB IDs.
4501
+ * @param data.igdb_ids An array of IGDB game IDs.
4502
+ * @returns promise
4503
+ */
4504
+ static sourcingGetGamesByIds<T>(campaign_id: string, data: {
4505
+ igdb_ids: number[];
4506
+ }): AxiosPromise<Response<T>>;
4487
4507
  }
4488
4508
 
4489
4509
  declare class Subscriptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -916,6 +916,28 @@ class Campaigns {
916
916
  return Requests.processRoute(CampaignsRoute.routes.exportSourcedCreators, undefined, { campaign_id }, params);
917
917
  }
918
918
 
919
+ /**
920
+ * Search IGDB for any game by a query string.
921
+ * @param campaign_id The UUID of the campaign (for permission checking).
922
+ * @param params Query parameters including 'search_query' and optional 'limit'.
923
+ * @returns promise
924
+ */
925
+ public static sourcingSearchAnyIgdbGame<T>(campaign_id: string, params: { search_query: string, limit?: number }): AxiosPromise<Response<T>> {
926
+ return Requests.processRoute(CampaignsRoute.routes.sourcingSearchAnyIgdbGame, undefined, { campaign_id }, params);
927
+ }
928
+
929
+ /**
930
+ * Get full game details from a list of IGDB IDs.
931
+ * @param campaign_id The UUID of the campaign.
932
+ * @param data An object containing the array of IGDB IDs.
933
+ * @param data.igdb_ids An array of IGDB game IDs.
934
+ * @returns promise
935
+ */
936
+ public static sourcingGetGamesByIds<T>(campaign_id: string, data: { igdb_ids: number[] }): AxiosPromise<Response<T>> {
937
+ return Requests.processRoute(CampaignsRoute.routes.sourcingGetGamesByIds, data, { campaign_id });
938
+ }
939
+
940
+
919
941
  }
920
942
 
921
943
  export default Campaigns;
@@ -74,7 +74,8 @@ class CampaignsRoute {
74
74
  sourcingFindAndSaveTwitchCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-twitch-creators', method: HTTP_METHODS.POST },
75
75
  sourcingFindAndSaveYouTubeCreators: { url: '/campaigns/{campaign_id}/sourcing/find-save-youtube-creators', method: HTTP_METHODS.POST },
76
76
  exportSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/export', method: HTTP_METHODS.GET },
77
-
77
+ sourcingSearchAnyIgdbGame: { url: '/campaigns/{campaign_id}/sourcing/search-any-game', method: HTTP_METHODS.GET },
78
+ sourcingGetGamesByIds: { url: '/campaigns/{campaign_id}/sourcing/games-by-ids', method: HTTP_METHODS.POST },
78
79
 
79
80
  };
80
81