glitch-javascript-sdk 2.2.7 → 2.2.9

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
@@ -6400,6 +6400,13 @@ declare class ShortLinks {
6400
6400
  * - Example usage: ShortLinks.referrerReport({ short_link_id: 'uuid-here' })
6401
6401
  */
6402
6402
  static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6403
+ static campaignPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6404
+ static influencerPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6405
+ static socialPostPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6406
+ static conversionFunnel<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6407
+ static clickHeatmap<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6408
+ static botAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6409
+ static attributionReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
6403
6410
  }
6404
6411
 
6405
6412
  declare class AIUsage {
@@ -6657,6 +6664,21 @@ declare class TwitchReporting {
6657
6664
  * @returns promise
6658
6665
  */
6659
6666
  static getCreatorStreamingSchedule<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
6667
+ /**
6668
+ * Get a list of games played by a specific streamer.
6669
+ *
6670
+ * @param twitch_streamer_id The ID of the Twitch streamer.
6671
+ * @returns promise
6672
+ */
6673
+ static getStreamerGameHistory<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
6674
+ /**
6675
+ * Get a paginated list of streamers who played a specific game.
6676
+ *
6677
+ * @param game_name The URL-encoded name of the game.
6678
+ * @param params Optional query parameters for pagination (e.g., page, per_page).
6679
+ * @returns promise
6680
+ */
6681
+ static getStreamersForGame<T>(game_name: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6660
6682
  }
6661
6683
 
6662
6684
  interface Route {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,57 +37,85 @@ class ShortLinks {
37
37
  // return Requests.processRoute(ShortLinksRoute.routes.deleteShortLink, {}, { id }, params);
38
38
  // }
39
39
 
40
- /**
41
- * Get click-summary report
42
- * - Example usage: ShortLinks.clickSummary({ short_link_id: 'uuid-here' })
43
- */
44
- public static clickSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
45
- return Requests.processRoute(
46
- ShortLinksRoute.routes.clickSummary,
47
- undefined,
48
- undefined,
49
- params
50
- );
51
- }
52
-
40
+ /**
41
+ * Get click-summary report
42
+ * - Example usage: ShortLinks.clickSummary({ short_link_id: 'uuid-here' })
43
+ */
44
+ public static clickSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
45
+ return Requests.processRoute(
46
+ ShortLinksRoute.routes.clickSummary,
47
+ undefined,
48
+ undefined,
49
+ params
50
+ );
51
+ }
52
+
53
53
  /**
54
54
  * Get geo & device breakdown report
55
55
  * - Example usage: ShortLinks.geoDeviceBreakdown({ short_link_id: 'uuid-here' })
56
- */
57
- public static geoDeviceBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
58
- return Requests.processRoute(
59
- ShortLinksRoute.routes.geoDeviceBreakdown,
60
- undefined,
61
- undefined,
62
- params
63
- );
64
- }
65
-
56
+ */
57
+ public static geoDeviceBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
58
+ return Requests.processRoute(
59
+ ShortLinksRoute.routes.geoDeviceBreakdown,
60
+ undefined,
61
+ undefined,
62
+ params
63
+ );
64
+ }
65
+
66
66
  /**
67
67
  * Get time-series report
68
68
  * - Example usage: ShortLinks.timeSeries({ short_link_id: 'uuid-here', group_by: 'day' })
69
- */
70
- public static timeSeries<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
71
- return Requests.processRoute(
72
- ShortLinksRoute.routes.timeSeries,
73
- undefined,
74
- undefined,
75
- params
76
- );
77
- }
78
-
69
+ */
70
+ public static timeSeries<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
71
+ return Requests.processRoute(
72
+ ShortLinksRoute.routes.timeSeries,
73
+ undefined,
74
+ undefined,
75
+ params
76
+ );
77
+ }
78
+
79
79
  /**
80
80
  * Get referrer & UTM report
81
81
  * - Example usage: ShortLinks.referrerReport({ short_link_id: 'uuid-here' })
82
- */
83
- public static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
84
- return Requests.processRoute(
85
- ShortLinksRoute.routes.referrerReport,
86
- undefined,
87
- undefined,
88
- params
89
- );
90
- }
82
+ */
83
+ public static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
84
+ return Requests.processRoute(
85
+ ShortLinksRoute.routes.referrerReport,
86
+ undefined,
87
+ undefined,
88
+ params
89
+ );
90
+ }
91
+
92
+ public static campaignPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
93
+ return Requests.processRoute(ShortLinksRoute.routes.campaignPerformance, undefined, undefined, params);
94
+ }
95
+
96
+ public static influencerPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
97
+ return Requests.processRoute(ShortLinksRoute.routes.influencerPerformance, undefined, undefined, params);
98
+ }
99
+
100
+ public static socialPostPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
101
+ return Requests.processRoute(ShortLinksRoute.routes.socialPostPerformance, undefined, undefined, params);
102
+ }
103
+
104
+ public static conversionFunnel<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
105
+ return Requests.processRoute(ShortLinksRoute.routes.conversionFunnel, undefined, undefined, params);
106
+ }
107
+
108
+ public static clickHeatmap<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
109
+ return Requests.processRoute(ShortLinksRoute.routes.clickHeatmap, undefined, undefined, params);
110
+ }
111
+
112
+ public static botAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
113
+ return Requests.processRoute(ShortLinksRoute.routes.botAnalysis, undefined, undefined, params);
114
+ }
115
+
116
+ public static attributionReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
117
+ return Requests.processRoute(ShortLinksRoute.routes.attributionReport, undefined, undefined, params);
118
+ }
91
119
  }
