glitch-javascript-sdk 1.6.2 → 1.6.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
@@ -3769,6 +3769,12 @@ declare class Games {
3769
3769
  * @returns promise
3770
3770
  */
3771
3771
  static createCampaignData<T>(game_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3772
+ /**
3773
+ * Generates campaign data with a game title.
3774
+ *
3775
+ * @returns promise
3776
+ */
3777
+ static createCampaignWithTitle<T>(game_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3772
3778
  /**
3773
3779
  * Generates game data for this game.
3774
3780
  *
@@ -4428,6 +4434,15 @@ declare class Funnel {
4428
4434
  * @returns Promise with yearly funnel metrics data
4429
4435
  */
4430
4436
  static yearly<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4437
+ /**
4438
+ * Get gamified funnel metrics with recommended targets, scores, and ranks.
4439
+ *
4440
+ * @see https://api.glitch.fun/api/documentation#/Funnel%20Metrics/get_funnels_gamify
4441
+ *
4442
+ * @param params Query parameters (title_id, community_id, start_date, end_date)
4443
+ * @returns Promise with the gamified funnel data
4444
+ */
4445
+ static gamify<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
4431
4446
  }
4432
4447
 
4433
4448
  declare class SocialStats {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Funnel.ts CHANGED
@@ -87,6 +87,19 @@ class Funnel {
87
87
  public static yearly<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
88
88
  return Requests.processRoute(FunnelRoutes.routes.yearly, undefined, undefined, params);
89
89
  }
90
+
91
+ /**
92
+ * Get gamified funnel metrics with recommended targets, scores, and ranks.
93
+ *
94
+ * @see https://api.glitch.fun/api/documentation#/Funnel%20Metrics/get_funnels_gamify
95
+ *
96
+ * @param params Query parameters (title_id, community_id, start_date, end_date)
97
+ * @returns Promise with the gamified funnel data
98
+ */
99
+ public static gamify<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
100
+ return Requests.processRoute(FunnelRoutes.routes.gamify, undefined, undefined, params);
101
+ }
102
+
90
103
  }
91
104
 
92
105
  export default Funnel;
package/src/api/Games.ts CHANGED
@@ -38,6 +38,15 @@ class Games {
38
38
  return Requests.processRoute(GamesRoutes.routes.createCampaignData, data, {game_id : game_id}, params);
39
39
  }
40
40
 
41
+ /**
42
+ * Generates campaign data with a game title.
43
+ *
44
+ * @returns promise
45
+ */
46
+ public static createCampaignWithTitle<T>(game_id : string, data?: object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
47
+ return Requests.processRoute(GamesRoutes.routes.createCampaignWithTitle, data, {game_id : game_id}, params);
48
+ }
49
+
41
50
  /**
42
51
  * Generates game data for this game.
43
52
  *
@@ -12,6 +12,7 @@ class FunnelRoutes {
12
12
  daily: { url: '/funnels/daily', method: HTTP_METHODS.GET },
13
13
  monthly: { url: '/funnels/monthly', method: HTTP_METHODS.GET },
14
14
  yearly: { url: '/funnels/yearly', method: HTTP_METHODS.GET },
15
+ gamify: { url: '/funnels/gamify', method: HTTP_METHODS.GET },
15
16
  };
16
17
  }
17
18
 
@@ -7,6 +7,7 @@ class GamesRoutes {
7
7
  listGames: { url: '/games', method: HTTP_METHODS.GET },
8
8
  viewGame: { url: '/games/{game_id}', method: HTTP_METHODS.GET },
9
9
  createCampaignData: { url: '/games/{game_id}/generateCampaign', method: HTTP_METHODS.POST },
10
+ createCampaignWithTitle: { url: '/games/{game_id}/generateCampaignWithTitle', method: HTTP_METHODS.POST },
10
11
  createGameTitle: { url: '/games/{game_id}/generateTitle', method: HTTP_METHODS.POST },
11
12
  createGameScheduler: { url: '/games/{game_id}/generateScheduler', method: HTTP_METHODS.POST },
12
13
 
@@ -2,29 +2,29 @@ import Route from "./interface";
2
2
  import HTTP_METHODS from "../constants/HttpMethods";
3
3
 
4
4
  class TitlesRoute {
5
-
6
- public static routes: { [key: string]: Route } = {
7
- list: { url: '/titles', method: HTTP_METHODS.GET },
8
- create: { url: '/titles', method: HTTP_METHODS.POST },
9
- view : { url: '/titles/{title_id}', method: HTTP_METHODS.GET },
10
- update :{ url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
11
- delete : { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
12
- approve : { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
13
- reject : { url: '/titles/{title_id}/reject', method: HTTP_METHODS.POST },
14
- uploadMainImage : {url : '/titles/{title_id}/uploadMainImage', method: HTTP_METHODS.POST},
15
- uploadBannerImage : {url : '/titles/{title_id}/uploadBannerImage', method: HTTP_METHODS.POST},
16
- addAdministrator : { url: '/titles/{title_id}/addAdministrator', method: HTTP_METHODS.POST },
17
- removeAdministrator : { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
18
- addMedia: { url: '/titles/{title_id}/addMedia', method: HTTP_METHODS.POST },
19
- removeMedia: { url: '/titles/{title_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
20
- updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
21
- importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
22
- getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
23
- createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
5
+
6
+ public static routes: { [key: string]: Route } = {
7
+ list: { url: '/titles', method: HTTP_METHODS.GET },
8
+ create: { url: '/titles', method: HTTP_METHODS.POST },
9
+ view: { url: '/titles/{title_id}', method: HTTP_METHODS.GET },
10
+ update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
11
+ delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
12
+ approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
13
+ reject: { url: '/titles/{title_id}/reject', method: HTTP_METHODS.POST },
14
+ uploadMainImage: { url: '/titles/{title_id}/uploadMainImage', method: HTTP_METHODS.POST },
15
+ uploadBannerImage: { url: '/titles/{title_id}/uploadBannerImage', method: HTTP_METHODS.POST },
16
+ addAdministrator: { url: '/titles/{title_id}/addAdministrator', method: HTTP_METHODS.POST },
17
+ removeAdministrator: { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
18
+ addMedia: { url: '/titles/{title_id}/addMedia', method: HTTP_METHODS.POST },
19
+ removeMedia: { url: '/titles/{title_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
20
+ updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
21
+ importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
22
+ getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
23
+ createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
24
24
  listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
25
25
  revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
26
- };
26
+ };
27
27
 
28
- }
28
+ }
29
29
 
30
- export default TitlesRoute;
30
+ export default TitlesRoute;