glitch-javascript-sdk 2.2.2 → 2.2.4

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
@@ -4009,6 +4009,15 @@ declare class Titles {
4009
4009
  * @param translationData The full translation object to be saved.
4010
4010
  */
4011
4011
  static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
4012
+ /**
4013
+ * Get an aggregated report of ad conversion events for charting.
4014
+ */
4015
+ static getAdConversionEventsReport<T>(title_id: string, params: {
4016
+ start_date: string;
4017
+ end_date: string;
4018
+ group_by: 'platform' | 'status' | 'event_type';
4019
+ unique_clicks?: boolean;
4020
+ }): AxiosPromise<Response<T>>;
4012
4021
  }
4013
4022
 
4014
4023
  declare class Campaigns {
@@ -4693,6 +4702,9 @@ declare class Campaigns {
4693
4702
  * @returns promise
4694
4703
  */
4695
4704
  static updateAutoInviteCriteria<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
4705
+ static updateCustomRanking<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
4706
+ static updateCreatorBucket<T>(campaign_id: string, creator_id: string, data: object): AxiosPromise<Response<T>>;
4707
+ static reRankSourcedCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
4696
4708
  }
4697
4709
 
4698
4710
  declare class Subscriptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -916,12 +916,12 @@ 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
- */
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
925
  public static sourcingSearchAnyIgdbGame<T>(campaign_id: string, params: { search_query: string, limit?: number }): AxiosPromise<Response<T>> {
926
926
  return Requests.processRoute(CampaignsRoute.routes.sourcingSearchAnyIgdbGame, undefined, { campaign_id }, params);
927
927
  }
@@ -948,6 +948,18 @@ class Campaigns {
948
948
  return Requests.processRoute(CampaignsRoute.routes.updateAutoInviteCriteria, data, { campaign_id });
949
949
  }
950
950
 
951
+ public static updateCustomRanking<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
952
+ return Requests.processRoute(CampaignsRoute.routes.updateCustomRanking, data, { campaign_id });
953
+ }
954
+
955
+ public static updateCreatorBucket<T>(campaign_id: string, creator_id: string, data: object): AxiosPromise<Response<T>> {
956
+ return Requests.processRoute(CampaignsRoute.routes.updateCreatorBucket, data, { campaign_id, creator_id });
957
+ }
958
+
959
+ public static reRankSourcedCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>> {
960
+ return Requests.processRoute(CampaignsRoute.routes.reRankSourcedCreators, data, { campaign_id });
961
+ }
962
+
951
963
 
952
964
  }
953
965
 
package/src/api/Titles.ts CHANGED
@@ -817,11 +817,11 @@ class Titles {
817
817
  return Requests.processRoute(TitlesRoute.routes.translateLandingPage, data, { landing_page_id }, params);
818
818
  }
819
819
 
820
- /**
821
- * Generate or regenerate AI-powered HTML content for a landing page.
822
- * @param landing_page_id The UUID of the landing page.
823
- * @param data An object containing the prompt, language_code, and privacy_mode.
824
- */
820
+ /**
821
+ * Generate or regenerate AI-powered HTML content for a landing page.
822
+ * @param landing_page_id The UUID of the landing page.
823
+ * @param data An object containing the prompt, language_code, and privacy_mode.
824
+ */
825
825
  public static generateLandingPageAiContent<T>(landing_page_id: string, data: { prompt: string, language_code: string, privacy_mode: string }, params?: Record<string, any>): AxiosPromise<Response<T>> {
826
826
  return Requests.processRoute(TitlesRoute.routes.generateLandingPageAiContent, data, { landing_page_id }, params);
827
827
  }
@@ -834,6 +834,26 @@ class Titles {
834
834
  public static saveLandingPageTranslation<T>(landing_page_id: string, translationData: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
835
835
  return Requests.processRoute(TitlesRoute.routes.saveLandingPageTranslation, translationData, { landing_page_id }, params);
836
836
  }
837
+
838
+ /**
839
+ * Get an aggregated report of ad conversion events for charting.
840
+ */
841
+ public static getAdConversionEventsReport<T>(
842
+ title_id: string,
843
+ params: {
844
+ start_date: string;
845
+ end_date: string;
846
+ group_by: 'platform' | 'status' | 'event_type';
847
+ unique_clicks?: boolean;
848
+ }
849
+ ): AxiosPromise<Response<T>> {
850
+ return Requests.processRoute(
851
+ TitlesRoute.routes.getAdConversionEventsReport,
852
+ {},
853
+ { title_id },
854
+ params
855
+ );
856
+ }
837
857
  }
838
858
 
839
859
  export default Titles;
@@ -77,7 +77,9 @@ class CampaignsRoute {
77
77
  sourcingSearchAnyIgdbGame: { url: '/campaigns/{campaign_id}/sourcing/search-any-game', method: HTTP_METHODS.GET },
78
78
  sourcingGetGamesByIds: { url: '/campaigns/{campaign_id}/sourcing/games-by-ids', method: HTTP_METHODS.POST },
79
79
  updateAutoInviteCriteria: { url: '/campaigns/{campaign_id}/sourcing/auto-invite-criteria', method: HTTP_METHODS.PUT },
80
-
80
+ updateCustomRanking: { url: '/campaigns/{campaign_id}/sourcing/custom-ranking', method: HTTP_METHODS.PUT },
81
+ updateCreatorBucket: { url: '/campaigns/{campaign_id}/sourcing/creators/{creator_id}/bucket', method: HTTP_METHODS.PUT },
82
+ reRankSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/re-rank', method: HTTP_METHODS.POST },
81
83
 
82
84
  };
83
85
 
@@ -148,6 +148,11 @@ class TitlesRoute {
148
148
  method: HTTP_METHODS.POST
149
149
  },
150
150
 
151
+ getAdConversionEventsReport: {
152
+ url: '/titles/{title_id}/ad-conversion-events/report',
153
+ method: HTTP_METHODS.GET
154
+ },
155
+
151
156
  listLandingPages: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.GET },
152
157
  createLandingPage: { url: '/titles/{title_id}/landing-pages', method: HTTP_METHODS.POST },
153
158
  viewLandingPage: { url: '/landing-pages/{landing_page_id}', method: HTTP_METHODS.GET },