glitch-javascript-sdk 2.4.6 → 2.4.7

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
@@ -4117,6 +4117,52 @@ declare class Titles {
4117
4117
  group_by: 'platform' | 'status' | 'event_type';
4118
4118
  unique_clicks?: boolean;
4119
4119
  }): AxiosPromise<Response<T>>;
4120
+ /**
4121
+ * Get a geographical distribution report for installs.
4122
+ * @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
4123
+ */
4124
+ static geoReport<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4125
+ /**
4126
+ * List and filter raw game events (telemetry).
4127
+ */
4128
+ static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4129
+ /**
4130
+ * Record a single in-game action.
4131
+ */
4132
+ static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
4133
+ /**
4134
+ * Record multiple events in one request (Batching).
4135
+ * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
4136
+ */
4137
+ static bulkCreateEvents<T>(title_id: string, data: {
4138
+ events: object[];
4139
+ }): AxiosPromise<Response<T>>;
4140
+ /**
4141
+ * Get a summary of actions per step.
4142
+ */
4143
+ static eventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4144
+ /**
4145
+ * Get all unique step and action keys used in this title.
4146
+ */
4147
+ static eventDistinctKeys<T>(title_id: string): AxiosPromise<Response<T>>;
4148
+ /**
4149
+ * List all saved behavioral funnel definitions.
4150
+ */
4151
+ static listBehavioralFunnels<T>(title_id: string): AxiosPromise<Response<T>>;
4152
+ /**
4153
+ * Create and save a new behavioral funnel definition.
4154
+ * @param data { name: string, description?: string, steps: string[] }
4155
+ */
4156
+ static createBehavioralFunnel<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
4157
+ /**
4158
+ * Generate the drop-off report for a specific behavioral funnel.
4159
+ * @param params { start_date?: string, end_date?: string }
4160
+ */
4161
+ static behavioralFunnelReport<T>(title_id: string, funnel_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
4162
+ /**
4163
+ * Delete a saved behavioral funnel definition.
4164
+ */
4165
+ static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>>;
4120
4166
  }
4121
4167
 
4122
4168
  declare class Campaigns {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
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
@@ -858,6 +858,80 @@ class Titles {
858
858
  params
859
859
  );
860
860
  }
861
+
862
+ /**
863
+ * Get a geographical distribution report for installs.
864
+ * @param params e.g., { group_by: 'country_code', start_date: '2025-01-01' }
865
+ */
866
+ public static geoReport<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
867
+ return Requests.processRoute(TitlesRoute.routes.geoReport, {}, { title_id }, params);
868
+ }
869
+
870
+ /**
871
+ * List and filter raw game events (telemetry).
872
+ */
873
+ public static listEvents<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
874
+ return Requests.processRoute(TitlesRoute.routes.listEvents, {}, { title_id }, params);
875
+ }
876
+
877
+ /**
878
+ * Record a single in-game action.
879
+ */
880
+ public static createEvent<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
881
+ return Requests.processRoute(TitlesRoute.routes.createEvent, data, { title_id });
882
+ }
883
+
884
+ /**
885
+ * Record multiple events in one request (Batching).
886
+ * @param data { events: Array<{game_install_id, step_key, action_key, metadata?}> }
887
+ */
888
+ public static bulkCreateEvents<T>(title_id: string, data: { events: object[] }): AxiosPromise<Response<T>> {
889
+ return Requests.processRoute(TitlesRoute.routes.bulkCreateEvents, data, { title_id });
890
+ }
891
+
892
+ /**
893
+ * Get a summary of actions per step.
894
+ */
895
+ public static eventSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
896
+ return Requests.processRoute(TitlesRoute.routes.eventSummary, {}, { title_id }, params);
897
+ }
898
+
899
+ /**
900
+ * Get all unique step and action keys used in this title.
901
+ */
902
+ public static eventDistinctKeys<T>(title_id: string): AxiosPromise<Response<T>> {
903
+ return Requests.processRoute(TitlesRoute.routes.eventDistinctKeys, {}, { title_id });
904
+ }
905
+
906
+ /**
907
+ * List all saved behavioral funnel definitions.
908
+ */
909
+ public static listBehavioralFunnels<T>(title_id: string): AxiosPromise<Response<T>> {
910
+ return Requests.processRoute(TitlesRoute.routes.listBehavioralFunnels, {}, { title_id });
911
+ }
912
+
913
+ /**
914
+ * Create and save a new behavioral funnel definition.
915
+ * @param data { name: string, description?: string, steps: string[] }
916
+ */
917
+ public static createBehavioralFunnel<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
918
+ return Requests.processRoute(TitlesRoute.routes.createBehavioralFunnel, data, { title_id });
919
+ }
920
+
921
+ /**
922
+ * Generate the drop-off report for a specific behavioral funnel.
923
+ * @param params { start_date?: string, end_date?: string }
924
+ */
925
+ public static behavioralFunnelReport<T>(title_id: string, funnel_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
926
+ return Requests.processRoute(TitlesRoute.routes.behavioralFunnelReport, {}, { title_id, funnel_id }, params);
927
+ }
928
+
929
+ /**
930
+ * Delete a saved behavioral funnel definition.
931
+ */
932
+ public static deleteBehavioralFunnel<T>(title_id: string, funnel_id: string): AxiosPromise<Response<T>> {
933
+ return Requests.processRoute(TitlesRoute.routes.deleteBehavioralFunnel, {}, { title_id, funnel_id });
934
+ }
861
935
  }
862
936
 
863
937
  export default Titles;
@@ -165,6 +165,21 @@ class TitlesRoute {
165
165
 
166
166
  cohorts: { url: '/titles/{title_id}/installs/cohorts', method: HTTP_METHODS.GET },
167
167
 
168
+ geoReport: { url: '/titles/{title_id}/installs/geo-report', method: HTTP_METHODS.GET },
169
+
170
+ // Game Events (Behavioral Telemetry)
171
+ listEvents: { url: '/titles/{title_id}/events', method: HTTP_METHODS.GET },
172
+ createEvent: { url: '/titles/{title_id}/events', method: HTTP_METHODS.POST },
173
+ bulkCreateEvents: { url: '/titles/{title_id}/events/bulk', method: HTTP_METHODS.POST },
174
+ eventSummary: { url: '/titles/{title_id}/events/summary', method: HTTP_METHODS.GET },
175
+ eventDistinctKeys: { url: '/titles/{title_id}/events/distinct-keys', method: HTTP_METHODS.GET },
176
+
177
+ // Behavioral Funnels
178
+ listBehavioralFunnels: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.GET },
179
+ createBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels', method: HTTP_METHODS.POST },
180
+ behavioralFunnelReport: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}/report', method: HTTP_METHODS.GET },
181
+ deleteBehavioralFunnel: { url: '/titles/{title_id}/behavioral-funnels/{funnel_id}', method: HTTP_METHODS.DELETE },
182
+
168
183
  };
169
184
 
170
185
  }