glitch-javascript-sdk 2.2.2 → 2.2.3

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 {
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.3",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
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;
@@ -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 },