92
120
 
93
121
  export default ShortLinks;
@@ -84,6 +84,27 @@ class TwitchReporting {
84
84
  return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id });
85
85
  }
86
86
 
87
+ /**
88
+ * Get a list of games played by a specific streamer.
89
+ *
90
+ * @param twitch_streamer_id The ID of the Twitch streamer.
91
+ * @returns promise
92
+ */
93
+ public static getStreamerGameHistory<T>(twitch_streamer_id: string): AxiosPromise<Response<T>> {
94
+ return Requests.processRoute(TwitchReportingRoute.routes.getStreamerGameHistory, undefined, { twitch_streamer_id });
95
+ }
96
+
97
+ /**
98
+ * Get a paginated list of streamers who played a specific game.
99
+ *
100
+ * @param game_name The URL-encoded name of the game.
101
+ * @param params Optional query parameters for pagination (e.g., page, per_page).
102
+ * @returns promise
103
+ */
104
+ public static getStreamersForGame<T>(game_name: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
105
+ return Requests.processRoute(TwitchReportingRoute.routes.getStreamersForGame, undefined, { game_name: encodeURIComponent(game_name) }, params);
106
+ }
107
+
87
108
  }
88
109
 
89
110
  export default TwitchReporting;
@@ -14,6 +14,14 @@ class ShortLinksRoute {
14
14
  geoDeviceBreakdown:{ url: '/shortlinks/reports/geo-device', method: HTTP_METHODS.GET },
15
15
  timeSeries: { url: '/shortlinks/reports/time-series', method: HTTP_METHODS.GET },
16
16
  referrerReport: { url: '/shortlinks/reports/referrer', method: HTTP_METHODS.GET },
17
+
18
+ campaignPerformance: { url: '/shortlinks/reports/campaign-performance', method: HTTP_METHODS.GET },
19
+ influencerPerformance: { url: '/shortlinks/reports/influencer-performance', method: HTTP_METHODS.GET },
20
+ socialPostPerformance: { url: '/shortlinks/reports/social-post-performance', method: HTTP_METHODS.GET },
21
+ conversionFunnel: { url: '/shortlinks/reports/conversion-funnel', method: HTTP_METHODS.GET },
22
+ clickHeatmap: { url: '/shortlinks/reports/click-heatmap', method: HTTP_METHODS.GET },
23
+ botAnalysis: { url: '/shortlinks/reports/bot-analysis', method: HTTP_METHODS.GET },
24
+ attributionReport: { url: '/shortlinks/reports/attribution', method: HTTP_METHODS.GET },
17
25
  };
18
26
  }
19
27
 
@@ -28,6 +28,14 @@ class TwitchReportingRoute {
28
28
  url: '/reporting/twitch/streamers/{twitch_streamer_id}/streaming-schedule',
29
29
  method: HTTP_METHODS.GET
30
30
  },
31
+ getStreamerGameHistory: {
32
+ url: '/reporting/twitch/streamers/{twitch_streamer_id}/games',
33
+ method: HTTP_METHODS.GET
34
+ },
35
+ getStreamersForGame: {
36
+ url: '/reporting/twitch/games/{game_name}/streamers',
37
+ method: HTTP_METHODS.GET
38
+ },
31
39
  };
32
40
 
33
41
  }